Skip to content

RootUtils: Workaround for root TClassTable locking issue.

Scott Snyder requested to merge ssnyder/athena:lock2.RootUtils-20220520 into master

TClassTable is an internal ROOT structure used to hold information about all classes known to ROOT, whether or not full dictionary information has been built. This is effectively a singleton; however, TClassTable itself contains no locking. Rather, it relies on the caller already having acquired the ROOT core mutex. In most cases, that happens. However, when a shared object containing ROOT dictionaries is loaded, calls are made to TClassTable to record the classes present in that dictionary. But, in that case, the core mutex is not acquired, resulting in a potential race.

This would be best addressed inside ROOT, by acquiring the lock in TGenericClassInfo::Init. As a temporary workaround, however, use the existing DSO hooks to acquire the root lock around all shared library loads.

cf ATR-25049.

Merge request reports