Browse Source

[LibOS] shim_ipc_helper.c: Actually wait for 0.5 seconds on IPC exit

Before exiting, the IPC helper is supposed to wait for 0.5s for all in-flight
IPC messages to reach their destinations (e.g., child processes). Otherwise,
the destination processes may become abandoned zombies. Previously, this was
achieved by `DkThreadDelayExecution(500)`. However, this function uses
microseconds not milliseconds, thus, Graphene actually waited only for 0.005
seconds (which is not enough under heavy system-wide load). This commit fixes
this time-unit bug.
Dmitrii Kuvaiskii 4 years ago
parent
commit
5be9fbb689
1 changed files with 1 additions and 1 deletions
  1. 1 1
      LibOS/shim/src/ipc/shim_ipc_helper.c

+ 1 - 1
LibOS/shim/src/ipc/shim_ipc_helper.c

@@ -869,7 +869,7 @@ struct shim_thread* terminate_ipc_helper(void) {
      * prevent such cases, we simply wait for a bit before exiting.
      * */
     debug("Waiting for 0.5s for all in-flight IPC messages to reach their destinations\n");
-    DkThreadDelayExecution(500);
+    DkThreadDelayExecution(500000);  /* in microseconds */
 
     lock(&ipc_helper_lock);
     if (ipc_helper_state != HELPER_ALIVE) {