[sr-dev] [kamailio/kamailio] dead lock and 100% CPU ussage on shutdown (#2795)

sergey-safarov notifications at github.com
Tue Jul 6 07:09:42 CEST 2021


I asked in the dev email list without a response.
So will also here.

I have observed a case when Kamaili debug module try to grab the lock on shutdown and not able to do it.
As a result, the Kamailio process is stuck and not able to restart (dead lock).

To resolve such a case I want to utilize systemd watchdog [feature](https://www.freedesktop.org/software/systemd/man/sd_watchdog_enabled.html)

To use this feature I need to send  sd_notify(3) with a message string of "WATCHDOG=1" from the main process.
[Link](https://www.freedesktop.org/software/systemd/man/sd_watchdog_enabled.html)

According to systemd doc watchdog can be applied only to one process. [Link](https://www.freedesktop.org/software/systemd/man/sd_watchdog_enabled.html)
> If the $WATCHDOG_USEC environment variable is set, and the $WATCHDOG_PID variable is unset or set to the PID of the current process, the service manager expects notifications from this process.
 
[Additional info](https://lists.freedesktop.org/archives/systemd-devel/2018-January/040185.html)


Could you suggest how to embed this systemd call to the main process? This will allow use `systemsd watchdog` feature. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2795#issuecomment-874464216
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210705/a84c93f3/attachment.htm>


More information about the sr-dev mailing list