SMS Server Tools 3
This site is hosted by
Basic information:
Additional information:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

Custom Search

 Visitor locations
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Thu May 23, 2024 03:32
SMSTools3 Community » Feature requests Bottom

recover from crashing process

Login and Post Reply

Page:  1

Author Post
May 2017
Location: Vienna, Austria

It seems when a modem process terminates (oom_killer, faulty hardware, admin error, etc.) the main process just keeps running patiently for ever. Ie the system stops responding to incoming messages at all. AFAICS there is no configuration option to change this. Likewise when the main process dies in one of the hard ways, the modem processes keep running, though I guess this is a lesser problem.

ATM I use an alarm handler to terminate the main process in such cases, but this get's messy, when there are multiple instances of smsd running.

I also note that the default init script 'sms3' uses some quirky combinations of ps, grep and awk to find all processes that need killing. That can easily go wrong when there are other processes with unlucky names, running. (I had to rename my alarm hander from smsd_alarmhandler to something else, because it kept killing itself via the init script ...)

I'm not sure what the best solution is. A few ideas for features that might help:
* an option to make the main process terminate when a modem process terminates
* an option to just restart a terminated modem process
* modem processes terminating by default when the main process is gone
* a pid file per modem process or some other reliable way to get to pids

In case you are wondering: I'm not doing anything fancy: Just trying to improve the OpenWRT package of smstools3 and thinking of possible use cases.


May 2017
Location: Vienna, Austria
Topic owner
Finally got around to look into this a bit. Surprisingly there seems to be no portable way to check if the parent process is still around. The only portable way I found to fix the problem of left over modem processes is to turn them into threads.

As this would be quite a deep change, I went for a non-portalbe linux solution. See this patch, that I proposed for inclusion in OpenWRT:

This also makes the init script a lot simpler.


Login and Post Reply

Page:  1

SMSTools3 Community » Feature requests Top

Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.