From 442736418105151a8c166f16c0522cc097b0a0c0 Mon Sep 17 00:00:00 2001 From: ningmingxiao Date: Wed, 27 Mar 2024 10:06:13 +0800 Subject: [PATCH] add some doc for shim reap orphan process --- core/runtime/v2/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/runtime/v2/README.md b/core/runtime/v2/README.md index 8b15bd25150e3..883f13ef66f18 100644 --- a/core/runtime/v2/README.md +++ b/core/runtime/v2/README.md @@ -537,3 +537,9 @@ It works with standard protobufs and GRPC services as well as generating clients The only difference between grpc and ttrpc is the wire protocol. ttrpc removes the http stack in order to save memory and binary size to keep shims small. It is recommended to use ttrpc in your shim but grpc support is currently an experimental feature. + +### reap orphan process +After this commit https://github.com/torvalds/linux/commit/c6c70f4455d1eda91065e93cc4f7eddf4499b105 (merged in kernel 4.11) +reaper can't cross the namespaces,so shim is forbidden to reap orphan process,process1 in container will become reaper. +If orphan process exited it will become zombie process(if process1 in container doesn't call wait4 to reap zombie process). +We can let tini https://github.com/krallin/tini as process1 in container to reap zombie process,or use "shareProcessNamespace: true" for kubernetes let pause process to reap zombie process. \ No newline at end of file