summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fa88a12)
There is a weird bug with xbt_dynar_member on some systems.
When an exception is raised, backtracking mechanism of libc6 can cause segfaults (and valgrind complains quite a lot, even on systems where it does not crash)
Is this related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735090 ?
example obtained stack
Invalid read of size 4
at 0x476E383: backtrace (backtrace.c:141)
by 0x43DC03B: xbt_backtrace_current (backtrace_linux.c:84)
by 0x43DB200: xbt_dynar_search (dynar.c:474)
by 0x43DB31F: xbt_dynar_member (dynar.c:511)
by 0x80494A3: test_launcher (host_on_off_processes.c:35)
by 0x43C889E: smx_ctx_sysv_wrapper (smx_context_sysv.c:187)
by 0x46B2BDA: makecontext (makecontext.S:87)
As functionality is the same, using the exception-less version of xbt_dynar_member should avoid the problem, until we find out more about it
test = 1;
// Create a process running a simple task on a host and turn the host off during the execution of the process.
test = 1;
// Create a process running a simple task on a host and turn the host off during the execution of the process.
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
XBT_INFO("Test 1:");
XBT_INFO(" Create a process on Jupiter");
argvF = xbt_new(char*, 2);
XBT_INFO("Test 1:");
XBT_INFO(" Create a process on Jupiter");
argvF = xbt_new(char*, 2);
test = 2;
// Create a process that on a host that is turned off (this should not be possible)
test = 2;
// Create a process that on a host that is turned off (this should not be possible)
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
XBT_INFO("Test 2:");
XBT_INFO(" Turn off Jupiter");
// adsein: Jupiter is already, hence nothing should happen
XBT_INFO("Test 2:");
XBT_INFO(" Turn off Jupiter");
// adsein: Jupiter is already, hence nothing should happen
test = 3;
// Create a process running sucessive sleeps on a host and turn the host off during the execution of the process.
test = 3;
// Create a process running sucessive sleeps on a host and turn the host off during the execution of the process.
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
XBT_INFO("Test 3:");
MSG_host_on(jupiter);
argvF = xbt_new(char*, 2);
XBT_INFO("Test 3:");
MSG_host_on(jupiter);
argvF = xbt_new(char*, 2);
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
XBT_INFO("Test 4 (turn off src during a communication) : Create a Process/task to make a communication between Jupiter and Tremblay and turn off Jupiter during the communication");
MSG_host_on(jupiter);
MSG_process_sleep(10);
XBT_INFO("Test 4 (turn off src during a communication) : Create a Process/task to make a communication between Jupiter and Tremblay and turn off Jupiter during the communication");
MSG_host_on(jupiter);
MSG_process_sleep(10);
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
XBT_INFO("Test 5 (turn off dest during a communication : Create a Process/task to make a communication between Tremblay and Jupiter and turn off Jupiter during the communication");
MSG_host_on(jupiter);
MSG_process_sleep(10);
XBT_INFO("Test 5 (turn off dest during a communication : Create a Process/task to make a communication between Tremblay and Jupiter and turn off Jupiter during the communication");
MSG_host_on(jupiter);
MSG_process_sleep(10);
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node");
// Create VM0
XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node");
// Create VM0
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
- if (xbt_dynar_member(tests, &test)){
+ if (xbt_dynar_search_or_negative(tests, &test)!=-1){
}
XBT_INFO(" Test done. See you!");
}
XBT_INFO(" Test done. See you!");