]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
workaround for ROOT bug: in order to avoid crashes when unloading
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Apr 2007 11:29:26 +0000 (11:29 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Apr 2007 11:29:26 +0000 (11:29 +0000)
dynamic libraries via gSystem, the libraries are not unloaded
further investigation necessary

HLT/BASE/AliHLTComponentHandler.cxx
HLT/ChangeLog

index 6d1cf4b62a07d2645bc220b74743adce7692c7c3..28a829399f0169f756cf6479ed113d722ee588dd 100644 (file)
@@ -341,7 +341,24 @@ int AliHLTComponentHandler::UnloadLibrary(AliHLTComponentHandler::AliHLTLibHandl
   int* pCount=reinterpret_cast<int*>(handle.handle);
   if (--(*pCount)==0) {
     if (pName) {
+      /** Matthias 26.04.2007
+       * I spent about a week to investigate a bug which seems to be in ROOT.
+       * Under certain circumstances, TSystem::Unload crashes. The crash occured
+       * for the first time, when libAliHLTUtil was loaded from AliHLTSystem right
+       * after the ComponentHandler was created. It does not occur when dlopen is
+       * used. 
+       * It has most likely to do with the garbage collection and automatic
+       * cleanup in ROOT. The crash occurs when ROOT is terminated and before
+       * an instance of AliHLTSystem was created.
+       *   root [0] AliHLTSystem gHLT
+       * It does not occur when the instance was created dynamically (but not even
+       * deleted)
+       *   root [0] AliHLTSystem* gHLT=new AliHLTSystem
+       *
+       * For that reason, the libraries are not unloaded here, even though there
+       * will be memory leaks.
       gSystem->Unload(pName->Data());
+       */
     }
     else {
       HLTError("missing library name, can not unload");
index 60b19aab470261da647fa28bd46b70d1f4b8dc24..906adb9028b55671c77a6d22f129689f9e8c8745 100644 (file)
@@ -4,6 +4,9 @@
        - libHLTbase free of AliRoot dependencies
        - dynamic loeding of AliLog support
        - AliHLTFileWriter moved to libAliHLTUtil
+       - workaround for ROOT bug: in order to avoid crashes when unloading 
+         dynamic libraries via gSystem, the libraries are not unloaded
+         further investigation necessary
 2007-04-17 HLT sample applications
        - publisher for AliLoader trees added
        - sample analysis chain added tp sample lib