monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: signal related race conditions and deadlock


From: Martin Pala
Subject: Re: signal related race conditions and deadlock
Date: Sat, 13 Sep 2003 21:58:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4

Martin Pala wrote:

Martin Pala wrote:

Hi,

there are SIGTERM and SIGINT related problems:

------
FIRST:
------

1.) monit receives one of above mentioned signals and calls do_destroy()
2.) do_destroy() sets http engine stopped flag and returns - monit httpd then will stop in next cycle on 'while' condition

Sorry again (i see the errors on second sigth everytime after i have send the message) - the mentioned return is from stop_http() (which sets the stopped flag) called inside do_destroy(), which will of course continue and call garbage collector and close files as described bellow (i have not mentioned that because of freed memory monit could crash when httpd will access it in the short timeframe before exit). In the case that monit will reach exit sooner that httpd will close socket, it could probably cause another problems (httpd will not end gracefully).


3.) monit will close all files and logs (asynchronously of monit httpd task)

Problem, is that monit httpd thread is able to log messages, while it is possible that the socket will be closed earlier.


Sorry - instead of closed "socket" i meant "filedescriptor" associated with logs.

...




_______________________________________________
monit-dev mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/monit-dev







reply via email to

[Prev in Thread] Current Thread [Next in Thread]