Salome HOME
[EDF29576] : orb.shutdown must be called last
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 7 Mar 2024 08:52:40 +0000 (09:52 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 7 Mar 2024 08:52:40 +0000 (09:52 +0100)
src/yacsloader/driver_internal.py

index 59f321ca6f0826955e57e43ebd2eeaa8586359fd..1c48c9f1da6b0b59d60503bf55938320eb817c4f 100644 (file)
@@ -251,7 +251,7 @@ def executeGraph( executor, xmlfilename, proc, dump, finalDump, display, shutdow
       self._lockFile = "{}.lock".format( os.path.splitext( os.path.basename(xmlfilename) )[0] )
     def __enter__(self):
       logging.info(f"Ready to launch thread of state dump with  dumpFile = {self._dumpFile}  lockFile = {self._lockFile}")
-      self._dump_thread = SALOMERuntime.ThreadDumpState(proc,dump,dumpFile,lockFile)
+      self._dump_thread = SALOMERuntime.ThreadDumpState(proc,dump,self._dumpFile,self._lockFile)
       self._dump_thread.start()
     def __exit__(self,exctype, exc, tb):
       self._dump_thread.join()
@@ -279,12 +279,12 @@ def executeGraph( executor, xmlfilename, proc, dump, finalDump, display, shutdow
   #
   salome.cm.SetDeltaTimeBetweenCPUMemMeasureInMilliSecond( 1000*CPUMemContainerTimeRes )
   # Start part of context manager instances
-  ctxManagers = MonitoringDirectories( DirectoriesToMonitor ) + MonitoringThisProcess(HTopOfThisProcessFile, HTopTimeRes) + MonitoringAllKernelServers(HTopOfAllServersFile, HTopOfAllServersTimeRes)
+  ctxManagers = [ AutoShutdown(proc,shutdown) ] # the first one must be this one. Because orb.shutdown must be called last !
+  #
+  ctxManagers += MonitoringDirectories( DirectoriesToMonitor ) + MonitoringThisProcess(HTopOfThisProcessFile, HTopTimeRes) + MonitoringAllKernelServers(HTopOfAllServersFile, HTopOfAllServersTimeRes)
   #
   if dump != 0:
     ctxManagers += [ AutoDumpThread(proc,dump,xmlfilename) ]
-  #
-  ctxManagers += [ AutoShutdown(proc,shutdown) ]
   # end of part of context managers
   with contextlib.ExitStack() as stack:
     for mgr in ctxManagers: