db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3655) errror in nightly regression test: LobStreamsTest:encryptedjunit.framework.AssertionFailedError: f:\jartest\JarResults.2008-04-29\ibm16_suites.All\system\singleUse\oneuse1e\tmp\lob6165.tmp
Date Fri, 26 Sep 2008 17:19:44 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634936#action_12634936

Kathey Marsden commented on DERBY-3655:

Thanks Knut for fixing DERBY-3883. It looks like a good fix albeit not related to this issue.
I still see the failure with your patch and this is what I think is going on.

What I see with IBM 1.6 is that by the time we get to rollback() the Lob references have already
been removed from the WeakHashMap EmbedConnection.lobReferences  but have not yet been garbage
collected.  I think it is ok for WeakHashMap to do this.  The javadoc says.
The behavior of the WeakHashMap class depends in part upon the actions of the garbage collector,
so several familiar (though not required) Map invariants do not hold for this class. Because
the garbage collector may discard keys at any time, a WeakHashMap may behave as though an
unknown thread is silently removing entries. 

Changing the WeakHashMap to a HashMap corrects this problem, ensuring that when we get to
rollback() the entries will still be there, but I am sure there must be a good reason for
using a WeakHashMap in this case.  Does anyone know why we use WeakHashMap  instead of HashMap,
when it seems ultimately we will get to the end of the transaction and clear these entries?

> errror in nightly regression test: LobStreamsTest:encryptedjunit.framework.AssertionFailedError:
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-3655
>                 URL: https://issues.apache.org/jira/browse/DERBY-3655
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions:,
>         Environment: OS: Windows, Test: v10_4 branch insane jars, ibm16 jvm
> OS: Windows, Test: v10_3 branch insane jars, ibm142 jvm
>            Reporter: Mike Matrigali
> There was 1 failure:
> 1) LobStreamsTest:encryptedjunit.framework.AssertionFailedError: f:\jartest\JarResults.2008-04-29\ibm16_suites.All\system\singleUse\oneuse1e\tmp\lob6165.tmp
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:130)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:128)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:35)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:105)
> 	at java.security.AccessController.doPrivileged(AccessController.java:202)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:102)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:98)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDatabase(DropDatabaseSetup.java:91)
> 	at org.apache.derbyTesting.junit.DropDatabaseSetup.tearDown(DropDatabaseSetup.java:77)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message