From 3a4f728fc767671535b2ae6716caef8872d3fb91 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 4 Sep 2018 12:13:43 +0200 Subject: [sasl] Flush logger handlers to file before terminating node --- lib/sasl/test/sasl_report_SUITE.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/sasl/test/sasl_report_SUITE.erl b/lib/sasl/test/sasl_report_SUITE.erl index a03932133e..e639b55cee 100644 --- a/lib/sasl/test/sasl_report_SUITE.erl +++ b/lib/sasl/test/sasl_report_SUITE.erl @@ -106,6 +106,9 @@ gen_server_crash(Config, Encoding) -> ok = rpc:call(Node,?MODULE,crash_me,[]), + ok = rpc:call(Node,logger_std_h,filesync,[default]), + ok = rpc:call(Node,logger_std_h,filesync,[sasl]), + test_server:stop_node(Node), ok = logger:remove_primary_filter(no_remote), -- cgit v1.2.3 From 3b50bb697121de96d03deffcd65ed5859de86558 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 7 Sep 2018 12:16:00 +0200 Subject: [supervisor] Add warning about race condition ERL-724: "During a 'gentle' shutdown, supervisors unlink from their children before sending shutdown signals to them. This can lead to a race condition in supervision trees, when the timeout for gentle shutdown of a parent supervisor expires and it kills a child supervisor that has just unlinked from a child of its own, leaving the child supervisor's own child still running after its supervisor is killed." This commit adds a warning about this in the documentation. --- lib/stdlib/doc/src/supervisor.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml index 6d5065ca02..0e8075a578 100644 --- a/lib/stdlib/doc/src/supervisor.xml +++ b/lib/stdlib/doc/src/supervisor.xml @@ -208,8 +208,16 @@ child_spec() = #{id => child_id(), % mandatory the child process is unconditionally terminated using exit(Child,kill).

If the child process is another supervisor, the shutdown time - is to be set to infinity to give the subtree ample - time to shut down. It is also allowed to set it to infinity, + must be set to infinity to give the subtree ample + time to shut down.

+ +

Setting the shutdown time to anything other + than infinity for a child of type supervisor + can cause a race condition where the child in question + unlinks its own children, but fails to terminate them + before it is killed.

+
+

It is also allowed to set it to infinity, if the child process is a worker.

Be careful when setting the shutdown time to -- cgit v1.2.3