-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unify cint root mutex #14
Unify cint root mutex #14
Commits on Feb 26, 2014
-
Clean up the way externals are picked up.
Same as: root-5.34.02-externals.
Configuration menu - View commit details
-
Copy full SHA for 7ac7b02 - Browse repository at this point
Copy the full SHA 7ac7b02View commit details -
Same as root-5.28-00d-roofit-silence-static-printout.patch
Configuration menu - View commit details
-
Copy full SHA for ef0cc3e - Browse repository at this point
Copy the full SHA ef0cc3eView commit details -
Same as root-5.34.00-linker-gnu-hash-style.patch.
Configuration menu - View commit details
-
Copy full SHA for 3cd5017 - Browse repository at this point
Copy the full SHA 3cd5017View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b06a25 - Browse repository at this point
Copy the full SHA 5b06a25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 606e243 - Browse repository at this point
Copy the full SHA 606e243View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d13b44 - Browse repository at this point
Copy the full SHA 6d13b44View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b092e4 - Browse repository at this point
Copy the full SHA 1b092e4View commit details -
Thread-safe determination of TObject::IsOnHeap()
The previous mechanism of determining TObject::IsOnHeap() was found to be inaccurate and thread unsafe. The new way is to fill the memory area returned by calls to TObject::new with a special value and as the first operation in TObject's constructor look to see if the uninitialized member data have that value set. If they do we assume the object was made via a call to 'new' and therefore is on the heap. The interface in TStorage used to implement the old mechanism has been declared obsolete via the use of ::Obsolete.
Configuration menu - View commit details
-
Copy full SHA for 2e422ce - Browse repository at this point
Copy the full SHA 2e422ceView commit details -
Removed use of TStorage::IsOnHeap
This is the only use of TStorage::IsOnHeap outside of TObject constructor. It appears to be checking to see if the object might not be available anymore and if so don't talk to it. This test is highly inadequate to answer that question and since we want to get rid of TStorage::IsOnHeap for other reasons, it was decided to remove its use here.
Configuration menu - View commit details
-
Copy full SHA for b22c22f - Browse repository at this point
Copy the full SHA b22c22fView commit details -
Made TClass::fgCallingNew a thread_local file scope static
In order to avoid thread-safety issues, the static class member TClass::fgCallingNew is no longer a class member and is instead a file scoped static declared thread_local. It was necessary to not have it is a class member since CINT could not parse the new thread_local keyword.
Configuration menu - View commit details
-
Copy full SHA for e514c79 - Browse repository at this point
Copy the full SHA e514c79View commit details -
Don't reset global in TClass::New
Helgrind was complaining about a global being written without a lock. In this case, the global is not actually changed so we do a check to see if the old value was the same as the value we set and if so, we don't bother to change it.
Configuration menu - View commit details
-
Copy full SHA for f9d1a25 - Browse repository at this point
Copy the full SHA f9d1a25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4627669 - Browse repository at this point
Copy the full SHA 4627669View commit details -
Merge pull request root-project#3 from ktf/import-cms-patches
Import cms patches
Configuration menu - View commit details
-
Copy full SHA for 7925282 - Browse repository at this point
Copy the full SHA 7925282View commit details -
Fast and dirty version of setting special value in TObject::new
Write special values into memory after TObject::new called in order to have TObject's constructor determine if the object was made on the heap.
Configuration menu - View commit details
-
Copy full SHA for 6001a66 - Browse repository at this point
Copy the full SHA 6001a66View commit details -
Removed obsolete static member data and obsolete function bodies. Added ::Obsolete calls where appropriate.
Configuration menu - View commit details
-
Copy full SHA for 7d65924 - Browse repository at this point
Copy the full SHA 7d65924View commit details -
Encapsulate check on alloc in TStorage::FilledByObjectAlloc
Instead of having TObject's constructors know explicitly about how TStorage::ObjectAlloc works, we no encapsulate that knowledge into TStorage::FilledByObjectAlloc. Additionally, switched from fBits to fUniqueID when checking for assignment from 'new' in order to more easily create a valgrind suppression entry.
Configuration menu - View commit details
-
Copy full SHA for f1f9d3b - Browse repository at this point
Copy the full SHA f1f9d3bView commit details -
Added suppression entries for determining if TObject on heap
To determine if TObject is on the heap we read the value of a member data before it has been set by the constructor. If it was heap allocated the TObject::operator new will have filled special values into the memory area. However, for stack allocated it is unset. This makes valgrind report an error. Given we intend this behavior, we suppress the message.
Configuration menu - View commit details
-
Copy full SHA for d7e3e1b - Browse repository at this point
Copy the full SHA d7e3e1bView commit details -
Make variable used for GUID of TKeys atomic
Since TKeys can be made by different threads, it is necessary to protect the global used to assign the GUID of TKeys, keyAbsNumber so that we are guaranteed to get a unique value for each request. C++11 atomics give that guarantee.
Configuration menu - View commit details
-
Copy full SHA for 90ab19a - Browse repository at this point
Copy the full SHA 90ab19aView commit details -
Protect Cintex structure with mutex
The caching of TClasses by Cintext could be updated at anytime and therefore needs to be protected when running multi-threaded.
Configuration menu - View commit details
-
Copy full SHA for 3b1874a - Browse repository at this point
Copy the full SHA 3b1874aView commit details -
The zip functions use globals to hold state while calling from function to function. Such use is not thread safe. Given the globals are only used during a function call chain, it is safe to change them to thread local. Given this is compiled by a C compiler, we must use the gcc specific __thread keyword.
Configuration menu - View commit details
-
Copy full SHA for 11b1179 - Browse repository at this point
Copy the full SHA 11b1179View commit details -
Protect access to TROOT::GetListOfFiles()
When new files are opened or closed, gROOT->GetListOfFiles() is updated. If the opening/closing happens on different threads then we need to serialize all access to that list. This changes uses gROOTMutex to serialize those accesses.
Configuration menu - View commit details
-
Copy full SHA for 6517b5e - Browse repository at this point
Copy the full SHA 6517b5eView commit details -
Protected threaded access to TClass::GetStreamerInfos()
The list of TStreamerInfos held by a TClass can change while processing and therefore access to it must be protected when using multiple threads. The gCINTMutex is used for this purpose since the TClass is considered part of the CINT data model.
Configuration menu - View commit details
-
Copy full SHA for e2251f6 - Browse repository at this point
Copy the full SHA e2251f6View commit details -
Thread safe caching of TStreamerInfo in TBranchSTL
We now protect all threaded access to TClass::GetStreamerInfos. In addition this change properly handles updating the TStreamerInfo cache in a thread safe manner.
Configuration menu - View commit details
-
Copy full SHA for bf04e1c - Browse repository at this point
Copy the full SHA bf04e1cView commit details -
Only set TStreamerInfo to unoptimized if it is optimized
When running with multiple threads, we need to avoid unnecessary changes to TStreamerInfos. Therefore we check to see if the TStreamerInfo is optimized before setting it as unoptimized and rebuild it.
Configuration menu - View commit details
-
Copy full SHA for a5752af - Browse repository at this point
Copy the full SHA a5752afView commit details -
Fix threading issues in TClass
The following threading issues were corrected - TROOT::GetListOfClasses was protected via gCINTMutex - Access to TStreamerInfo lists were protected via gCINTMutex - Setting of the cache for current TStreamerInfo and for the list of conversion TStreamerInfos is protected via std::atomic<>
Configuration menu - View commit details
-
Copy full SHA for 0f9bbe8 - Browse repository at this point
Copy the full SHA 0f9bbe8View commit details -
Made TPluginManager thread-safe for I/O
Several changes were needed to make this thread-safe for the I/O case 1) Protect the list of handlers with its own Mutex 2) Use a thread_local variable to hold the status of reading a directory 3) Use gCINTMutex to protect access to fBasesLoaded. Had to use gCINTMutex since we need threads trying to read the same dirs to wait for the first reader to finish so the lock has to be held over the whole call. In addition, gCINTMutex is sometimes taken before and sometimes during the call so using a different mutex would lead to a deadlock situation. NOTE: fReadingDirs is not used anymore but is still in the code to allow binary compatibility to easy testing. This should be removed in the future.
Configuration menu - View commit details
-
Copy full SHA for bb39bbc - Browse repository at this point
Copy the full SHA bb39bbcView commit details -
Mutex lock removed from TStorage::ObjectDealloc to avoid deadlocks
The order of locks between gGlobalMutex and gCINTMutex is undefined and TStorage::ObjectDealloc calls were involved in order reversal problems. As it turned out, there is no data structure that needs protecting in TStorage::ObjectDealloc so we do not need the lock.
Configuration menu - View commit details
-
Copy full SHA for c417108 - Browse repository at this point
Copy the full SHA c417108View commit details -
Use thread_local for statics in TUUID
TUUID used statics that were causing race conditions. The fix was to change the statics to thread_local.
Configuration menu - View commit details
-
Copy full SHA for c9698f7 - Browse repository at this point
Copy the full SHA c9698f7View commit details -
Fix thread-safety issues with TError
-There was a potential deadlock situation between gErrorMutex and gCINTMutex. The fix was to limit the scope of gErrorMutex locks -Changed buffers from static to static thread_local. This allowed gErrorMutex to be more limited in scope.
Configuration menu - View commit details
-
Copy full SHA for ed8dba6 - Browse repository at this point
Copy the full SHA ed8dba6View commit details -
Use gCINTMutex to protect access to G__getgvp
This fixed a problem found by helgrind.
Configuration menu - View commit details
-
Copy full SHA for 8bd0dcb - Browse repository at this point
Copy the full SHA 8bd0dcbView commit details -
Use gCINTMutex to protect access to TBaseClass::Property
Helgrind found a race condition involving TClass::GetBaseClassOffsetRecurse calling TBaseClass::Property.
Configuration menu - View commit details
-
Copy full SHA for ae1d5e8 - Browse repository at this point
Copy the full SHA ae1d5e8View commit details -
Fix thread-safety problems with cleanup of containers
Both TList and TObjArray modify gROOT::GetListOfCleanups() as part of their cleanup methods. This change uses gROOTMutex to protect that list.
Configuration menu - View commit details
-
Copy full SHA for 6f5e0a0 - Browse repository at this point
Copy the full SHA 6f5e0a0View commit details -
Fix thread-safety issues of StreamerInfos
-Made TStreamerInfo::fgElement thread_local -Added an additional test bit to avoid rerunning TStreamerInfo::BuildOld. This avoids many cases of changing a TStreamerInfo once it is already in use.
Configuration menu - View commit details
-
Copy full SHA for 545c70e - Browse repository at this point
Copy the full SHA 545c70eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ecbe8cc - Browse repository at this point
Copy the full SHA ecbe8ccView commit details -
Properly avoid repeated calls to TStreamerInfo::Build*
-Internal cloning of TStreamerInfo resets kBuildOldUsed so BuildOld will run -BuildOld calls itself recursively so we only set kBuildOldUsed once we leave the function -Avoid repeated calls to Build These changes are needed to avoid having multiple threads do the same work on the same TStreamerInfos which can cause interference between threads.
Configuration menu - View commit details
-
Copy full SHA for 551a92c - Browse repository at this point
Copy the full SHA 551a92cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 25d5ea5 - Browse repository at this point
Copy the full SHA 25d5ea5View commit details -
Made TROOT ReadingObject methods thread safe
Made use of a thread_local to hold the ReadingObject status since the status is only meant to apply to a call chain.
Configuration menu - View commit details
-
Copy full SHA for 8ff03b1 - Browse repository at this point
Copy the full SHA 8ff03b1View commit details -
Made global counters in TFile atomic
To properly handle cases where different TFiles are being used on different threads, the various global counters in TFile were converted to std::atomic<>.
Configuration menu - View commit details
-
Copy full SHA for 15d51d1 - Browse repository at this point
Copy the full SHA 15d51d1View commit details -
Used std::atomic to protect TStreamerInfo counters
fLiveCount and fgCount are now atomic since they can be read/modified on different threads without a mutex.
Configuration menu - View commit details
-
Copy full SHA for 40ebff6 - Browse repository at this point
Copy the full SHA 40ebff6View commit details -
Use std::atomic to protect access to TClass state
Changed fVersionUsed and fgClassCount of TClass to be std::atomic since both could be read/modified from different threads without a mutex. Also put back fgCallingNew as a class member to minimize code changes with non-thread safe version.
Configuration menu - View commit details
-
Copy full SHA for fba383e - Browse repository at this point
Copy the full SHA fba383eView commit details -
Need to reset kBuildOldUsed bit when reading TStreamerInfo
The kBuildOldUsed bit is transient, like kIsCompiled, and therefore must be reset when a TStreamerInfo is read from a file.
Configuration menu - View commit details
-
Copy full SHA for 6659ee5 - Browse repository at this point
Copy the full SHA 6659ee5View commit details -
Need to use CINT mutex in Cintex::Callback::operator()
During the call the Cintex::Callback::operator(), several CINT data structures are modified and therefore we must take the lock.
Configuration menu - View commit details
-
Copy full SHA for 8e6ccdd - Browse repository at this point
Copy the full SHA 8e6ccddView commit details -
Minimize the time spent holding the Cintex mutex lock
To avoid lock order problems, we minimize the time spend holding the Cintex lock by ROOTClassEnhancer. In addition, there was a race condition in the previous code during the returning of the value. That race condition is now fixed.
Configuration menu - View commit details
-
Copy full SHA for ea025ac - Browse repository at this point
Copy the full SHA ea025acView commit details -
Make last error string in TSystem a thread_local
To handle errors occuring on different threads, the caching of the last error string was changed from being a member data to a class static thread_local. This meshes well with Unix since errno is a thread local there.
Configuration menu - View commit details
-
Copy full SHA for 865a401 - Browse repository at this point
Copy the full SHA 865a401View commit details -
Thread safety fixes for TUnixSystem
TSystem changed the last error string to be a class thread_local so this code matches that change. Caching of external path is now a thread_local to avoid race conditions. Caching of initial time is done via an atomic.
Configuration menu - View commit details
-
Copy full SHA for 48a6405 - Browse repository at this point
Copy the full SHA 48a6405View commit details -
Use Mutex to protect gObjectVersionRepository
TClass.cxx has a file scope global gObjectVersionRepository which can be modified simultaneously on multiple threads. Therefore it needed a mutex lock when reading/writing.
Configuration menu - View commit details
-
Copy full SHA for 371da00 - Browse repository at this point
Copy the full SHA 371da00View commit details -
TStreamerElement cached strings changed to thread_local
Full name and include name were statics which were set the first time called. This was not thread safe. These were changed to thread_local. Alternatively, this could be change to use std::call_once.
Configuration menu - View commit details
-
Copy full SHA for 7033522 - Browse repository at this point
Copy the full SHA 7033522View commit details -
Fix thread-safety issues with string formating
The stand-alone formating functions return a pointer to a static buffer. That is not thread-safe since the buffer could be updated on a different thread while another thread is reading it. This change makes the static buffer variable thread_local.
Configuration menu - View commit details
-
Copy full SHA for 049ebd7 - Browse repository at this point
Copy the full SHA 049ebd7View commit details -
Classes which inherit from TObject have a fgIsA class member defined by the code generator. However, the value for fgIsA is set lazily and therefor must be protected in a threaded environment. fgIsA was changed to be std::atomic<> and the setting of the value was protected by gCINTMutex to avoid having the calculation done more than once.
Configuration menu - View commit details
-
Copy full SHA for dde43fd - Browse repository at this point
Copy the full SHA dde43fdView commit details -
Fix caching bug in ROOTClassEnhancer::IsA
When looking up the value of a cache in the map, it was possible to temporarily have fLastClass and fLastType out of synch and cause the program to return the wrong TClass.
Configuration menu - View commit details
-
Copy full SHA for 0266347 - Browse repository at this point
Copy the full SHA 0266347View commit details -
Avoid holding gCINTMutex and gROOTMutex simultaneously in TPluginManager
By having a TObjArray be deleted outside of the gCINTMutex lock we no longer have both mutexes being held at the same time and therefore we avoid potential deadlocks.
Configuration menu - View commit details
-
Copy full SHA for 44e5441 - Browse repository at this point
Copy the full SHA 44e5441View commit details -
Merge pull request root-project#4 from ktf/fix-mt-io
Fix multithreading issues in ROOT I/O
Configuration menu - View commit details
-
Copy full SHA for 7f9948f - Browse repository at this point
Copy the full SHA 7f9948fView commit details
Commits on Feb 27, 2014
-
Worked around ambiguity in C++ for fgIsA and std::atomic<>
The code created by genreflex was including the default namespace qualifyer '::' on all class names. However, this lead to a C++ language ambiguity when parsing std::atomic<TClass*> ::Foo::fgIsA = 0 where the parser treats that as being std::atomic<TClass*>::Foo::fgIsA = 0 and fails since Foo is not a type defined in std::atomic<>. The fix was to remove the '::' when generating the code. This then matches what Cint does when generating the code.
Configuration menu - View commit details
-
Copy full SHA for 9524f6c - Browse repository at this point
Copy the full SHA 9524f6cView commit details -
Merge pull request root-project#5 from Dr15Jones/fixGenreflexProblemW…
…ithfgIsA Worked around ambiguity in C++ for fgIsA and std::atomic<>
Configuration menu - View commit details
-
Copy full SHA for 705062d - Browse repository at this point
Copy the full SHA 705062dView commit details
Commits on Feb 28, 2014
-
Configuration menu - View commit details
-
Copy full SHA for b262c2c - Browse repository at this point
Copy the full SHA b262c2cView commit details -
Merge pull request root-project#6 from ktf/remove-arm-fix
Revert "Fix trampolines for ARM."
Configuration menu - View commit details
-
Copy full SHA for 1c5a843 - Browse repository at this point
Copy the full SHA 1c5a843View commit details
Commits on Mar 20, 2014
-
Make gCintMutex and gROOTMutex use the same mutex
In order to avoid deadlocking, the variables gCintMutex and gROOTMutex now point to the same underlying mutex. The mutex is also created when TThread::Init() is first called rather than doing it lazily.
Configuration menu - View commit details
-
Copy full SHA for 814e69c - Browse repository at this point
Copy the full SHA 814e69cView commit details