JDK-8024840 : OOME on JRuby tests
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2013-09-15
  • Updated: 2019-09-13
  • Resolved: 2014-12-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u40Resolved 9Resolved
Related Reports
Duplicate :  
Duplicate :  
Description
Charles Nutter reports:

I can reproduce this by running a fairly normalish command in JRuby:

(Java::JavaLang::InternalError)
   guard=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L)=>{
   t5:I=MethodHandle(ThreadContext,IRubyObject,IRubyObject,IRubyObject)boolean(a1:L,a2:L,a3:L,a4:L);
   t6:L=MethodHandleImpl.selectAlternative(t5:I,(MethodHandle(ThreadContext,IRubyObject,IRubyObject,IRubyObject)IRubyObject),(MethodHandle(ThreadContext,IRubyObject,IRubyObject,IRubyObject)IRubyObject));
   t7:L=MethodHandle.invokeBasic(t6:L,a1:L,a2:L,a3:L,a4:L);t7:L}

I think it's happening at an OutOfMemory event (bumping up memory
makes it go away), so it may not be a critical issue, but I thought
I'd toss it out here.

I do not...but it appears to be tied to getting an OOM when inside lambda code.

We now have a third-party report of the same issue. Because the
internal error appears to nuke the original exception, we don't know
for sure that this is memory-related, but the user did see *other*
threads raise OOM and increasing memory solved it.

https://github.com/jruby/jruby/issues/1014

So...there's two things that are bad things here...

* More memory required when running with indy versus without, all
other things kept constant (reproduced by two people, one of them me)
* InternalError bubbling out and swallowing the cause (reproduced by
the same two people)...this may count as two issues.

My original reproduction did not appear to fire on Java 8, but it also
appeared to run forever...so it's possible that we were at a specific
memory threshold (permgen? normal heap? meatspace?) or Java 8 may be
failing more gracefully.

Feel free to discuss or offer suggestions to Alex on the bug report
above. I will be monitoring.

Comments
Duplicates JEP-210: LambdaForm sharing (JDK-8046703).
01-12-2014

LambdaForm sharing (JEP-210) significantly improves dynamic memory footprint of LambdaForm-based java.lang.invoke implementation. The problem goes away in 8u40.
01-12-2014

ILW=ungraceful OOM, common, increase mem=MHL=P3
27-03-2014