Boost logo

Boost Users :

Subject: [Boost-users] Manually cleaning up TSS data in boost 1.49
From: Andrew Harvey (andrew.rossharvey_at_[hidden])
Date: 2012-11-26 16:12:16


Hi,

I am using boost::thread for a plug-in that is loaded by a third-party
Linux application. I have no control over the host's threading or when it
chooses to unload my code.

Unfortunately I experience a crash every time the host thread unloads the
.so and terminates. I get the following backtrace:

(gdb) bt
#0 0x00007fffde12c460 in ?? ()
#1 0x00000032cf607889 in start_thread () from /lib64/libpthread.so.0
#2 0x00000032cf2e5ccd in clone () from /lib64/libc.so.6

Not much to go on...

I am pretty confident the crash is happening in a pthread key destructor
registered by Boost. The only parts of the boost::thread library I am
currently using are the synchronization classes:

shared_mutex,
shared_lock,
unique_lock,
upgrade_lock,
upgrade_to_unique_lock

I'm not directly using any thread-specific storage myself.

What I would like to do is force boost to call its TSS destructor in my
plug-in's destroy_dso() function. Is this at all possible?

Many thanks,

- Andrew



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net