Delete pending task in SimGrid -


i have process worker launches executor. executor process creates 10-sec task , executes it. after 2 sec worker kills executor process. simgrid gives me log after killing executor:

[  2.000000] (0:maestro@) dp_objs: 1 pending task? 

how should destroy tasks , task_data when process kill working process?

int worker(int argc, char *argv[]) {     msg_process_t x = msg_process_create("", executor, null, msg_host_self());     msg_process_sleep(2);     msg_process_kill(x); }  int executor(){     msg_process_on_exit(my_onexit, null);     task = msg_task_create("", 1e10, 10, null);     msg_task_execute(task);     return 0; } int my_onexit() {      msg_task_cancel(task);      xbt_info("exiting (done sleeping or got killed).");      return 0; } 

upd: declared global variable msg_task_t task.

now when run code have:

[  2.000000] (0:maestro@) oops ! deadlock or code not clean. [  2.000000] (0:maestro@) 1 processes still running, waiting something. [  2.000000] (0:maestro@) legend of following listing: "process <pid> (<name>@<host>): <status>" [  2.000000] (0:maestro@) process 2 (@worker2) process finished exit code 134 (interrupted signal 6: sigabrt) 

i expected simgrid show xbt_info message, didn't , interrupted sigabrt error.

you should msg_task_cancel() task want "kill". in function registered in msg_process_on_exit() callback.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -