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

Kristian Waagan commented on DERBY-5297:
----------------------------------------

Using BTrace and some custom helper code, I think I have been able to identify 
the following stack trace as the reason for why the file cannot be deleted:

org.apache.derby.impl.io.DirRandomAccessFile@1602bbc = 
test/system/singleUse/oneuse0/seg0/c10f0.dat -> 
org.apache.derby.impl.io.DirFile4.getRandomAccessFile(Unknown Source)
org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
org.apache.derby.impl.store.raw.data.RAFContainer.openContainerMinion(Unknown 
Source)
org.apache.derby.impl.store.raw.data.RAFContainer.reopenContainer(Unknown 
Source)
org.apache.derby.impl.store.raw.data.RAFContainer4.recoverContainerAfterInterrupt(Unknown
 Source)
org.apache.derby.impl.store.raw.data.RAFContainer4.readPage(Unknown Source)
org.apache.derby.impl.store.raw.data.RAFContainer4.getEmbryonicPage(Unknown 
Source)
org.apache.derby.impl.store.raw.data.RAFContainer.writeRAFHeader(Unknown Source)
org.apache.derby.impl.store.raw.data.RAFContainer.clean(Unknown Source)
org.apache.derby.impl.services.cache.ConcurrentCache.cleanAndUnkeepEntry(Unknown
 Source)
org.apache.derby.impl.services.cache.ClockPolicy.rotateClock(Unknown Source)
org.apache.derby.impl.services.cache.ClockPolicy.insertEntry(Unknown Source)
org.apache.derby.impl.services.cache.ConcurrentCache.insertIntoFreeSlot(Unknown 
Source)
org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source)
org.apache.derby.impl.store.raw.data.CachedPage.writePage(Unknown Source)
org.apache.derby.impl.store.raw.data.CachedPage.clean(Unknown Source)
org.apache.derby.impl.services.cache.ConcurrentCache.cleanAndUnkeepEntry(Unknown
 Source)
org.apache.derby.impl.services.cache.ConcurrentCache.cleanEntry(Unknown Source)
org.apache.derby.impl.services.cache.BackgroundCleaner.performWork(Unknown 
Source)
org.apache.derby.impl.services.daemon.BasicDaemon.serviceClient(Unknown Source)
org.apache.derby.impl.services.daemon.BasicDaemon.work(Unknown Source)
org.apache.derby.impl.services.daemon.BasicDaemon.run(Unknown Source)
java.lang.Thread.run(Thread.java:662)

This is 10.8.1.2 code. Note the call to 
RAFContainer4.recoverContainerAfterInterrupt. One theory could be that the 
background cleaner is interrupted during shutdown, but I have not been able to 
prove that using tracing.
Regarding a workaround, I talked a bit to Dag and Knut offline about this. 
Checkpointing the database just before shutdown may ensure that the background 
cleaner won't be running during shutdown.

> noConnectionAfterHardUpgrade in upgrade test fails intermittently (file 
> deletion)
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-5297
>                 URL: https://issues.apache.org/jira/browse/DERBY-5297
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>         Environment: Windows
>            Reporter: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-5297-1a-move_db_experiment.diff
>
>
> The test fixture noConnectionAfterHardUpgrade in the upgrade test fails 
> intermittently on Windows platforms. The symptom is that some of the database 
> files cannot be deleted.
> Example failure (excerpt, shortened paths, formatted):
> 1) Upgrade Tests from 10.8.1.2junit.framework.AssertionFailedError: Failed to 
> delete 3 files (root=singleUse\oneuseb2:
>     singleUse\oneuseb2\seg0\c790.dat   (isDir=false, canRead=true, 
> canWrite=true, size=8192),
>     singleUse\oneuseb2\seg0                (isDir=true, canRead=true, 
> canWrite=true, size=65536),
>     singleUse\oneuseb2                        (isDir=true, canRead=true, 
> canWrite=true, size=0)
> Log:
> (2011-06-25) 
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.6/testing/testlog/vista/1139564-suitesAll_diff.txt
> I think I've seen this failure before, but couldn't find it in the test logs.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to