• jerome.poulin's avatar
    Do not update connection count in child handler. · 8444d3c0
    jerome.poulin authored
    Updating the connection count via systemd in child handler can cause a
    deadlock in certain conditions.
    
    (gdb) bt
    *0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
    *1  0x00007f6aa9a5752f in _L_lock_10524 () from /lib/x86_64-linux-gnu/libc.so.6
    *2  0x00007f6aa9a5515f in malloc_atfork (sz=140096092768344, caller=<optimized out>) at arena.c:181
    *3  0x00007f6aa9ad1427 in __GI___vasprintf_chk (result_ptr=0x7ffe17a2ef18, flags=1,
        format=0x401cf8 "STATUS=Ready. %d connections processed.\n", args=0x7ffe17a2ef20) at vasprintf_chk.c:48
    *4  0x00007f6aa9d95428 in sd_notifyf () from /lib/x86_64-linux-gnu/libsystemd.so.0
    *5  <signal handler called>
    *6  0x00007f6aa9a51792 in ptmalloc_unlock_all () at arena.c:270
    *7  0x00007f6aa9a931af in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:223
    *8  0x0000000000401bba in server_loop ()
    *9  0x0000000000401201 in main ()
    8444d3c0
proxy.c 10.5 KB