procd/ujail behaviour

e9hack e9hack at gmail.com
Fri Dec 10 05:12:30 PST 2021


Hi,

I did update the init script for stubby, that it runs with ujail. Stubby does run, but it isn't possible to stop it via '/etc/init.d/stubby stop'. The ujail process is stopped, but stubby itself not. It looks like that it isn't possible to stop stubby with SIGTERM. Stubby will be ended by SIGKILL only. Procd sends first SIGTERM and than SIGKILL to ujail, but ujail sends SIGTERM only. Either ujail doesn't send SIGKILL if the jailed process doesn't terminate or procd sends SIGKILL to early so that ujail can't send SIGKILL any more. In the log I see the following messages:

Fri Dec 10 13:35:52 2021 user.err : jail: forwarding signal 15 to the jailed process
Fri Dec 10 13:35:52 2021 daemon.err stubby[6669]: jail: forwarding signal 15 to the jailed process
Fri Dec 10 13:35:57 2021 daemon.info procd: Instance stubby::stubby pid 6669 not stopped on SIGTERM, sending SIGKILL instead

6669 was the pid of the ujail process.

In ujail, I changed a few DEBUG() calls to ERROR(). Without this, the first two lines are not shown.

Any ideas?

Regards,
Hartmut



More information about the openwrt-devel mailing list