From 93583cce3bc191a8841906098dafec0f04d5d2c8 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Tue, 28 Sep 2021 13:24:32 +0200 Subject: [PATCH] sequence: immediately stop child on exit The sequence app should immediately stop the child when it called parent().exit(). Otherwise, the child will continue execution which causes a race condition: The child's ld.lib.so will eventually destruct an Attached_rom_dataspace for the config rom. If sequence destructed the corresponding service first, we will get an Ipc_error. genodelabs/genode#4267 --- repos/os/src/app/sequence/main.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/os/src/app/sequence/main.cc b/repos/os/src/app/sequence/main.cc index f5c8f8f780..ead37ab9a4 100644 --- a/repos/os/src/app/sequence/main.cc +++ b/repos/os/src/app/sequence/main.cc @@ -150,6 +150,7 @@ struct Sequence::Child : Genode::Child_policy void exit(int exit_value) override { _exit_value = exit_value; + _child.close_all_sessions(); _exit_transmitter.submit(); }