Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8033671

Groovy fails to pass tests with invokedynamic (latest sources for JDK7)

XMLWordPrintable

      FULL PRODUCT VERSION :
      openjdk version "1.7.0-internal"
      OpenJDK Runtime Environment (build 1.7.0-internal-b17)
      OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)


      FULL OS VERSION :
      Linux Ubuntu-1310-saucy-64-minimal 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      This is a slightly different bug report from the previous one, since here we're using the *latest JDK7 sources* and build a JDK7 on our CI server.

      A DESCRIPTION OF THE PROBLEM :
      Groovy fails to build with the latest JDK 7 from sources. Our CI server has a build which runs against the latest JDK7 sources. The build fails to pass tests with invokedynamic support activated.

      The outcome can be seen here: http://ci.groovy-lang.org/viewLog.html?buildId=615&tab=buildResultsDiv&buildTypeId=Groovy_Jdk7snapshotBuild

      (login as 'guest')

      All failures are about a class loading issue: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/wrappers/Wrapper
          at java.lang.invoke.MethodHandle.invokeExact(MethodHandle.java)

      It's worth noting that the build against latest JDK8 sources passes, so it's a JDK7 specific bug. The errors are different from those we have with 7u60b04.


      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

      REGRESSION. Last worked in version 7u11

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      git clone
      cd groovy-core
      ./gradlew -Pindy=true test


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Build should pass
      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/wrappers/Wrapper
          at java.lang.invoke.MethodHandle.invokeExact(MethodHandle.java)
          at org.codehaus.groovy.tools.shell.util.PackageHelper$_mergeNewPackages_closure2.doCall(PackageHelper.groovy:103)
          at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
          at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
          at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
          at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
          at groovy.lang.Closure.call(Closure.java:423)
          at groovy.lang.Closure.call(Closure.java:439)
          at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1370)
          at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1363)
          at org.codehaus.groovy.runtime.dgm$149.doMethodInvoke(Unknown Source)
          at java.lang.invoke.MethodHandleImpl$GuardWithCatch.invoke_L2(MethodHandleImpl.java:1130)
          at org.codehaus.groovy.tools.shell.util.PackageHelper.mergeNewPackages(PackageHelper.groovy:93)
          at java.lang.invoke.MethodHandleImpl$GuardWithCatch.invoke_L4(MethodHandleImpl.java:1146)
          at org.codehaus.groovy.tools.shell.util.PackageHelper.initializePackages(PackageHelper.groovy:85)
          at java.lang.invoke.MethodHandleImpl$GuardWithCatch.invoke_L2(MethodHandleImpl.java:1130)
          at org.codehaus.groovy.tools.shell.util.PackageHelper.<init>(PackageHelper.groovy:30)
          at java.lang.invoke.MethodHandleImpl$GuardWithCatch.invoke_L2(MethodHandleImpl.java:1130)
          at org.codehaus.groovy.tools.shell.Groovysh.<init>(Groovysh.groovy:72)
          at org.codehaus.groovy.tools.shell.Groovysh.<init>(Groovysh.groovy:89)
          at org.codehaus.groovy.tools.shell.Groovysh.<init>(Groovysh.groovy:93)
          at org.codehaus.groovy.tools.shell.Groovysh.<init>(Groovysh.groovy:97)
          at java.lang.invoke.MethodHandleImpl$GuardWithCatch.invoke_L2(MethodHandleImpl.java:1130)
          at org.codehaus.groovy.tools.shell.AllCompletorsTest.setUp(AllCompletorsTest.groovy:75)
          at junit.framework.TestCase.runBare(TestCase.java:139)
          at junit.framework.TestResult$1.protect(TestResult.java:122)
          at junit.framework.TestResult.runProtected(TestResult.java:142)
          at junit.framework.TestResult.run(TestResult.java:125)
          at junit.framework.TestCase.run(TestCase.java:129)
          at junit.framework.TestSuite.runTest(TestSuite.java:255)
          at junit.framework.TestSuite.run(TestSuite.java:250)
          at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
          at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
          at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)
          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:601)
          at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
          at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
          at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
          at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
          at $Proxy2.processTestClass(Unknown Source)
          at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
          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:601)
          at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
          at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
          at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
          at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

      REPRODUCIBILITY :
      This bug can be reproduced always.

            twisti Christian Thalinger (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: