Hi Glauco,

> After months of flawless operation, suddenly the service initscript is
> not able to close the process anymore. Need to use a kill -9 manually.
> Even more strange, at every restart the process is not closed, but another
> instance is started.
> [...]
> the backend servers receive duplicate requests from haproxy when multiple
> process instances are running.

The fact that the second process starts without any problems, binds to the
socket and you see duplicate request on the backend is pretty scary, imo.

Can you post your configuration (remove confidential data like ip adddresses
and host names), the output of "./haproxy -vv" and your operating system
(including kernel and libc version). Are you able to kill HAProxy without
-9? Can you confirm there are no pidfile issue (perhaps a initscript/haproxy
pidfile configuration mismatch)?


I think there are 2 issues here:
- haproxy doesn't quit when you ask him to (check for pidfile/initscript
  issues)
- haproxy starts a second process on the same port and binds to it without
  problems


I could only explain the latter if your OS supports SO_REUSEPORT, but
the implementation is somehow buggy (hence the duplicate requests on the
backend side). Please answer the questions above (kernel version, etc).


Willy, I see we are setting the socket option SO_REUSEPORT on all OS's
unconditionally since - this is one old piece of code - commit fac1a8649
([MEDIUM] hopefully definitely fixed hot-reconf for OpenBSD).

Linux has recently introduced support for SO_REUSEPORT (linux 3.9):
https://lwn.net/Articles/542629/

Could this be related to the issue Glauco is seeing and is it really a
good thing to unconditionally set SO_REUSEPORT on linux?



Regards,

Lukas                                     

Reply via email to