fix assert failed problem: assert failed at current_sandbox is not in RUNNING_STATE

main
xiaosuGW 3 years ago
parent 4d82a7c030
commit bf306fc0c9

@ -29,8 +29,8 @@ sandbox_set_as_running(struct sandbox *sandbox, sandbox_state_t last_state)
sandbox->runnable_duration += duration_of_last_state;
current_sandbox_set(sandbox);
runtime_worker_threads_deadline[worker_thread_idx] = sandbox->absolute_deadline;
mem_log("time %lu sandbox starts running, request id:%d name %s obj=%p remaining slack %lu, last_rs %lu now %lu last %lu \n", start_execution,
sandbox->id, sandbox->module->name, sandbox, sandbox->remaining_slack, last_rs, now, last);
//mem_log("time %lu sandbox starts running, request id:%d name %s obj=%p remaining slack %lu, last_rs %lu now %lu last %lu \n", start_execution,
// sandbox->id, sandbox->module->name, sandbox, sandbox->remaining_slack, last_rs, now, last);
/* Does not handle context switch because the caller knows if we need to use fast or slow switched */
break;
}

@ -210,7 +210,7 @@ scheduler_preempt(ucontext_t *user_context)
struct sandbox *current = current_sandbox_get();
assert(current != NULL);
//assert(current->state == SANDBOX_RUNNING);
assert(current->state == SANDBOX_RUNNING);
struct sandbox *next = scheduler_get_next();
assert(next != NULL);

@ -178,7 +178,7 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void
atomic_fetch_add(&software_interrupt_deferred_sigalrm, 1);
} else {
/* A worker thread received a SIGALRM while running a preemptable sandbox, so preempt */
//assert(current_sandbox->state == SANDBOX_RUNNING);
assert(current_sandbox->state == SANDBOX_RUNNING);
scheduler_preempt(user_context);
}
goto done;

Loading…
Cancel
Save