[pkg-firebird-general] Bug#859234: firebird3.0-server: firebird server may not be ready to serve requests after service start

Damyan Ivanov dmn at debian.org
Fri Mar 31 21:05:05 UTC 2017


Package: firebird3.0-server
Version: 3.0.1.32609.ds4-14
Severity: normal
Tags: upstream

On a heavily loaded system, starting firebird3.0-server service doesn't 
guarantee that daemon is ready to serve requests.

This is caused by the fact that the init.d script/systemd service starts 
fbguard, which exists before making sure the fbserver process is ready to 
accept connections.

>From guard.cpp:

    165         // detach from controlling tty
    166         if (daemon && fork()) {
    167                 exit(0);
    168         }
    169         divorce_terminal(0);

What follows is the start of the server process (vfork + exec), racing with the 
exit of the main guardian process.

Thinking of a possible fix, perhaps the server process could signal the 
guardian somehow that it is ready to accept connections. The parent guardian 
process should exit after receiving the signal.

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages firebird3.0-server depends on:
ii  adduser                  3.115
ii  debconf                  1.5.60
ii  firebird3.0-common       3.0.1.32609.ds4-14
ii  firebird3.0-common-doc   3.0.1.32609.ds4-14
ii  firebird3.0-server-core  3.0.1.32609.ds4-14
ii  firebird3.0-utils        3.0.1.32609.ds4-14
ii  init-system-helpers      1.47
ii  libc6                    2.24-9
ii  libfbclient2             3.0.1.32609.ds4-14
ii  libgcc1                  1:6.3.0-10
ii  libncurses5              6.0+20161126-1
ii  libstdc++6               6.3.0-10
ii  libtinfo5                6.0+20161126-1
ii  libtommath1              1.0-4
ii  lsb-base                 9.20161125

Versions of packages firebird3.0-server recommends:
ii  libib-util  3.0.1.32609.ds4-14

Versions of packages firebird3.0-server suggests:
ii  firebird3.0-doc  3.0.1.32609.ds4-14



More information about the pkg-firebird-general mailing list