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

rcache/base: do not release vma stuctures in vma_tree_delete #2703

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

hjelmn
Copy link
Member

@hjelmn hjelmn commented Jan 11, 2017

This commit fixes a deadlock that can occur when the libc version
holds a lock when calling munmap. In this case we could end up calling
free() from vma_tree_delete which would in turn try to obtain the lock
in libc. To avoid the issue put any deleted vma's in a new list on the
vma module and release them on the next call to vma_tree_insert. This
should be safe as this function is not called from the memory hooks.

Signed-off-by: Nathan Hjelm [email protected]

This commit fixes a deadlock that can occur when the libc version
holds a lock when calling munmap. In this case we could end up calling
free() from vma_tree_delete which would in turn try to obtain the lock
in libc. To avoid the issue put any deleted vma's in a new list on the
vma module and release them on the next call to vma_tree_insert. This
should be safe as this function is not called from the memory hooks.

Signed-off-by: Nathan Hjelm <[email protected]>
@hjelmn
Copy link
Member Author

hjelmn commented Jan 11, 2017

@bosilca Please test and let me know if this fixes #1654.

@hppritcha hppritcha added this to the v2.0.2 milestone Jan 11, 2017
@hppritcha
Copy link
Member

tentatively giving a 2.0.2 milestone.

@hjelmn
Copy link
Member Author

hjelmn commented Jan 12, 2017

@bosilca I am going to go ahead and merge this. Please test the v2.0.x PR.

@hjelmn hjelmn merged commit 91c34c8 into open-mpi:master Jan 12, 2017
@bosilca
Copy link
Member

bosilca commented Jan 12, 2017

I got a short allocation on the machine (a dozen runs) and I was not able to replicate. The original issue was only seldom triggered, so there is a chance I just got lucky this time.

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.

3 participants