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

Dag H. Wanvik commented on DERBY-4920:
--------------------------------------

Interestingly, this happens after to an interrupt sent by Derby itself during 
shutdown, cf. BaseMonitor#shutdown ca line 176, where we see:

// Shutdown all threads by iterrupting them
contextService.notifyAllActiveThreads((Context) null);

Further down, we stop TopServices.shutdown, which is in the error trace stack.

So, this hang occurs during checkpointing when we are trying to recover an 
interrupted IO. Obviously, there is a bug.

But furthermore, I think this means that in the existing implementation, we 
would sometimes get shutdown
checkpointing interrupted after we introduced NIO in RAFContainer4. I am not 
aware that we had reports on this, presumably because Derby will recover from 
the logs anyway at the next reboot..

> suites.All stuck in RAFContainer4.awaitRestoreChannel()
> -------------------------------------------------------
>
>                 Key: DERBY-4920
>                 URL: https://issues.apache.org/jira/browse/DERBY-4920
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Dag H. Wanvik
>
> I have suites.All running on trunk, and it seems to be stuck in a call to 
> RAFContainer4.awaitRestoreChannel(). Here's the stack for the waiting thread:
> "main" prio=3 tid=0x08070800 nid=0x2 waiting on condition [0xfe61e000]
>    java.lang.Thread.State: TIMED_WAITING (sleeping)
>         at java.lang.Thread.sleep(Native Method)
>         at 
> org.apache.derby.impl.store.raw.data.RAFContainer4.awaitRestoreChannel(RAFContainer4.java:698)
>         at 
> org.apache.derby.impl.store.raw.data.RAFContainer4.writePage(RAFContainer4.java:593)
>         at 
> org.apache.derby.impl.store.raw.data.CachedPage.writePage(CachedPage.java:787)
>         at 
> org.apache.derby.impl.store.raw.data.CachedPage.clean(CachedPage.java:610)
>         at 
> org.apache.derby.impl.services.cache.ConcurrentCache.cleanAndUnkeepEntry(ConcurrentCache.java:551)
>         at 
> org.apache.derby.impl.services.cache.ConcurrentCache.cleanCache(ConcurrentCache.java:509)
>         at 
> org.apache.derby.impl.services.cache.ConcurrentCache.cleanAll(ConcurrentCache.java:460)
>         at 
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.checkpoint(BaseDataFileFactory.java:1211)
>         at 
> org.apache.derby.impl.store.raw.log.LogToFile.checkpointWithTran(LogToFile.java:1710)
>         at 
> org.apache.derby.impl.store.raw.log.LogToFile.checkpoint(LogToFile.java:1507)
>         at org.apache.derby.impl.store.raw.RawStore.stop(RawStore.java:368)
>         at 
> org.apache.derby.impl.services.monitor.TopService.stop(TopService.java:442)
>         at 
> org.apache.derby.impl.services.monitor.TopService.shutdown(TopService.java:393)
>         at 
> org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(BaseMonitor.java:229)
>         at 
> org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(BaseMonitor.java:199)
>         at 
> org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:231)
>         at 
> org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:119)
>         at java.sql.DriverManager.getConnection(DriverManager.java:582)
>         at java.sql.DriverManager.getConnection(DriverManager.java:154)
>         at 
> org.apache.derbyTesting.junit.DriverManagerConnector.getConnectionByAttributes(DriverManagerConnector.java:137)
>         at 
> org.apache.derbyTesting.junit.DriverManagerConnector.shutEngine(DriverManagerConnector.java:120)
>         at 
> org.apache.derbyTesting.junit.TestConfiguration.shutdownEngine(TestConfiguration.java:1599)
>         at 
> org.apache.derbyTesting.junit.SystemPropertyTestSetup.setUp(SystemPropertyTestSetup.java:83)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.extensions.TestSetup.run(TestSetup.java:25)
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.extensions.TestSetup.run(TestSetup.java:25)
>         at 
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
>         at junit.framework.TestSuite.runTest(TestSuite.java:230)
>         at junit.framework.TestSuite.run(TestSuite.java:225)
>         at junit.framework.TestSuite.runTest(TestSuite.java:230)
>         at junit.framework.TestSuite.run(TestSuite.java:225)
>         at junit.framework.TestSuite.runTest(TestSuite.java:230)
>         at junit.framework.TestSuite.run(TestSuite.java:225)
>         at junit.textui.TestRunner.doRun(TestRunner.java:121)
>         at junit.textui.TestRunner.start(TestRunner.java:185)
>         at junit.textui.TestRunner.main(TestRunner.java:143)

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

Reply via email to