Error, Java 8, lambda form compilation
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Thu Mar 1 22:17:35 UTC 2018
On 2/28/18 11:52 PM, Charles Oliver Nutter wrote:
> Ah-ha...I added some logging, which of course made the error go
> away...but about ten tests later I got a metaspace OOM.
That makes sense. BTW there's another source of exceptions during
MethodHandle construction (e.g., JDK-8086252 [1]):
java.lang.VirtualMachineError: Out of space in CodeCache for adapters
> Could be this was all just a memory issue, but it would be nice if the
> error didn't get swallowed.
It's not swallowed, but wrapped in InternalError before rethrowing. Do
you have control over test harness to print the whole exception chain?
Best regards,
Vladimir Ivanov
[1] https://bugs.openjdk.java.net/browse/JDK-8086252
> On Wed, Feb 28, 2018 at 12:40 PM Charles Oliver Nutter
> <headius at headius.com <mailto:headius at headius.com>> wrote:
>
> Hey, I'm still not sure how best to deal with this, but we've been
> consistently getting a similar error at the same place. It has kept
> JRuby master CI red for many weeks.
>
> The problem does not reproduce when running in isolation...only in a
> long test run, and so far only on Travis CI (Ubuntu 16.something,
> Java 8u151).
>
> Looking at the code, it appears the dropArguments call below (called
> from MethodHandles.guardWithTest:3018) was replaced with some new
> code and dropArgumentsToMatch in 9. I have not read through logs to
> see if that change might be related.
>
> Unhandled Java exception: java.lang.InternalError: exactInvoker=Lambda(a0:L/SpeciesData<LL>,a1:L,a2:L)=>{
> [exec] t3:L=BoundMethodHandle$Species_LL.argL1(a0:L);
> [exec] t4:L=MethodHandle.invokeBasic(t3:L);
> [exec] t5:L=BoundMethodHandle$Species_LL.argL0(a0:L);
> [exec] t6:V=Invokers.checkExactType(t4:L,t5:L);
> [exec] t7:V=Invokers.checkCustomized(t4:L);
> [exec] t8:I=MethodHandle.invokeBasic(t4:L);t8:I}
> [exec] java.lang.InternalError: exactInvoker=Lambda(a0:L/SpeciesData<LL>,a1:L,a2:L)=>{
> [exec] t3:L=BoundMethodHandle$Species_LL.argL1(a0:L);
> [exec] t4:L=MethodHandle.invokeBasic(t3:L);
> [exec] t5:L=BoundMethodHandle$Species_LL.argL0(a0:L);
> [exec] t6:V=Invokers.checkExactType(t4:L,t5:L);
> [exec] t7:V=Invokers.checkCustomized(t4:L);
> [exec] t8:I=MethodHandle.invokeBasic(t4:L);t8:I}
> [exec] newInternalError at java/lang/invoke/MethodHandleStatics.java:127
> [exec] compileToBytecode at java/lang/invoke/LambdaForm.java:660
> [exec] prepare at java/lang/invoke/LambdaForm.java:635
> [exec] <init> at java/lang/invoke/MethodHandle.java:461
> [exec] <init> at java/lang/invoke/BoundMethodHandle.java:58
> [exec] <init> at java/lang/invoke/Species_LL:-1
> [exec] copyWith at java/lang/invoke/Species_LL:-1
> [exec] dropArguments at java/lang/invoke/MethodHandles.java:2465
> [exec] guardWithTest at java/lang/invoke/MethodHandles.java:3018
> [exec] guardWithTest at java/lang/invoke/SwitchPoint.java:173
> [exec] searchConst at org/jruby/ir/targets/ConstantLookupSite.java:103
>
>
> On Fri, Jan 12, 2018 at 9:54 AM Charles Oliver Nutter
> <headius at headius.com <mailto:headius at headius.com>> wrote:
>
> I wish I could provide more info here. Just got another one in CI:
>
> [exec] [1603/8763] TestBenchmark#test_benchmark_makes_extra_calcultations_with_an_Array_at_the_end_of_the_benchmark_and_show_the_resultUnhandled Java exception: java.lang.BootstrapMethodError: call site initialization exception
> [exec] java.lang.BootstrapMethodError: call site initialization exception
> [exec] makeSite at java/lang/invoke/CallSite.java:341
> [exec] linkCallSiteImpl at java/lang/invoke/MethodHandleNatives.java:307
> [exec] linkCallSite at java/lang/invoke/MethodHandleNatives.java:297
> [exec] block in autorun at /home/travis/build/jruby/jruby/test/mri/lib/test/unit.rb:935
> [exec] callDirect at org/jruby/runtime/CompiledIRBlockBody.java:151
> [exec] call at org/jruby/runtime/IRBlockBody.java:77
> [exec] call at org/jruby/runtime/Block.java:124
> [exec] call at org/jruby/RubyProc.java:288
> [exec] call at org/jruby/RubyProc.java:272
> [exec] tearDown at org/jruby/Ruby.java:3276
> [exec] tearDown at org/jruby/Ruby.java:3249
> [exec] internalRun at org/jruby/Main.java:309
> [exec] run at org/jruby/Main.java:232
> [exec] main at org/jruby/Main.java:204
> [exec]
> [exec] Caused by:
> [exec] java.lang.InternalError: BMH.reinvoke=Lambda(a0:L/SpeciesData<L>,a1:L,a2:L,a3:L)=>{
> [exec] t4:L=Species_L.argL0(a0:L);
> [exec] t5:L=MethodHandle.invokeBasic(t4:L,a1:L,a2:L,a3:L);t5:L}
> [exec] newInternalError at java/lang/invoke/MethodHandleStatics.java:127
> [exec] compileToBytecode at java/lang/invoke/LambdaForm.java:660
> [exec] prepare at java/lang/invoke/LambdaForm.java:635
> [exec] <init> at java/lang/invoke/MethodHandle.java:461
> [exec] <init> at java/lang/invoke/BoundMethodHandle.java:58
> [exec] <init> at java/lang/invoke/BoundMethodHandle.java:211
> [exec] make at java/lang/invoke/BoundMethodHandle.java:224
> [exec] makeReinvoker at java/lang/invoke/BoundMethodHandle.java:141
> [exec] rebind at java/lang/invoke/DirectMethodHandle.java:130
> [exec] insertArguments at java/lang/invoke/MethodHandles.java:2371
> [exec] up at com/headius/invokebinder/transform/Insert.java:99
>
>
> On Tue, Jan 9, 2018 at 12:18 PM Vladimir Ivanov
> <vladimir.x.ivanov at oracle.com
> <mailto:vladimir.x.ivanov at oracle.com>> wrote:
>
> Thanks, Charlie.
>
> Unfortunately, it doesn't give much info without the
> exception which
> caused it.
>
> jdk/src/share/classes/java/lang/invoke/LambdaForm.java:
> 659 } catch (Error | Exception ex) {
> 660 throw newInternalError(this.toString(),
> ex);
> 661 }
>
> Best regards,
> Vladimir Ivanov
>
> On 1/9/18 9:10 PM, Charles Oliver Nutter wrote:
> > Unfortunately this just happened in one build, but I
> thought I'd post it
> > here for posterity.
> >
> > Unhandled Java exception: java.lang.InternalError:
> identity_L=Lambda(a0:L/SpeciesData<L>,a1:L,a2:L)=>{
> > [exec] t3:L=Species_L.argL0(a0:L);t3:L}
> > [exec] java.lang.InternalError:
> identity_L=Lambda(a0:L/SpeciesData<L>,a1:L,a2:L)=>{
> > [exec] t3:L=Species_L.argL0(a0:L);t3:L}
> > [exec] newInternalError at
> java/lang/invoke/MethodHandleStatics.java:127
> > [exec] compileToBytecode at
> java/lang/invoke/LambdaForm.java:660
> > [exec] prepare at
> java/lang/invoke/LambdaForm.java:635
> > [exec] <init> at
> java/lang/invoke/MethodHandle.java:461
> > [exec] <init> at
> java/lang/invoke/BoundMethodHandle.java:58
> > [exec] <init> at
> java/lang/invoke/BoundMethodHandle.java:211
> > [exec] copyWith at
> java/lang/invoke/BoundMethodHandle.java:228
> > [exec] dropArguments at
> java/lang/invoke/MethodHandles.java:2465
> > [exec] dropArguments at
> java/lang/invoke/MethodHandles.java:2535
> > [exec] up at
> com/headius/invokebinder/transform/Drop.java:39
> > [exec] invoke at
> com/headius/invokebinder/Binder.java:1143
> > [exec] constant at
> com/headius/invokebinder/Binder.java:1116
> > [exec] searchConst at
> org/jruby/ir/targets/ConstantLookupSite.java:98
> > [exec] block in autorun at
> /home/travis/build/jruby/jruby/test/mri/lib/test/unit.rb:935
> > [exec] callDirect at
> org/jruby/runtime/CompiledIRBlockBody.java:151
> > [exec] call at
> org/jruby/runtime/IRBlockBody.java:77
> > [exec] call at
> org/jruby/runtime/Block.java:124
> > [exec] call at
> org/jruby/RubyProc.java:288
> > [exec] call at
> org/jruby/RubyProc.java:272
> > [exec] tearDown at org/jruby/Ruby.java:3276
> > [exec] tearDown at org/jruby/Ruby.java:3249
> > [exec] internalRun at org/jruby/Main.java:309
> > [exec] run at org/jruby/Main.java:232
> > [exec] main at org/jruby/Main.java:204
> >
> > - Charlie
> >
> >
> >
> > _______________________________________________
> > mlvm-dev mailing list
> > mlvm-dev at openjdk.java.net <mailto:mlvm-dev at openjdk.java.net>
> > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
> >
>
> --
>
> - Charlie (mobile)
>
> --
>
> - Charlie (mobile)
>
More information about the mlvm-dev
mailing list