db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (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
Date Fri, 02 Dec 2005 20:00:30 GMT
    [ http://issues.apache.org/jira/browse/DERBY-176?page=comments#action_12359176 ] 

Daniel John Debrunner commented on DERBY-176:

Other commits for this issue:

160444 - Add pop() method to byte code compiler. (incorrect makred for Derby-167)

160580 - Change generate fields to use the same name space as generated methods to reduce
the number of constant pool entries created.

160631 -Automatically handle a generated method exceeding the
byte code limit of 65,535 in limited cases of a method
with no parameters and whose stack depth drops to zero
during code generation. Solution is to generate sub methods
with the same signature and pass control to those methods.
The sub methods are private and hidden to any callers, who
just interact with the single top-level method.

160932  - Reduce the number of code instructions generated for a putField() followed by an
by providing a setField() method that sets a field with the top value of the stack but does
leave the field's contents on the stack. The use of putField() mimicing the Java language
lead to many cases where the value on the stack was not required and immediately popped using
This lead to two extra instructions per field assignment (dup and pop), providing a setField()
removes the
need for the endStatement() as it never performs the dup.

> Derby throws ERROR XBCM1: Java linkage error thrown during load of generated class org.apache.derby.exe.aced07c066x0102xca87x3319x00004aa5686e1
during execution of large query
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>          Key: DERBY-176
>          URL: http://issues.apache.org/jira/browse/DERBY-176
>      Project: Derby
>         Type: Bug
>   Components: SQL
>     Versions:,,,
>     Reporter: Kathey Marsden
>  Attachments: largeCodeGen.java
> When executing a large query or oather large operations, Derby throws a java linkage
> 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" 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message