Pārlūkot izejas kodu

On watchdog expiry, raise SIGABRT instead of asserting 0, so it can be caught in gdb, also reset it to avoid keeping shouting

Samuel Thibault 11 gadi atpakaļ
vecāks
revīzija
7ae89db3bb
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      src/core/task.c

+ 3 - 1
src/core/task.c

@@ -1039,11 +1039,13 @@ static void *watchdog_func(void *foo STARPU_ATTRIBUTE_UNUSED)
 			if (getenv("STARPU_WATCHDOG_CRASH"))
 			{
 				fprintf(stderr,"Crashing the process\n");
-				assert(0);
+				raise(SIGABRT);
 			}
 			else
 				fprintf(stderr,"Set the STARPU_WATCHDOG_CRASH environment variable if you want to abort the process in such a case\n");
 		}
+		/* Only shout again after another period */
+		config->watchdog_ok = 1;
 	}
 	STARPU_PTHREAD_MUTEX_UNLOCK(&config->submitted_mutex);
 	return NULL;