Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

183 views
Skip to first unread message

Damyan Ivanov

unread,
Mar 31, 2017, 5:10:02 PM3/31/17
to
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

Pablo Sánchez[gmail]

unread,
Aug 28, 2018, 9:00:03 AM8/28/18
to
Hi !
Bug seems to be present on armhf (raspberry pi model 3+) .

In /var/log/syslog I get :
...
Aug 28 00:04:34 raspberrypi systemd[1]: Started User Manager for UID 1001.
Aug 28 00:04:43 raspberrypi fbguard[449]: Time out waiting for fbserver process start
Aug 28 00:04:43 raspberrypi systemd[1]: firebird3.0.service: Control process exited, code=exited status=252
Aug 28 00:04:43 raspberrypi systemd[1]: firebird3.0.service: Failed with result 'exit-code'.
Aug 28 00:04:43 raspberrypi systemd[1]: Failed to start Firebird Database Server ( SuperServer ).
Aug 28 00:04:43 raspberrypi systemd[1]: Reached target Multi-User System.
Aug 28 00:04:43 raspberrypi systemd[1]: Reached target Graphical Interface.
...

Version is 3.0.3

ii  firebird3.0-common              3.0.3.32900.ds4-4
ii  firebird3.0-common-doc          3.0.3.32900.ds4-4
ii  firebird3.0-doc                 3.0.3.32900.ds4-4
ii  firebird3.0-examples            3.0.3.32900.ds4-4
ii  firebird3.0-server              3.0.3.32900.ds4-4
ii  firebird3.0-server-core:armhf   3.0.3.32900.ds4-4
ii  firebird3.0-utils               3.0.3.32900.ds4-4

I have to start the server manually.

Regards

Pablo Sánchez

Damyan Ivanov

unread,
Aug 28, 2018, 1:00:03 PM8/28/18
to
Package: firebird3.0-server
Version: 3.0.3.32900.ds4-4
Severity: normal
Submitter: pblndr...@gmail.com

-=| Pablo Sánchez[gmail], 28.08.2018 09:47:49 -0300 |=-
> Hi !
> Bug seems to be present on armhf (raspberry pi model 3+) .
>
> In /var/log/syslog I get :
> ...
> Aug 28 00:04:34 raspberrypi systemd[1]: Started User Manager for UID 1001.
> Aug 28 00:04:43 raspberrypi fbguard[449]: Time out waiting for fbserver
> process start

This is not the same problem. Filing as a new one.

So you are saying that during system start-up, firebird3.0-server
can't be started within the default timeout of 90 seconds? Is the
system overloaded during that time?

If it starts fine later (presumably when the system is not
overloaded), then perhaps you want to change the default service start
timeout in /etc/systemd/system.conf (DefaultTimeoutStartSec).


-- dam

Pablo Sánchez[gmail]

unread,
Aug 29, 2018, 9:10:03 AM8/29/18
to
Damyan, I'm trying to find the meaning of "status=252"

Excerpt from /var/log/syslog
...
Aug 29 09:17:58 raspberrypi systemd[1]: Started Daily apt download activities.
Aug 29 09:18:10 raspberrypi fbguard[451]: Time out waiting for fbserver process start
Aug 29 09:18:10 raspberrypi systemd[1]: firebirAccept & closed3.0.service: Control process exited, code=exited status=252
Aug 29 09:18:10 raspberrypi systemd[1]: firebird3.0.service: Failed with result 'exit-code'.
Aug 29 09:18:10 raspberrypi systemd[1]: Failed to start Firebird Database Server ( SuperServer ).
Aug 29 09:18:10 raspberrypi systemd[1]: Reached target Multi-User System.
'''
It's a normal install, with a database definition on databases.conf . After boot, I just start firebird with "service firebird3.0 start"

root@raspberrypi:~# systemctl  status firebird3.0
● firebird3.0.service - Firebird Database Server ( SuperServer )
   Loaded: loaded (/lib/systemd/system/firebird3.0.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-08-29 09:37:42 -03; 18min ago
  Process: 450 ExecStart=/usr/sbin/fbguard -pidfile /run/firebird3.0/default.pid -daemon -forever (code=exited, status=252)

Aug 29 09:37:26 raspberrypi systemd[1]: Starting Firebird Database Server ( SuperServer )...
Aug 29 09:37:42 raspberrypi fbguard[450]: Time out waiting for fbserver process start
Aug 29 09:37:42 raspberrypi systemd[1]: firebird3.0.service: Control process exited, code=exited status=252
Aug 29 09:37:42 raspberrypi systemd[1]: firebird3.0.service: Failed with result 'exit-code'.
Aug 29 09:37:42 raspberrypi systemd[1]: Failed to start Firebird Database Server ( SuperServer ).
root@raspberrypi:~#


Pablo Sánchez

Pablo Sánchez[gmail]

unread,
Aug 29, 2018, 9:20:03 AM8/29/18
to
Found it ???

On x86/amd64 I usually have to config RemoteBindAddress with computer ip number after install , as connections where rejected .
I realized I was also configuring the same on  raspberry pi. After commenting that line con firebird.conf, after restart and power off / power on, service started on boot .

Pablo Sánchez

Damyan Ivanov

unread,
Aug 29, 2018, 11:00:03 AM8/29/18
to
-=| Pablo Sánchez[gmail], 29.08.2018 10:13:37 -0300 |=-
> Found it ???
>
> On x86/amd64 I usually have to config RemoteBindAddress with computer ip
> number after install , as connections where rejected .

This is normal. The default bind address is 'localhost'. An admin
needs to knowingly allow remote access.

> I realized I was also configuring the same on raspberry pi. After
> commenting that line con firebird.conf, after restart and power off / power
> on, service started on boot .

Perhaps the Pi is slower to acquire its IP address and this leads to
timeout in fbguard.

Just commenting out the setting allows connection from everywhere
— entering an IP is useful only if there are several network
interfaces. Using a firewall for giving selective access is better
anyway.


-- dam
0 new messages