From 4f8d6fb8b323d62f00be2ac2c7239878b14afc1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borys=20Pop=C5=82awski?= Date: Mon, 5 Jul 2021 17:33:29 +0200 Subject: [PATCH] [LibOS] Do not print errors on last TID release failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the IPC leader exits before all processes released their last IDs, those processe would exit with bunch of errors. Unfortunately this can happen legitimately, if the IPC leader exits right after doing `wait` syscall. Signed-off-by: Borys Popławski --- LibOS/shim/src/bookkeep/shim_pid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LibOS/shim/src/bookkeep/shim_pid.c b/LibOS/shim/src/bookkeep/shim_pid.c index 03e26eb3be..7389957533 100644 --- a/LibOS/shim/src/bookkeep/shim_pid.c +++ b/LibOS/shim/src/bookkeep/shim_pid.c @@ -168,8 +168,11 @@ void release_id(IDTYPE id) { int ret = ipc_release_id_range(range->start, range->end); if (ret < 0) { - log_error("IPC pid release failed"); - die_or_inf_loop(); + /* TODO: this is a fatal error, unfortunately it can happen if the IPC leader exits + * without fully waiting for this process to end. For more information check + * "LibOS/shim/src/sys/shim_exit.c". Change to `log_error` + `die` after fixing. */ + log_warning("IPC pid release failed"); + DkProcessExit(1); } free(range); return;