You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2020/10/12 12:51:24 UTC
[ignite] branch master updated: IGNITE-13536 .NET: Document zombie
child processes issue
This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 1cc6561 IGNITE-13536 .NET: Document zombie child processes issue
1cc6561 is described below
commit 1cc6561c791f7bfee8c4a5fc55258d17e6741884
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Mon Oct 12 15:51:13 2020 +0300
IGNITE-13536 .NET: Document zombie child processes issue
---
docs/_docs/net-specific/net-troubleshooting.adoc | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/docs/_docs/net-specific/net-troubleshooting.adoc b/docs/_docs/net-specific/net-troubleshooting.adoc
index d479e76..8d9986b 100644
--- a/docs/_docs/net-specific/net-troubleshooting.adoc
+++ b/docs/_docs/net-specific/net-troubleshooting.adoc
@@ -136,3 +136,26 @@ JVM runs in the same process as .NET, it overrides that handler, breaking .NET e
The fix for this issue exists in .NET Core 3.0 (https://github.com/dotnet/coreclr/pull/25972[#25972, window=_blank].
by setting the `COMPlus_EnableAlternateStackCheck` environment variable to `1`.
+
+=== Zombie processes on Linux
+
+On Linux, both .NET and Java install `SIGCHLD` handler to deal with child process termination.
+
+* Handlers are installed lazily (when a `Process` is first started)
+* Only one handler can exist at a time
+
+Therefore, it is possible that Java overwrites .NET handler, or vice versa,
+making it impossible to clean up child processes on one of the platforms,
+resulting in link:https://en.wikipedia.org/wiki/Parent_process[zombie processes].
+
+*Ignite uses child processes on Java side in one particular case: when Persistence is enabled and `direct-io` module is used.*
+In this case .NET `System.Diagnostics.Process` API should not be used.
+
+==== Workaround
+
+To work around the issue, make sure that child processes are created either only on Java side, or only on .NET side.
+
+For example, when `direct-io` is used, and .NET code requires starting a child process,
+move the process handling logic to Java side and invoke it with
+link:developers-guide/distributed-computing/distributed-computing[Compute] `ExecuteJavaTask` API.
+Alternatively, use Services API to call Java service from .NET.