Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reset t_simdata->comm after comm is over.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 1 Feb 2012 14:11:55 +0000 (15:11 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 1 Feb 2012 14:15:24 +0000 (15:15 +0100)
Fixes a segfault with chord on 100000 hosts, where the backtrace is:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b2bd2f in SIMIX_rdv_remove (comm=0x40bd4fd0, rdv=0x0) at ./src/simix/smx_network.c:117
117       xbt_fifo_remove(rdv->comm_fifo, comm);
(gdb) bt
 #0  0x00007ffff7b2bd2f in SIMIX_rdv_remove (comm=0x40bd4fd0, rdv=0x0) at ./src/simix/smx_network.c:117
 #1  SIMIX_comm_cancel (action=0x40bd4fd0) at ./src/simix/smx_network.c:754
 #2  0x00007ffff7b4046e in SIMIX_simcall_pre (simcall=0x613c90, value=0) at ./src/simix/smx_smurf.c:126
 #3  0x00007ffff7b407c6 in SIMIX_simcall_push (self=0x613c00) at ./src/simix/smx_smurf.c:26
 #4  0x00007ffff7a83a8d in simcall_comm_cancel (comm=0x40bd4fd0) at ./src/simix/smx_user.c:830
 #5  MSG_task_cancel (task=0x45ba4eb0) at ./src/msg/msg_task.c:223
 #6  0x00007ffff7a83bc0 in MSG_task_destroy (task=0x45ba4eb0) at ./src/msg/msg_task.c:187
 #7  0x00007ffff7ac3ebb in SIMIX_comm_destroy (action=0x42078370) at ./src/simix/smx_network.c:274
 #8  0x00007ffff7a9603c in SIMIX_process_cleanup (process=0x1ce9da60) at ./src/simix/smx_process.c:87
 #9  0x00007ffff7b40208 in SIMIX_simcall_pre (simcall=0x1ce9daf0, value=0) at ./src/simix/smx_smurf.c:323
 #10 0x00007ffff7b2554e in SIMIX_run () at ./src/simix/smx_global.c:207
 #11 0x00007ffff7b256e7 in MSG_main () at ./src/msg/msg_global.c:155
 #12 0x000000000040180b in main (argc=3, argv=<optimized out>) at ./examples/msg/chord/chord.c:918

Git bisect identified commit 6dcde87 as culprit (Use isend
instead of send to set the simdata->comm so that get_remaining
can work.)

src/msg/msg_mailbox.c

index 4eb5053..c03ab29 100644 (file)
@@ -186,7 +186,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
     t_simdata->isused = 0;
   }
 
     t_simdata->isused = 0;
   }
 
-
+  t_simdata->comm = NULL;
   p_simdata->waiting_task = NULL;
 #ifdef HAVE_TRACING
   if (call_end)
   p_simdata->waiting_task = NULL;
 #ifdef HAVE_TRACING
   if (call_end)