Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not kill all processes when MSG shuts down: simix will cleanup anyway
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 2 Oct 2012 09:51:38 +0000 (11:51 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 2 Oct 2012 09:51:38 +0000 (11:51 +0200)
Plus, it broke Java since this function is now called using atexit(),
and it seems that in Java, the thread running these functions is not
maestro. So our mechanism was trying to fire a simcall from this
thread, which is a Java system thread that is unknown from SimGrid.

As a result, the JVM was segfaulting when exiting.

src/msg/msg_global.c

index e30aa38..9daa413 100644 (file)
@@ -150,22 +150,14 @@ int MSG_process_killall(int reset_PIDs)
 
 }
 
 
 }
 
-/** \ingroup msg_simulation
- * \brief Clean the MSG simulation.
- *
- * This function is called automatically when the system process stops, so I guess that calling it manually is useless nowadays.
- */
 static void MSG_exit(void) {
   if (msg_global==NULL)
     return;
 static void MSG_exit(void) {
   if (msg_global==NULL)
     return;
-  XBT_DEBUG("Closing MSG");
 
 #ifdef HAVE_TRACING
   TRACE_surf_release();
 #endif
 
 
 #ifdef HAVE_TRACING
   TRACE_surf_release();
 #endif
 
-  MSG_process_killall(0);
-
   /* initialization of the action module */
   _MSG_action_exit();
 
   /* initialization of the action module */
   _MSG_action_exit();