New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed statics to thread_local in EgammaTowerIsolation #3550
Changed statics to thread_local in EgammaTowerIsolation #3550
Conversation
To quickly fix the thread safety problems, the static data members of EgammaTowerIsolation have been changed to be thread_local. This avoids disturbing the present behavior and client APIs while fixing the threading problems crashing jobs. However, this should not be considered the permanent solution. Instead the statics should become regular members and client code should stop making temporary EgammaTowerIsolation objects and instead keep reusing the one they make.
NOTE: This problem was missed by the static analyzer since the static analyzer crashed while trying to processes EgammaTowerIsolation.cc. |
@davidlange6 This was missed by helgrind in my original run :(. So a clean helgrind does not mean thread safe. |
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_1_X. Changed statics to thread_local in EgammaTowerIsolation It involves the following packages: RecoEgamma/EgammaIsolationAlgos @nclopezo, @cmsbuild, @anton-a, @thspeer, @slava77, @Degano can you please review it and eventually sign? Thanks. |
@nclopezo was the test for this started? |
looks like the comparison job is stuck |
…ationToThreadLocal Multithreading -- Changed statics to thread_local in EgammaTowerIsolation
To quickly fix the thread safety problems, the static data members
of EgammaTowerIsolation have been changed to be thread_local.
This avoids disturbing the present behavior and client APIs while
fixing the threading problems crashing jobs.
However, this should not be considered the permanent solution. Instead
the statics should become regular members and client code should
stop making temporary EgammaTowerIsolation objects and instead
keep reusing the one they make.