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

Firebird take 100% process when I stop sharply transaction [CORE2236] #2663

Closed
firebird-automations opened this issue Dec 12, 2008 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: stéphane bommé (bost49)

Jira_subtask_inward CORE1801

I have the same problem that reported by Andreas.
To reproduce it, I do the same test that he describe but I stop sharply the test in step 3. I do this a few time. Then there is a lot of transaction active but not commited and Firebird go to 100% until long minuts.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

I understand nothing

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

More details are required, otherwise this case will be closed as "not reproducible".

@firebird-automations
Copy link
Collaborator Author

Commented by: stéphane bommé (bost49)

I do these steps to reproduce the problem :

1. I open a transaction and i do a sql request like 'select * from testtable'. I dont' rollback or commit this transaction. It still 's active.
2. I run a program that make three operations :
- open transaction
- update testtable
- commit transaction
These operations are repeated until 100000 times.
3.Sometimes, I kill the program before it finish.

Server version: WI-V6.3.1.17910 Firebird 2.1
When I run gstat, I can see
Database header page information:
Flags 0
Checksum 12345
Generation 2778540
Page size 4096
ODS version 11.1
Oldest transaction 2725469
Oldest active 2725470
Oldest snapshot 2725470
Next transaction 2778520
Bumped transaction 1
Sequence number 0
Next attachment ID 426
Implementation ID 16
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 3
Creation date Dec 4, 2008 11:46:46
Attributes force write

Variable header data: 
    Sweep interval:         2000 
    \*END\* 

And when I run gfix -v, I have this
Connection error.
bad parameters on attach or create database.
secondary server attachments cannot validate databases.
IBE: Validation completed.

Can I activate a trace or something else to see what Firebird is doing ?

I hope this information can help you.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

So, you disable garbage collection, produced a lot of record versions and what ? You expect all this garbage will disapear immediately ?
Show us what you think is wrong in your case, please. So far i don't understand what is bad for you...

@firebird-automations
Copy link
Collaborator Author

Commented by: stéphane bommé (bost49)

Why did you say I have disabled garbage collection ?
I don't expect that all garbage will disapear immedialtely but when Firebird takes 100% CPU during 30min, it seems to me that it's a bit longer. (AMD Athlon 64x2 Dual, Core Processor 4200+ 2.20Ghz 2.93 Go Ram).
And when I run gstat immediatly after this long operation, nothing changes.
After Firebird takes long time to do "garbage" or "other things", I can't connect whith gfix. I have this error : "bad parameters on attach or create database.secondary server attachments cannot validate databases."

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

> Why did you say I have disabled garbage collection ?

Because of your step (1) which starts transaction and not end it during the test

> I don't expect that all garbage will disapear immedialtely but when Firebird takes 100% CPU during 30min, it seems to me that it's a bit longer.

I don't understand when Firebird start load CPU and when it finished.

> And when I run gstat immediatly after this long operation, nothing changes.

What changes do you expect ?

> After Firebird takes long time to do "garbage" or "other things", I can't connect whith gfix. I have this error : "bad parameters on attach or create database.secondary server attachments cannot validate databases."

At which language i must translate it for you ? :) Read again last phrase : "secondary server attachments cannot validate databases"

Stephane, this is pure support question. Sorry, but you not understand what is garbage collection, what is gfix, gstat and how to use it.
Ask in our support list and you'll get answers on all of your questions (even on that you don't guess currently ;)

Also return sweep_interval to it default value or set it to zero and run sweep manually from time to time.

@firebird-automations
Copy link
Collaborator Author

Commented by: stéphane bommé (bost49)

> Because of your step (1) which starts transaction and not end it during the test
OK

> I don't understand when Firebird start load CPU and when it finished.
Firebird takes CPU when I run my test, it's normal. But when I stop my test, he continue to take 100% CPU during long minuts(30)

>At which language i must translate it for you ? :) Read again last phrase : "secondary server attachments cannot validate databases"
Sorry, I haven't read careffully this message.

> Also return sweep_interval to it default value or set it to zero and run sweep manually from time to time.
I tried this. I had set sweep_interval to zero but I had the same trouble.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

> Firebird takes CPU when I run my test, it's normal. But when I stop my test, he continue to take 100% CPU during long minuts(30)

Because it must clean up all of 100000th record versions you produced while garbage collection was disbaled.
Run "gstat -r -t testtable" just before the commit of transaction (1) and look how many record versions you have and length of version chains.

You may disable background garbage collection using GCPolicy setting in firebird.conf but you will clean garbage at another time anyway.

> I had set sweep_interval to zero but I had the same trouble.

Because it is not directly related to this case. But value of 2000 is BAD, believe me or not.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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

1 participant