Explorar o código

[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 %!s(int64=6) %!d(string=hai) anos
pai
achega
5be9fbb689
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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) {