Derby
  1. Derby
  2. DERBY-176

Derby throws ERROR XBCM1: Java linkage error thrown during load of generated class org.apache.derby.exe.aced07c066x0102xca87x3319x00004aa5686e1 during execution of large query

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0
    • Fix Version/s: 10.1.3.2, 10.2.1.6, 10.3.1.4
    • Component/s: SQL
    • Labels:
      None

      Description

      When executing a large query or oather large operations, Derby throws a java linkage exception.
      This is because the generated byte code exceeds the JVM limits for method sizes constant pool entries etc, the amount of code in a conditional etc. The attached repro demonstrates the problem but the problem can also occur for other operations that generate lots of byte code. The repro is just a new functional test,
      so should be copied to derbyTesting/functionTests/lang/largeCodeGen.java and run like
      java -Djvmflags=-Xmx512M org.apache.derbyTesting.harness.RunTest lang/largeCodeGen

      When this problem is fixed additional scenarios should be added to this test.

      ERROR XBCM1: Java linkage error thrown during load of
      generated class org.apache.derby.exe.aced07c066x0102xca87x3319x00004aa5686e1.
      at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:315)
      at org.apache.derby.impl.services.reflect.DatabaseClasses.loadGeneratedClass(DatabaseClasses.java:162)
      at org.apache.derby.impl.services.bytecode.GClass.getGeneratedClass(GClass.java:59)
      at org.apache.derby.impl.sql.compile.ExpressionClassBuilder.getGeneratedClass(ExpressionClassBuilder.java:920)
      at org.apache.derby.impl.sql.compile.StatementNode.generate(StatementNode.java:270)
      at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:432)
      at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:107)
      at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:688)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:118)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(EmbedPreparedStatement20.java:82)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(EmbedPreparedStatement30.java:62)
      at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Driver30.java:92)
      at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:675)
      at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:519)
      at org.apache.derbyTesting.functionTests.tests.lang.largeCodeGen.main(largeCodeGen.java:86)
      Exception in thread "main"

      1. largeCodeGen.java
        4 kB
        Kathey Marsden

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Daniel John Debrunner
              Reporter:
              Kathey Marsden
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development