[SERVER-3786] Segfault on unloading libmongoclient.so (built as a shared lib) in a thread other than the main thread Created: 08/Sep/11 Updated: 29/Feb/12 Resolved: 21/Jan/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Arseny Vakhrushev | Assignee: | Mathias Stearn |
| Resolution: | Cannot Reproduce | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Gentoo Linux x64 (mongoclient is built as a shared lib on Gentoo). No such issue on Arch where it's built as a static lib. |
||
| Attachments: |
|
| Operating System: | Linux |
| Participants: |
| Description |
|
Segfault when a thread other than the main thread of execution de-initializes tls (tsd). mongoclient.so should be dlopen-ed in that thread beforehand. Steps to reproduce: create thread Reproduce using the attached file: GDB output: Program received signal SIGSEGV, Segmentation fault. Try to change 'libmongoclient.so' to any other .so (e.g. libneon.so), and the problem is gone. The original source of the bug discovery was: Lua in a thread + LuaMongo driver. |
| Comments |
| Comment by Mathias Stearn [ 17/Oct/11 ] |
|
Due to some build issues I was previously unable to build the shared client. As of a fix I just pushed to master I am now able to build. I am not able to reproduce this using the latest code. Could you try a fresh checkout and see if it has been fixed for you as well? If not, please include some more info on your environment such as kernel, g++ and glibc versions. $ ./a.out && echo it worked |
| Comment by Arseny Vakhrushev [ 05/Oct/11 ] |
|
No progress on this issue? |