Summary
We instantiate a class from a dynamically loaded shared library that internally uses enumerable_thread_specific to store some state. We then pass this instance to some parallel algorithm and perform work. When this functionality is exposed to Python, i.e. 1) constructing some object from a dynamically loaded library and 2) running some parallel algorithm on that object, we have a crash at the exit of the Python script whenever the dynamically loaded object interacts with its enumerable_thread_specific member before any parallel algorithm has been executed. If we run any parallel algorithm before constructing the instance, even an empty one, everything is fine. In pure C++ code the failure scenario of accessing the ETS before parallel algorithms does not cause a crash.
Version
oneTBB 2021.13.0
Environment
Fedora 41
GCC 14.2.1
Observed Behavior
Crash on exit from Python script
Expected Behavior
No crash
Steps To Reproduce
Any minimal reproducing example can be found here.