Thread: [Sqlrelay-discussion] Dead children (zombies and sem undo)
Brought to you by:
mused
From: Renat S. <sr...@st...> - 2011-06-29 15:34:17
Attachments:
reap_5sec.patch
|
Hi David, Did you mention that zombie connections hanging around when scaler does not receive signal(6) for some time? I made a patch that use timed wait() on sem(6) and reap dead children every 5 seconds. This patch solve one more issue. Did you know that undo information on semaphore operations processed after process completely dies, i.e. after the father executes waitpid(). For this reason it is very important to reap children in time. -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
From: David M. <dav...@fi...> - 2011-06-29 17:26:01
|
Renat, This will definitely improve things, but maybe we should just make the scaler call reapChildren when it receives a SIGCHLD. Can you think of any reason why we shouldn't do that? Dave On 06/29/2011 11:34 AM, Renat Sabitov wrote: > Hi David, > > Did you mention that zombie connections hanging around when scaler > does not receive signal(6) for some time? I made a patch that use > timed wait() on sem(6) and reap dead children every 5 seconds. > > This patch solve one more issue. Did you know that undo information on > semaphore operations processed after process completely dies, i.e. > after the father executes waitpid(). For this reason it is very > important to reap children in time. > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: David M. <dav...@fi...> - 2011-06-29 17:27:25
|
Actually, it would be a little tricky to code because it would need to be a static method accessing members of an instance of scaler, but other than that? On 06/29/2011 01:25 PM, David Muse wrote: > Renat, > > This will definitely improve things, but maybe we should just make the > scaler call reapChildren when it receives a SIGCHLD. Can you think of > any reason why we shouldn't do that? > > Dave > > On 06/29/2011 11:34 AM, Renat Sabitov wrote: >> Hi David, >> >> Did you mention that zombie connections hanging around when scaler >> does not receive signal(6) for some time? I made a patch that use >> timed wait() on sem(6) and reap dead children every 5 seconds. >> >> This patch solve one more issue. Did you know that undo information >> on semaphore operations processed after process completely dies, i.e. >> after the father executes waitpid(). For this reason it is very >> important to reap children in time. >> >> >> ------------------------------------------------------------------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2d-c2 >> >> _______________________________________________________ >> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting >> http://www.doteasy.com >> >> >> _______________________________________________ >> Sqlrelay-discussion mailing list >> Sql...@li... >> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> >> >> _______________________________________________________ >> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting >> http://www.doteasy.com > _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: Renat S. <sr...@st...> - 2011-06-29 17:55:25
|
On 29.06.2011 21:25, David Muse wrote: > Renat, > > This will definitely improve things, but maybe we should just make the > scaler call reapChildren when it receives a SIGCHLD. Can you think of > any reason why we shouldn't do that? The problem is with signal handler rules. It could set only one type of static variable - sig_atomic_t. So I think it is possible to count reaped children in signal handler in variable n_reaped and then (since semset->wait(6) would exit and set EINTR) in the main code block SIGCHLD, change shm and set n_reaped to 0 . A little bit tricky, but should work. |
From: David M. <dav...@fi...> - 2011-06-29 17:59:02
|
Yeah, that is tricky. Let's wait and do something like that for the next release. On 06/29/2011 01:55 PM, Renat Sabitov wrote: > On 29.06.2011 21:25, David Muse wrote: >> Renat, >> >> This will definitely improve things, but maybe we should just make >> the scaler call reapChildren when it receives a SIGCHLD. Can you >> think of any reason why we shouldn't do that? > > The problem is with signal handler rules. It could set only one type > of static variable - sig_atomic_t. So I think it is possible to count > reaped children in signal handler in variable n_reaped and then (since > semset->wait(6) would exit and set EINTR) in the main code block > SIGCHLD, change shm and set n_reaped to 0 . A little bit tricky, but > should work. > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |