[
https://issues.apache.org/jira/browse/IMAP-372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Charles updated IMAP-372:
------------------------------
Attachment: james-listener-deadlock-2.txt
H Andrzej,
Attached a deadlock stacktrace I had this morning.
It locks on SelectedMailboxImpl event() and not on msn() method like the thread
dump you uploaded. The place where it locks can vary (see also JAMES-1411 and
MAILBOX-183), but I agree that your patch should avoid that.
I am now running with the patch and will report any issue. I we don't here
anything for 2 weeks here, I will commit the patch.
Thx, Eric
> Deadlock in AbstractDelegatingMailboxListener under load
> --------------------------------------------------------
>
> Key: IMAP-372
> URL: https://issues.apache.org/jira/browse/IMAP-372
> Project: James Imap
> Issue Type: Bug
> Components: Mailbox
> Reporter: Andrzej Rusin
> Assignee: Eric Charles
> Attachments: james-listener-deadlock-2.txt, James Listener
> Deadlock.txt
>
>
> In AbstractDelegatingMailboxListener::event, firing the events inside the
> synchronized blocks causes a deadlock involving:
> lock on HashMapDelegatingMailboxListener::listeners
> (synchronized methods) lock on SelectedMailboxImpl
> In my example, these 3 methods got interlocked:
> AbstractDelegatingMailboxListener.addListener
> SelectedMailboxImpl.msn
> AbstractDelegatingMailboxListener.removeListener
> My idea to fix it is basically to take the for loop on mListeners outside the
> synchronized block in
> org.apache.james.mailbox.store.AbstractDelegatingMailboxListener.event(Event).
> That will not make the propagated event processing in SelectedMailboxImpl
> hit the synchronized lock on listeners.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]