From 6f1c4b2901f10b31d00b9438223f0e814a6f435f Mon Sep 17 00:00:00 2001 From: lyuxiaosu Date: Thu, 29 Jul 2021 15:13:45 -0500 Subject: [PATCH] remove assert(runtime_preemption_enabled) since the signal might be SIGINT --- runtime/src/software_interrupt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/src/software_interrupt.c b/runtime/src/software_interrupt.c index fd63847..dc2f5da 100644 --- a/runtime/src/software_interrupt.c +++ b/runtime/src/software_interrupt.c @@ -137,6 +137,8 @@ software_interrupt_validate_worker() * The handler function for Software Interrupts (signals) * SIGALRM is executed periodically by an interval timer, causing preemption of the current sandbox * SIGUSR1 restores a preempted sandbox + * SIGINT recieved by a worker threads and propagate to other worker threads. When one worker thread + * receives a SIGINT that is not from kernel, dump all memory log to a file and then exit. * @param signal_type * @param signal_info data structure containing signal info * @param user_context_raw void* to a user_context struct @@ -148,7 +150,8 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void assert(!listener_thread_is_running()); /* Signals should be masked if runtime has disabled them */ - assert(runtime_preemption_enabled); + /* This is not applicable anymore because the signal might be SIGINT */ + //assert(runtime_preemption_enabled); /* Signals should not nest */ /* TODO: Better atomic instruction here to check and set? */