Bug 549813
| Summary: | dl_close() race with C++ destructor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Jon Thomas <jthomas> | ||||
| Component: | glibc | Assignee: | Andreas Schwab <schwab> | ||||
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 5.4 | CC: | drepper, ebachalo, fweimer, pmuller, rick.beldin, tao | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | glibc-2.5-54 | Doc Type: | Bug Fix | ||||
| Doc Text: |
A deadlock that could cause an application to hang could occur when the 'dlclose' function was called. This resulted in the cancellation of a thread. With this update, a deadlock no longer occurs when calling the 'dlclose' function.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-01-14 00:03:38 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Jon Thomas
2009-12-22 18:13:59 UTC
I attached the testcase.
untar, cd to C_Only, and use
make clean
make c_only
make tiny.so
export LD_LIBRARY_PATH=.
./c_only
you will see:
in init
> cancelability enabled.
started thread
loaded shared library
in fini
canceling thread
canceled thread
joining thread
and this is where it hangs.
It's a deadlock between dlclose and the cancellation handler which both want to lock GL(_dl_load_lock).
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
A deadlock that could cause an application to hang could occur when the 'dlclose' function was called. This resulted in the cancellation of a thread. With this update, a deadlock no longer occurs when calling the 'dlclose' function.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0109.html |