Firebird 4 regularly crashes in Super Classic mode
Attempting to run Firebird4 in SuperClassic mode always kills the server. I have no idea how to track this, on a test machine that is cloned from the virtual one, there is no way to track which query kills the server. There is no problem in Classic mode, more than 600-700 users are working (there is no information about killing the session in the logs). I have 4 core files (core1-core4) from today (core 5 and 6 are from 4 and 5 march).
https://eclsoft.com/soft/uploads
I downloaded debuginfo, did a backtrace, results in core-debug.log
SRV-01-SI-4-PRD Mon Mar 6 04:42:01 2023 Shutting down the server with 22 active connection(s) to 1 database(s), 0 active service(s) SRV-01-SI-4-PRD Mon Mar 6 04:42:01 2023 INET/inet_error: read errno = 110, client host = it-06281, address = 10.1.153.86/63614, user = it-06281.zpue-w2 SRV-01-SI-4-PRD Mon Mar 6 04:42:03 2023 /usr/local/firebird/bin/fbguard: /usr/local/firebird/bin/firebird terminated SRV-01-SI-4-PRD Mon Mar 6 04:42:33 2023 /usr/local/firebird/bin/fbguard: guardian starting /usr/local/firebird/bin/firebird
SRV-01-SI-4-PRD Mon Mar 6 08:06:15 2023 INET/inet_error: read errno = 104, client host = srv-01-trm1-s2, address = 10.1.1.64/58170, user = xxx.yyy SRV-01-SI-4-PRD Mon Mar 6 08:06:47 2023 /usr/local/firebird/bin/fbguard: /usr/local/firebird/bin/firebird terminated abnormally (-1) SRV-01-SI-4-PRD Mon Mar 6 08:06:47 2023 /usr/local/firebird/bin/fbguard: guardian starting /usr/local/firebird/bin/firebird
SRV-01-SI-4-PRD Mon Mar 6 08:11:13 2023 Shutting down the server with 171 active connection(s) to 2 database(s), 0 active service(s) SRV-01-SI-4-PRD Mon Mar 6 08:11:17 2023 /usr/local/firebird/bin/fbguard: /usr/local/firebird/bin/firebird killed (did not terminate) SRV-01-SI-4-PRD Mon Mar 6 08:11:53 2023 /usr/local/firebird/bin/fbguard: guardian starting /usr/local/firebird/bin/firebird SRV-01-SI-4-PRD Mon Mar 6 08:11:53 2023 setsockopt: error setting IPV6_V6ONLY to 0 SRV-01-SI-4-PRD Mon Mar 6 08:11:59 2023 INET/inet_error: read errno = 104
Is it reproducible ? If yes, and if you use 4.0.2 - could you try current snapshot build ?
Yes, always in SuperClassic mode. Unfortunately I have my build that allows me to make metadata changes - if I need to restructure the tables. I can also merge the current state into my sources and build a version.
Try to pick this commit
Ok, I commented out this line, testing tonight. For the record, I've included more detailed backtraces from the existing core files (core1-debug, core2-debug, etc.) https://eclsoft.com/soft/uploads
I compiled 4.0.2 with this fix, i.e. without the line port->port_context = nullptr; In the morning there was a hang, the server dumped 2 core files. Unfortunately, trying to suspect gdb doesn't show anything sensible :( In gdb I type thread apply all bt. Effects in core-debug.log https://eclsoft.com/soft/uploads/08032023/
I'm not a Linux expert, for me it looks like gdb requires root privs - try to run it with sudo
Looks like minimal patch not helped, thus I recommend to merge with most current state of v4.0-release and try again.
On this server i am running as root ;) So I thought it would be better to merge from the current v4.0
https://eclsoft.com/soft/uploads/11032023/ core1357.lz4 and core0736.lz4 with correspondent .log files is server crash dump. core1603.lz4 core1659.lz4 is simply shutdown (service firebird stop).
OS - Centos 8 Stream. Compilling in gcc-11.
One more idea - I just disabled SELinux. I completely forgot about it. Maybe it matters for the SuperClassic.
First of all you should avoid the following lines in gdb:
warning: core file may not match specified executable file. Failed to read a valid object file image from memory.
As long as you get this messages analyzing core file is impossible.
Yes, but how to do this? [root@localhost 11032023]# file -Pelf_phnum=10000 core0736 core0736: ELF 64-bit LSB core file, x86-64, version 1 (SYSV), SVR4-style, from '/usr/local/firebird/bin/firebird', real uid: 84, effective uid: 84, real gid: 84, effective gid: 84
core seems to be dumped by firebird. https://eclsoft.com/soft/uploads/11032023/core0736.log
OK, new cores for analysis.
https://eclsoft.com/soft/uploads/20032023/core0809.log https://eclsoft.com/soft/uploads/20032023/core0750.log