Hello Richard,
On 2 March 2018 at 19:37, Richard Lee <[email protected]> wrote: > > We recently updated our linux kernel from 4.14.19 to 4.14.22, and now haproxy > hangs forever in a system call: > > $ ps -lfC haproxy > F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD > 1 D root 6308 6242 0 80 0 - 14187 - 21:43 ? 00:00:00 > /usr/sbin/haproxy -f /test/etc/haproxy.conf -p /test/run/haproxy.pid > > $ sudo cat /proc/6308/syscall > 55 0x1 0x0 0x50 0x56315f9d9238 0x7ffc6ae52f9c 0x5a9873ee 0x7ffc6ae52f88 > 0x7fd561c2512a > > $ sudo cat /proc/6308/stack > [<0>] __lock_sock+0x79/0xc0 > [<0>] lock_sock_nested+0x57/0x60 > [<0>] 0xffffffffc07293da > [<0>] nf_getsockopt+0x47/0x70 > [<0>] ip_getsockopt+0x7f/0xc0 > [<0>] SyS_getsockopt+0x76/0xd0 > [<0>] do_syscall_64+0x67/0x120 > [<0>] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 > [<0>] 0xffffffffffffffff > > > It appears there was some minor tinkering with the locking of getsockopt() > somewhere between these two kernel versions, but only haproxy seems to have > issues with the new code. Downgrading the kernel makes haproxy work again. Try latest 4.14.23. 4.14.22 introduced this commit [1]: netfilter: on sockopt() acquire sock lock only in the required scope 4.14.23 fixed that one in [2]: netfilter: drop outermost socket lock in getsockopt() cheers, lukas [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=516c855cf51462678eb50ec52da845c10734d0bf [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=485595768d89f53581a7527285acf97880fc65a6

