Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 413913 - [1.8] Investigate failures against b100
Summary: [1.8] Investigate failures against b100
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: Manoj N Palat CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 396139
  Show dependency tree
 
Reported: 2013-07-29 07:31 EDT by Manoj N Palat CLA
Modified: 2013-09-10 02:55 EDT (History)
5 users (show)

See Also:
srikanth_sankaran: review+


Attachments
Proposed Patch (7.29 KB, patch)
2013-07-29 20:06 EDT, Manoj N Palat CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manoj N Palat CLA 2013-07-29 07:31:22 EDT

    
Comment 1 Manoj N Palat CLA 2013-07-29 20:06:31 EDT
Created attachment 233915 [details]
Proposed Patch
Comment 2 Srikanth Sankaran CLA 2013-08-01 01:47:28 EDT
Patch looks good.
Comment 4 Stephan Herrmann CLA 2013-08-01 16:58:05 EDT
Running org.eclipse.jdt.core.tests.compiler.regression.TestAll at compliance 1.8 with b100 on Linux I see 80 failures, all like this:

java.lang.IncompatibleClassChangeError
	at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:383)
	at X.main(X.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:491)
	at 

The last line is indeed truncated.
Some failing tests in NegativeLambdaExpressionsTest are
 test401610f, test401610f, test049, test401610, etc.

Is anybody else seeing this?

Should I assume my jdk download is corrupt (I did check the md5 though).

Switching back to b92 makes the failures disappear.
Comment 5 Stephan Herrmann CLA 2013-08-01 17:11:49 EDT
Update:
I just downloaded b99, and it shows the same failures, so it seems to be s.t. real.
Comment 6 Manoj N Palat CLA 2013-08-12 11:02:35 EDT
(In reply to comment #5)
> Update:
> I just downloaded b99, and it shows the same failures, so it seems to be
> s.t. real.

I was able to reproduce the issue in linux although the same (all) tests pass in windows. On further investigation, it is found to be an issue with b100 JRE itself.

Taking a sample failing test case X.java:
$ cat X.java 
interface I {
	abstract void doit(); 
}
public class X { 
  public static void main(String[] args) { 
	int var = 2; 
	I x2 = () -> { 
		  System.out.println("Hello World");
		};
		
	x2.doit();
	var=2; 
  } 
}

Decompiled class files' relevant portions are shown below:

Eclipse JDT Core compiled:
  BootstrapMethods:
    0: #39 invokestatic java/lang/invoke/LambdaMetafactory.metaFactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
      Method arguments:
        #41 invokeinterface I.doit:()V
        #44 invokestatic X.lambda$0:()V
        #45 ()V

b100 command line compiled

  BootstrapMethods:
    0: #20 invokestatic java/lang/invoke/LambdaMetafactory.metaFactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
      Method arguments:
        #21 invokeinterface I.doit:()V
        #22 invokestatic X.lambda$0:()V
        #23 ()V

In addition, the class files compiled by both b100 as well Eclipse JDT from Windows, when ran on linux, gave the same error.

One immediate workaround for this issue is to disable these failing tests using os specific switch until this issue is addressed.

Stephan: I can provide a patch to this end if this workaround helps for the time being.
Comment 7 Stephan Herrmann CLA 2013-08-12 14:02:44 EDT
(In reply to comment #6)
> Stephan: I can provide a patch to this end if this workaround helps for the
> time being.

Thanks for the offer. I'm still using b92 which works fine for my so far.

Has the JRE problem been reported to them?
Comment 8 Manoj N Palat CLA 2013-08-13 04:14:32 EDT
(In reply to comment #7)

> Has the JRE problem been reported to them?
No.
Comment 9 Srikanth Sankaran CLA 2013-08-26 01:16:57 EDT
(In reply to comment #8)
> (In reply to comment #7)
> 
> > Has the JRE problem been reported to them?
> No.

Yes, and so we are ready to close this.
Comment 10 Andrew Clement CLA 2013-09-06 11:34:19 EDT
Is there some kind of bug reference we can track for when this is fixed? My users are getting really frustrated with this problem coming out.
Comment 11 Srikanth Sankaran CLA 2013-09-06 11:41:12 EDT
Manoj, please provide any details you have on this. In the meantime, we
heard from Tom on jdt-core-dev about a possible meta factory method signature
change seen at 8b105.

http://dev.eclipse.org/mhonarc/lists/jdt-core-dev/msg02324.html

What Manoj observed was that 8b100 on windows would run a program successfully
while the same class files presented to 8b100 on Linux would fail.

I had not heard of any recent changes in meta factory API through the EG
forums.

We will test shortly on 8b105 and see what needs to be done - (we have a long
weekend in India, so it could be Tuesday next at the earliest.)
Comment 12 Manoj N Palat CLA 2013-09-10 02:55:00 EDT
(In reply to Andrew Clement from comment #10)
> Is there some kind of bug reference we can track for when this is fixed? My
> users are getting really frustrated with this problem coming out.

Have not heard from them on this at all. Neither does the search provide any info. Anyway, with the latest we have access to, ie b104, we do get the same error with windows as well (Linux continues to fail on b104). Bug 416885 will track further updates.