Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LI-V2.5.2.26448 (SuperClassic) crashes when running script that delete attachments and move database to offline [CORE3944] #4277

Closed
firebird-automations opened this issue Oct 2, 2012 · 17 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Attachments:
gdb_isql_and_gfix_when_shutdown_database.zip
gdb_gfix_online_renamed_database_before_running_its_backup.zip
gdb_gfix_1017_user_status.zip

The following script deletes all attachments from our production, takes some pause to be all cached data flushed on HDD and moves database to offline:
-------------------- begin .sh ----------------
DBNAME=/var/db/firebird/kuntsevomain.fdb
echo call isql to delete all connections in mon\$attachments:
/opt/firebird/bin/isql -i del_conns.sql -user sysdba -pas masterke $DBNAME
sec2sleep=5
sleep $sec2sleep
echo timestamp of $DBNAME before shutdown:
ls --full-time $DBNAME
/opt/firebird/bin/gfix -shut full -force 0 -user sysdba -pas masterke $DBNAME
echo timestamp of $DBNAME after shutdown:
ls --full-time $DBNAME
sec2sleep=20
sleep $sec2sleep
echo timestamp of $DBNAME after pause for flushing OS buffers:
ls --full-time $DBNAME
/opt/firebird/bin/gstat -h -user sysdba -pas masterke $DBNAME
-------------------- finish .sh ----------------

Script `del_conns.sql` contains the following commands:

------------------- begin del_conns.sql --------------
set list on;
select mon$database_name from mon$database;
shell echo "Before deletion from mon\$attachments:";
select
max(current_connection) my_conn
,left(list(a.mon$attachment_id),75)||'...' alive_conns
,left(list(a.mon$remote_address),75)||'...' alive_ip
,left(list(a.mon$attachment_id),75)||'...' alive_pid
,count(*) alive_total
from mon$attachments a;
commit;

delete from mon$attachments
where mon$attachment_id<>current_connection;
commit;
shell echo;
shell echo "After deletion from mon\$attachments:";

select
max(current_connection) my_conn
,left(list(a.mon$attachment_id),75)||'...' alive_conns
,left(list(a.mon$remote_address),75)||'...' alive_ip
,left(list(a.mon$attachment_id),75)||'...' alive_pid
,count(*) alive_total
from mon$attachments a;
commit;
------------------- finish del_conns.sql --------------

Today I've decided to make b/r and call this .sh script.
Suddenly I noted in firebird.log that fb_smp_server was crached and restarted by fbguard.

backtrace files that corresponds to gfix and isql see attach.

Commits: 102700e 1eace34 a8f8465 c98ccc6 FirebirdSQL/fbt-repository@211856e FirebirdSQL/fbt-repository@edef661 FirebirdSQL/fbt-repository@6fa99aa

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

Attachment: gdb_isql_and_gfix_when_shutdown_database.zip [ 12235 ]

Attachment: gdb_gfix_online_renamed_database_before_running_its_backup.zip [ 12236 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

PS.
Total list of coredumps in /var/tmp/firebird in order of files timestamp attribute:

bash-4.1$ ls --sort=time --full-time -r
total 18440
-rw------- 1 firebird root 34312192 2012-10-02 21:26:01.145444233 +0400 core.isql.827
-rw------- 1 firebird root 34328576 2012-10-02 21:26:01.351194462 +0400 core.gfix.871
-rw------- 1 firebird root 34312192 2012-10-02 21:31:01.529387515 +0400 core.isql.991
-rw------- 1 firebird root 34328576 2012-10-02 21:31:01.858253776 +0400 core.gfix.1017
-rw------- 1 firebird root 34312192 2012-10-02 21:36:01.899319554 +0400 core.isql.1072
-rw------- 1 firebird root 34328576 2012-10-02 21:36:02.138319352 +0400 core.gfix.1092
-rw------- 1 firebird root 34312192 2012-10-02 21:41:01.194194465 +0400 core.isql.1145
-rw------- 1 firebird root 34328576 2012-10-02 21:41:01.463194165 +0400 core.gfix.1170

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

PS. The following messages appeared in firebird.log:

firebird (Client) Tue Oct 2 21:25:00 2012
/opt/firebird/bin/fbguard: /opt/firebird/bin/fb_smp_server terminated abnormally (-1)

firebird (Client) Tue Oct 2 21:25:00 2012
/opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/fb_smp_server

firebird (Client) Tue Oct 2 21:30:00 2012
/opt/firebird/bin/fbguard: /opt/firebird/bin/fb_smp_server terminated abnormally (-1)

firebird (Client) Tue Oct 2 21:30:00 2012
/opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/fb_smp_server

firebird (Client) Tue Oct 2 21:35:00 2012
/opt/firebird/bin/fbguard: /opt/firebird/bin/fb_smp_server terminated abnormally (-1)

firebird (Client) Tue Oct 2 21:35:00 2012
/opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/fb_smp_server

firebird (Client) Tue Oct 2 21:40:00 2012
/opt/firebird/bin/fbguard: /opt/firebird/bin/fb_smp_server terminated abnormally (-1)

firebird (Client) Tue Oct 2 21:40:00 2012
/opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/fb_smp_server

firebird (Client) Tue Oct 2 21:45:00 2012
/opt/firebird/bin/fbguard: /opt/firebird/bin/fb_smp_server terminated abnormally (-1)

firebird (Client) Tue Oct 2 21:45:00 2012
/opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/fb_smp_server

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Does it also fail in 2.5.1?

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> Does it also fail in 2.5.1?

Currently I have no machines with 2.5.1, all of out three servers running FB 2.5.2, SC.
Where can I found some instructions how to install two and more instances of FB on the same machine in SuperClassic mode ?

PS. The database on which this fault occured has been saved. I can pack it and upload to some file storage like http://ge.tt if need.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Database is not needed. It's more or less clear why does server die (bug in trace code), but I want to know is it regression in 2.5.2 via 2.5.1 or not.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> but I want to know is it regression in 2.5.2 via 2.5.1 or not.

Sorry, but I can`t install FB onto some another place than /opt/firebird:

[root@reservdb download]#⁠ rpm --verbose --install --prefix=/opt/fb251 firebirdcs-2.5.1.26351-0.amd64.rpm
error: package FirebirdCS is not relocatable

Currently /opt/firebird is the home for SuperClassic 2.5.2.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Pavel, do you still have core files for that stack traces?

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> Pavel, do you still have core files for that stack traces?

yes, surely.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

With core file (for example one for gdb_gfix_1027.txt) please run the following gdb commands:

t 1
f 12
x/gx user_status

and press enter 20 times to see all status vector elements

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

Attachment: gdb_gfix_1017_user_status.zip [ 12237 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Done (please see new attach - gdb_gfix_1017_user_status.zip).

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

In trunk this bug is already fixed.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.3 [ 10461 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants