Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid deadlock by taking SharedResource lock first #9483

Conversation

Dr15Jones
Copy link
Contributor

Tests running unscheduled workflows found a deadlock do to a legacy
module doing an unscheduled get from another legacy module while another
thread was trying to run the second legacy module. This caused the order
of locks (module lock then legacy lock) to be changed for the second
module which lead to the deadlock.

This change is a temporary workaround in which we take the legacy lock
before the module lock. This work most of the time but still can cause
a deadlock for the case of two 'one' modules both with different shared
resources but one of them calling a legacy module (which tries to take
locks to all resources). A complete fix is forth coming.

Tests running unscheduled workflows found a deadlock do to a legacy
module doing an unscheduled get from another legacy module while another
thread was trying to run the second legacy module. This caused the order
of locks (module lock then legacy lock) to be changed for the second
module which lead to the deadlock.

This change is a temporary workaround in which we take the legacy lock
before the module lock. This work most of the time but still can cause
a deadlock for the case of two 'one' modules both with different shared
resources but one of them calling a legacy module (which tries to take
locks to all resources). A complete fix is forth coming.
@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2015

A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_4_X.

Avoid deadlock by taking SharedResource lock first

It involves the following packages:

FWCore/Framework

@cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @wddgit, @wmtan this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@Dr15Jones
Copy link
Contributor Author

please test

@Dr15Jones
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2015

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_4_X IBs unless changes or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_4_X IBs unless changes or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_4_X IBs unless changes (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Jun 6, 2015
…sourceLockFirst

Avoid deadlock by taking SharedResource lock first
@cmsbuild cmsbuild merged commit a8db4d8 into cms-sw:CMSSW_7_4_X Jun 6, 2015
@Dr15Jones Dr15Jones deleted the avoidDeadlockByTakingSharedResourceLockFirst branch August 14, 2015 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants