Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-20 Thread Willy Tarreau
Hi Conrad, On Tue, May 20, 2014 at 02:46:15PM +0200, Conrad Hoffmann wrote: > Hey Willy, > > > That's what I initially thought, because I didn't remember there was this > > common fork_poller() function, but what you did is better, each part does > > its own job, that's really clean this way. > >

Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-20 Thread Conrad Hoffmann
Hey Willy, > That's what I initially thought, because I didn't remember there was this > common fork_poller() function, but what you did is better, each part does > its own job, that's really clean this way. > > Can you please provide a commit message summarizing the issue you faced > and the sol

Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-19 Thread Willy Tarreau
Hi Conrad, On Mon, May 19, 2014 at 07:26:54PM +0200, Conrad Hoffmann wrote: > >> Works all the time for me. Running lsof before and after the signal > >> neatly shows how the worker closed the listening socket but the parent > >> still has it. > > > > I'm just confused with what the "parent" here

Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-19 Thread Conrad Hoffmann
Hey Willy, On 05/19/2014 06:30 AM, Willy Tarreau wrote: >> Here is a nice way to trigger it: >> - run haproxy in deamon mode, but with nbproc 1 >> - open a HTTP keep-alive connection (and keep it open) >> - send USR1 to the only worker (it should stay running, because of the >>ongoing conne

Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-18 Thread Willy Tarreau
Hi Conrad, On Sat, May 17, 2014 at 08:31:46PM +0200, Conrad Hoffmann wrote: > Hi Willy, > > On 05/17/2014 04:39 AM, Willy Tarreau wrote: > > On 05/15/2014 11:26 AM, Conrad Hoffmann wrote: > >> If haproxy has been running for a certain amount of time (this part > >> makes reproduction cumbersome),

Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-17 Thread Conrad Hoffmann
Hi Willy, On 05/17/2014 04:39 AM, Willy Tarreau wrote: > On 05/15/2014 11:26 AM, Conrad Hoffmann wrote: >> If haproxy has been running for a certain amount of time (this part >> makes reproduction cumbersome), we quite often run into the following >> issue when restarting haproxy: if some of the w

Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-16 Thread Willy Tarreau
Hi Conrad, first, thanks for your detailed analysis. [ merging your two mails for an easier response ] On 05/15/2014 11:26 AM, Conrad Hoffmann wrote: > If haproxy has been running for a certain amount of time (this part > makes reproduction cumbersome), we quite often run into the following > is

Re: [PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-16 Thread Conrad Hoffmann
Hi, I just figured out some of the missing pieces. When sending USR1 to the workers, they just close() their listening sockets instead of shutdown() (like they do for TTOU), causing the file descriptor to stay open in the parent process, which is why there are still epoll events coming in for it.

[PATCH] epoll: avoid possible CPU hogging of process waiting for connection termination before restart

2014-05-15 Thread Conrad Hoffmann
Hi everyone, I am still somewhat new to haproxy, so I maybe missing a few bits and pieces here. If so, don't hesitate to educate me :) First of all, we are using HAProxy here at SoundCloud, so a big thanks to everyone who invested time in this wonderful project! We are very keen on using SSL ter