db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: instability in AccessTest?
Date Thu, 15 Jul 2010 22:05:55 GMT
On Thu, Jul 15, 2010 at 8:30 AM, Dag H. Wanvik <dag.wanvik@oracle.com> wrote:
>
> Hi,
>
> Running regressions I saw this AccessControlException.
>
> Rerunning the test stand-alone it passes in the same environment. Has
> anybody seen this?
>
> Myrna commented on DERBY-4540:
>
> "This test was recently converted to junit...The original had some
> instability in it, which was weeded out over time..."
>
> Dag
>
> There was 1 error:
> 1) testPartialRowRTStats(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException:
Java exception: 'access denied (java.io.FilePermission /export/home/tmp/derby/sb/tests/derby-4471-1a-org.apache.derbyTesting.functionTests.suites.All--n.sb.sb4.classes-1.6.0_15-14943/system/ac4e364fecx0129xd3f9x6669x00004246abbc6.class
write): java.security.AccessControlException'.
>        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
>        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142)
>        at org.apache.derby.impl.jdbc.Util.javaException(Util.java:299)
>        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
>        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
>        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2269)
>        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
>        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:614)
>        at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:152)
>        at org.apache.derbyTesting.functionTests.tests.store.AccessTest.doQuery(AccessTest.java:569)
>        at org.apache.derbyTesting.functionTests.tests.store.AccessTest.doQuery2(AccessTest.java:530)
>        at org.apache.derbyTesting.functionTests.tests.store.AccessTest.runQueriesNormal(AccessTest.java:385)
>        at org.apache.derbyTesting.functionTests.tests.store.AccessTest.testPartialRowRTStats(AccessTest.java:296)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>        at junit.extensions.TestSetup.run(TestSetup.java:25)
>        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>        at junit.extensions.TestSetup.run(TestSetup.java:25)
>        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>        at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>        at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.sql.SQLException: Java exception: 'access denied (java.io.FilePermission
/export/home/tmp/derby/sb/tests/derby-4471-1a-org.apache.derbyTesting.functionTests.suites.All--n.sb.sb4.classes-1.6.0_15-14943/system/ac4e364fecx0129xd3f9x6669x00004246abbc6.class
write): java.security.AccessControlException'.
>        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
>        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
>        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
>        ... 50 more
> Caused by: java.security.AccessControlException: access denied (java.io.FilePermission
/export/home/tmp/derby/sb/tests/derby-4471-1a-org.apache.derbyTesting.functionTests.suites.All--n.sb.sb4.classes-1.6.0_15-14943/system/ac4e364fecx0129xd3f9x6669x00004246abbc6.class
write)
>        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
>        at java.security.AccessController.checkPermission(AccessController.java:546)
>        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>        at java.lang.SecurityManager.checkWrite(SecurityManager.java:962)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>        at org.apache.derby.impl.services.reflect.DatabaseClasses.WriteClassFile(DatabaseClasses.java:190)
>        at org.apache.derby.impl.services.reflect.DatabaseClasses.loadGeneratedClass(DatabaseClasses.java:168)
>        at org.apache.derby.impl.services.bytecode.GClass.getGeneratedClass(GClass.java:63)
>        at org.apache.derby.impl.sql.compile.ExpressionClassBuilder.getGeneratedClass(ExpressionClassBuilder.java:849)
>        at org.apache.derby.impl.sql.compile.StatementNode.generate(StatementNode.java:390)
>        at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:469)
>        at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:90)
>        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1071)
>        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:606)
>        ... 43 more
>
> FAILURES!!!
> Tests run: 12737,  Failures: 0,  Errors: 1
>

I don't think I've seen that failure.

The background of that comment about instability is that for the
conversion, I had researched the change history (looking at comments
more than code) of access.sql before and after it was contributed, and
various attempts had been made to eliminate "timing" failures as a
result of the asynchronous post commit processing - specifically in
what is now test fixture reclaimTest; similarly, a section of what is
now fixture/method testCS2778 was removed with revision 393896 because
the behavior (according to the comment) was not the same for all
hardware/jvms, referring to DERBY-990 and DERBY-1210.

I don't know what the stack trace - if any - of the test was on
failure because of these ancient failures; DERBY-990 and DERBY-1210
show only a simple diff...

Now that I looked at these bugs, I notice there's DERBY-1213 to put
the section removed with revision 393896 back in rewritten to a java
program...

Myrna

Mime
View raw message