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

Use scoped lock inside mac-specific XrdSysSemaphore implementation to avoid deadlock on thread cancellation #3

Merged
merged 1 commit into from Apr 10, 2013

Conversation

jlsalmon
Copy link
Contributor

If a thread is waiting inside XrdSysCondVar::Wait and the thread is cancelled, the mutex is not released, therefore causing deadlock when other threads attempt to lock it.

The simple fix is to use a scoped lock to ensure the mutex is unlocked in the destructor if the thread is cancelled.

@ljanyst
Copy link
Contributor

ljanyst commented Apr 10, 2013

Great job figuring this out! Thank you! :)

ljanyst added a commit that referenced this pull request Apr 10, 2013
Use scoped lock inside mac-specific XrdSysSemaphore implementation to avoid deadlock on thread cancellation
@ljanyst ljanyst merged commit be96c74 into xrootd:master Apr 10, 2013
@esindril esindril mentioned this pull request Nov 4, 2013
ljanyst pushed a commit that referenced this pull request Mar 16, 2015
ljanyst pushed a commit that referenced this pull request Mar 16, 2015
@esindril esindril mentioned this pull request Sep 22, 2015
@wyang007 wyang007 mentioned this pull request Oct 17, 2020
@abh3 abh3 mentioned this pull request Feb 11, 2022
@stlammel stlammel mentioned this pull request Dec 15, 2022
amadio pushed a commit to amadio/xrootd that referenced this pull request May 12, 2023
Adapt to changes in ceph 15.1.1
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

2 participants