Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-24 Thread Willy Tarreau
On Thu, May 18, 2017 at 10:22:17AM -0400, Jim Pingle wrote: > On 05/12/2017 09:50 AM, Willy Tarreau wrote: > > On Fri, May 12, 2017 at 10:20:56AM +0200, Frederic Lecaille wrote: > >> Here is a more well-formed patch. > >> Feel free to amend the commit message if not enough clear ;) > > > > It was

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-18 Thread Jim Pingle
On 05/12/2017 09:50 AM, Willy Tarreau wrote: > On Fri, May 12, 2017 at 10:20:56AM +0200, Frederic Lecaille wrote: >> Here is a more well-formed patch. >> Feel free to amend the commit message if not enough clear ;) > > It was clear enough, thanks. I added the mention of the faulty commit, > that h

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-12 Thread Willy Tarreau
On Fri, May 12, 2017 at 10:20:56AM +0200, Frederic Lecaille wrote: > Here is a more well-formed patch. > Feel free to amend the commit message if not enough clear ;) It was clear enough, thanks. I added the mention of the faulty commit, that helps tracking backports and credited Jim and Lukas for

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-12 Thread Frederic Lecaille
On 05/12/2017 09:52 AM, Willy Tarreau wrote: On Fri, May 12, 2017 at 09:48:56AM +0200, Frederic Lecaille wrote: On 05/12/2017 09:37 AM, Willy Tarreau wrote: On Fri, May 12, 2017 at 08:58:56AM +0200, Lukas Tribus wrote: Hi, Am 11.05.2017 um 21:13 schrieb Jim Pingle: On 05/11/2017 01:58 PM, F

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-12 Thread Willy Tarreau
On Fri, May 12, 2017 at 09:48:56AM +0200, Frederic Lecaille wrote: > On 05/12/2017 09:37 AM, Willy Tarreau wrote: > > On Fri, May 12, 2017 at 08:58:56AM +0200, Lukas Tribus wrote: > > > Hi, > > > > > > > > > Am 11.05.2017 um 21:13 schrieb Jim Pingle: > > > > On 05/11/2017 01:58 PM, Frederic Lecai

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-12 Thread Frederic Lecaille
On 05/12/2017 09:37 AM, Willy Tarreau wrote: On Fri, May 12, 2017 at 08:58:56AM +0200, Lukas Tribus wrote: Hi, Am 11.05.2017 um 21:13 schrieb Jim Pingle: On 05/11/2017 01:58 PM, Frederic Lecaille wrote: I have reproduced (at home) the stats socket issue within a FreeBSD 9.3 VM. Replacing yo

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-12 Thread Willy Tarreau
On Fri, May 12, 2017 at 08:58:56AM +0200, Lukas Tribus wrote: > Hi, > > > Am 11.05.2017 um 21:13 schrieb Jim Pingle: > > On 05/11/2017 01:58 PM, Frederic Lecaille wrote: > >> I have reproduced (at home) the stats socket issue within a FreeBSD 9.3 VM. > >> > >> Replacing your call to close() by fd

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-11 Thread Lukas Tribus
Hi, Am 11.05.2017 um 21:13 schrieb Jim Pingle: > On 05/11/2017 01:58 PM, Frederic Lecaille wrote: >> I have reproduced (at home) the stats socket issue within a FreeBSD 9.3 VM. >> >> Replacing your call to close() by fd_delete() which removes the fd from >> the fd set used by kevent *and close it

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-11 Thread Jim Pingle
On 05/11/2017 01:58 PM, Frederic Lecaille wrote: > I have reproduced (at home) the stats socket issue within a FreeBSD 9.3 VM. > > Replacing your call to close() by fd_delete() which removes the fd from > the fd set used by kevent *and close it* seems to fix at least the stats > socket issue. I do

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-11 Thread Frederic Lecaille
Hi, On 05/11/2017 09:51 AM, Baptiste wrote: Hi Lukas, Thanks a lot! So, after the fork(), HAProxy closes the UDP socket (4) and open a new one (1) as expected, that said, the scheduler still points to the old one. Obviously, this behavior doesn't happen on Linux. socket #4 has been closed()

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-11 Thread Baptiste
Hi Lukas, Thanks a lot! So, after the fork(), HAProxy closes the UDP socket (4) and open a new one (1) as expected, that said, the scheduler still points to the old one. Obviously, this behavior doesn't happen on Linux. I'll see how I can reproduce the issue and then fix it. That said, I'm runni

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-10 Thread Lukas Tribus
Hi Baptiste, commit 26c6eb838 breaks kqueue; in the child process we see: 3069: kevent(0,{ 4,EVFILT_READ,EV_ADD,0x0,0x0,0x0 1,EVFILT_READ,EV_ADD,0x0,0x0,0x0 5,EVFILT_READ,EV_ADD,0x0,0x0,0x0 },3,0x0,0,0x0) ERR#9 'Bad file descriptor' full truss output below. I had to remove Jim from CC, as my o

Re: Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-10 Thread Baptiste
On Tue, May 9, 2017 at 10:17 PM, Jim Pingle wrote: > With HAProxy 1.7.3 and later on FreeBSD, recent DNS-related code changes > in HAProxy appear to have broken the UNIX socket in daemon mode when > resolvers are present in the configuration. > > How to reproduce: > > * Install HAProxy 1.7.x (whe

Bug: DNS changes in 1.7.3+ break UNIX socket stats in daemon mode with resolvers on FreeBSD

2017-05-09 Thread Jim Pingle
With HAProxy 1.7.3 and later on FreeBSD, recent DNS-related code changes in HAProxy appear to have broken the UNIX socket in daemon mode when resolvers are present in the configuration. How to reproduce: * Install HAProxy 1.7.x (where x > 2) on FreeBSD 10.3 or FreeBSD 11, even HAProxy 1.7.5 * Co