FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.23k stars 212 forks source link

"Fatal lock manager error: invalid lock id (0), errno: 0" when shutting down database with "gfix -shut full -force nnn" [CORE4042] #4372

Open firebird-automations opened 11 years ago

firebird-automations commented 11 years ago

Submitted by: John Franck (bozzy)

Attachments: firebird.log

When shutting down several DBs for scheduled server maintenance/backup every night, sometimes the fb_smp_server crashes and the log reports "Fatal lock manager error: invalid lock id (0), errno: 0" (it seems similar to CORE3016). Then the guardian seems unable to restart the server process for several times, it attempts to open a wrong named file (see attached firebird.log).

I can't tell if there are open connections to the DBs being shut down, but it seems the -force timeout (300 in my case) has not been reached, although the shutdown process takes one or two minutes when the problem occurs, vs just one or two seconds in normal situations.

This problems never occurred with FB 2.5.1.

firebird-automations commented 11 years ago

Commented by: John Franck (bozzy)

Log of the crash situation

firebird-automations commented 11 years ago
Modified by: John Franck (bozzy) Attachment: firebird\.log \[ 12284 \]
firebird-automations commented 11 years ago

Commented by: @dyemanov

Just for the record, forced shutdown with a non-zero timeout is known to not work at all in Classic / SuperClassic, see CORE3817.

firebird-automations commented 11 years ago
Modified by: @dyemanov priority: Critical \[ 2 \] =\> Major \[ 3 \] assignee: Dmitry Yemanov \[ dimitr \]
firebird-automations commented 11 years ago

Commented by: @AlexPeshkoff

Probably worth trying 2.5.3 snapshot? At least one bug, that caused invalid lock id (0), is fixed in it.

firebird-automations commented 11 years ago

Commented by: John Franck (bozzy)

I can't switch to 2.5.3 snapshot here, I'm on a production environment. CORE3817 opens another issue however, so have I to change my shutdown to -force 0? Is there any other workaround to avoid killing possible active connections so brutally?

Also I forgot to mention that, after such crashes, sometimes one of the shutdown DBs becomes inaccessible even after having it online. The only solution I've found by now is to stop and start firebird engine ( /etc/init.d/firebird stop, /etc/init.d/firebird start ), while a simple restart ( /etc/init.d/firebird restart ) doesn't help (tried it several times). This causes severe disservice.