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

Unlock stream (cms-externals versionj) #6

Merged
1 commit merged into from
Jul 7, 2015

Conversation

bbockelm
Copy link

@bbockelm bbockelm commented Jul 5, 2015

OnReadTimeout will call OnError with the Stream's lock held.
This causes OnError to invoke the user's callback with the
Stream lock held, possibly causing a lock ordering issue.

This fixes an observed deadlock within CMSSW over the following
objects:

Thread 1
FileStateHandler::VectorRead takes FileStateHandler lock
Stream::Send tries to take Stream lock

Thread 5
FileTimer::Run takes FileTimer lock
FileStateHandler::Tick tries to take FileStateHandler

Thread 6
Stream::OnReadTimeout takes Stream lock
DelayedClose::HandleResponseWithHosts (this is callback code in CMSSW); this deletes a File object, which eventually calls
FileTimer::UnRegisterFileObject tries to take FileTimer lock

See discussion in https://hypernews.cern.ch/HyperNews/CMS/get/recoDevelopment/1362/1/1/1/1/1/1/1/1/1/1/1/1/1/2.html

OnReadTimeout will call OnError with the Stream's lock held.
This causes OnError to invoke the user's callback with the
Stream lock held, possibly causing a lock ordering issue.

This fixes an observed deadlock within CMSSW over the following
objects:

Thread 1
    FileStateHandler::VectorRead takes FileStateHandler lock
    Stream::Send tries to take Stream lock

Thread 5
    FileTimer::Run takes FileTimer lock
    FileStateHandler::Tick tries to take FileStateHandler

Thread 6
    Stream::OnReadTimeout takes Stream lock
    DelayedClose::HandleResponseWithHosts  (this is callback code in CMSSW); this deletes a File object, which eventually calls
    FileTimer::UnRegisterFileObject tries to take FileTimer lock
@bbockelm
Copy link
Author

bbockelm commented Jul 7, 2015

@smuzaffar @davidlange6

This is the PR we discussed in today's Core meeting.

@davidlange6
Copy link

@Degano - lets try to integrate this in 76x and then 75x (and then 74x after we digest)

ghost pushed a commit that referenced this pull request Jul 7, 2015
Unlock stream (cms-externals versionj)
@ghost ghost merged commit 0597009 into cms-externals:cms/v4.0.4 Jul 7, 2015
@ghost
Copy link

ghost commented Jul 7, 2015

Done, since tonight IBs didn't start already this should go in.

On Tue, Jul 7, 2015 at 10:28 PM, David Lange notifications@github.com
wrote:

@Degano https://github.com/degano - lets try to integrate this in 76x
and then 75x (and then 74x after we digest)


Reply to this email directly or view it on GitHub
#6 (comment).

smuzaffar added a commit to cms-sw/cmsdist that referenced this pull request Jul 9, 2015
silviodonato pushed a commit to silviodonato/cmsdist that referenced this pull request Nov 2, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants