TBB failed to destroy TLS storage: Invalid argument Aborted

TBB failed to destroy TLS storage: Invalid argument Aborted

I'm using OpenCV subversion-R5234built upon tbb 3.0 . When I tried to run one of my application, I got the following error message, but I've got no idea why is it so?

terminate called after throwing an instance of 'std::runtime_error' what(): TBB failed to destroy TLS storage: Invalid argumentAborted

Well, I'm using Ubuntu 11.04 upgraded from Ubunt 10.10 ... Any suggestions?Best RegardsPei

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This message means that TBB was unable to delete a thread-local key it used, i.e. that pthread_key_delete() call returned an error. The solution to throw an exception might be considered too harmful for the problem, but that's the way it is, for now. Note that destruction of the TLS key only happens when TBB shuts down completely, i.e. either when the process completes or the library is unloaded. The last scenario, unfortunately, is known to be a tough nut for us: we already fixed some bugs related to that, but I'm afraid some more may still lurk there.

I am experiencing this behaviour as well. The program works fine, but throws this error and abort in the end. The problem is I am trying to use my program in a script, and I want to access its exit code. Any workaround or fixes?Thanks!

I could only assume that a problem happens in a method that releases resources before an application exits.

Did you try to look at:

void governor::release_resources()
int status = theTLS.destroy();

and try to step-into 'theTLS.destroy' method to understand what is going on and why it returns non-zero.

An error during destruction of the internal thread local storage will no longer results in an exception in the next stable release of TBB.

Leave a Comment

Please sign in to add a comment. Not a member? Join today