Hi Pieter,

On Mon, Nov 20, 2017 at 01:47:48AM +0100, PiBa-NL wrote:
> Hi List,
> 
> After compiling haproxy 1.8-rc4 (without modifications) on FreeBSD11.1 i'm
> trying to run it with master-worker option.
> 
> I can run it with the following config from a ssh console:
> 
> global
>     #daemon
>     master-worker
>        nbproc 4
> 
> listen HAProxyLocalStats
>     bind :2200 name localstats
>     mode http
>     stats enable
>     stats refresh 2
>     stats admin if TRUE
>     stats uri /
>     stats show-desc Test2
> 
> It then starts 5 haproxy processes and the stats page works, being served
> from one of the workers.
> 
> However if i start it with the 'daemon' option enabled or the -D startup
> parameter, it starts in background, also starts 4 workers, but then doesn't
> respond to browser requests..
> Sending a 'kill -1' to the master does start new workers see output below.
> 
> Truss output attached from commands below with a few requests to the stats
> page..
>  truss -dfHo /root/haproxy-truss.txt -f haproxy -f /root/hap.conf -D
>  truss -dfHo /root/haproxy-truss.txt -f haproxy -f /root/hap.conf
> 
> truss shows that 'accept4' isn't called when ran in daemon mode..
> 
> Am i doing something wrong? Or how can i check this further?

I don't think you're doing anything wrong, we might have hit a corner
case, but I don't easily imagine which one :-/

Hmmm thinking about it there might be something. Could you start with
"-dk" to disable kqueue and fall back to poll ? kqueue registers a post-
fork function to close and reopen the kqueue fd. I wouldn't be surprized
if we're having a problem with it not being placed exactly where needed
when running in master-worker mode. Or maybe we need to call it twice
when forking into background and one call is missing somewhere.

Thanks!
Willy

Reply via email to