Some further debugging with jstack reveals that there is a deadlock caused by the RenameListener in the Parameterized Trigger plugin. (See attached jstack output.)

For each doDelete request that comes in, the thread first holds a lock on itself (via synchronized) in the delete method on Project (extends Job). Each job then winds up calling the RenameListener in the ParameterizedTrigger plugin. The RenameListener iterates over all projects, calling getPublishersList which is also synchronized.

When delete A and delete B come in at the same time, job A and B are locked, and then B's RenameListener blocks on A and vice versa.

It looks like getPublishersList() is synchronized just for safety in initializing the publishers list. A potential fix might be to use AtomicReference instead.

Note that any fix would need to be applied to the other lazy initialized fields in Project (getBuildersList or getBuildWrappersList).

Change By: Emil Sit (12/Jun/13 4:44 PM)
Attachment: jenkins-18169-jstack-deadlock.txt
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

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to