[ 
https://issues.apache.org/jira/browse/ARTEMIS-2603?focusedWorklogId=373689&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-373689
 ]

ASF GitHub Bot logged work on ARTEMIS-2603:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Jan/20 16:08
            Start Date: 17/Jan/20 16:08
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on pull request #2946: 
ARTEMIS-2603 Deadlock between pageStore.getCurrentID and page.cleanup
URL: https://github.com/apache/activemq-artemis/pull/2946
 
 
   This happened when JournalStorageManager.startReplication and 
PageStore.cleanup were called between multiple threads.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 373689)
    Remaining Estimate: 0h
            Time Spent: 10m

> Deadlock on testsuite: PagingStoreImpl::getCurrentIDs is a read operation
> -------------------------------------------------------------------------
>
>                 Key: ARTEMIS-2603
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2603
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.12.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is fixing a deadlock found during a run on the testsuite.
> This is because we acquire a writeLock on getCurrentIDs without being needed.
> As we will always acquire a writeLock before writing a new file (opening a 
> new page)
> This would translate as a possible issue during startReplication if cleanup 
> happens at the same time.
> We turn of cleanup anyways to avoid this issue, but this would be an extra 
> care for the issue not happening.
> Java stack information for the threads listed above:
> ===================================================
> "Thread-4895":
>       at sun.misc.Unsafe.park(Native Method)
>       - parking to wait for  <0x00000007eff46968> (a 
> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
>       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
>       at 
> java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:943)
>       at 
> org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.getCurrentIds(PagingStoreImpl.java:1172)
>       at 
> org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.getPageInformationForSync(JournalStorageManager.java:744)
>       at 
> org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.startReplication(JournalStorageManager.java:672)
>       at 
> org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation$2.run(SharedNothingLiveActivation.java:178)
>       at java.lang.Thread.run(Thread.java:745)
> "Thread-0 
> (ActiveMQ-IO-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$7@58f73461)":
>       at sun.misc.Unsafe.park(Native Method)
>       - parking to wait for  <0x00000007f0101b20> (a 
> java.util.concurrent.locks.ReentrantReadWriteLock$FairSync)
>       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:967)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1283)
>       at 
> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:727)
>       at 
> org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.readLock(AbstractJournalStorageManager.java:403)
>       at 
> org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.pageClosed(JournalStorageManager.java:394)
>       at 
> org.apache.activemq.artemis.core.paging.impl.Page.close(Page.java:464)
>       - locked <0x00000007eff438e0> (a 
> org.apache.activemq.artemis.core.paging.impl.Page)
>       at 
> org.apache.activemq.artemis.core.paging.impl.Page.close(Page.java:450)
>       at 
> org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.openNewPage(PagingStoreImpl.java:1114)
>       at 
> org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.forceAnotherPage(PagingStoreImpl.java:601)
>       at 
> org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImpl.cleanupComplete(PageCursorProviderImpl.java:514)
>       at 
> org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImpl.cleanup(PageCursorProviderImpl.java:470)
>       - locked <0x00000007eff446f8> (a 
> org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImpl)
>       at 
> org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImpl$1.run(PageCursorProviderImpl.java:377)
>       at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
>       at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
>       at 
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66)
>       at 
> org.apache.activemq.artemis.utils.actors.ProcessorBase$$Lambda$2/1428475041.run(Unknown
>  Source)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
> Found 1 deadlock.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to