Issue Details (XML | Word | Printable)

Key: CORE-1562
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Saulius Vabalas
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Shutdown does not kill high load query connections

Created: 02/Nov/07 02:57 PM   Updated: 18/Nov/08 01:52 PM
Component/s: Engine
Affects Version/s: 2.1 Beta 2
Fix Version/s: 2.1 RC1

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

Environment: CS on Windows

Sub-Tasks  All   Open   

 Description  « Hide
When one of attachments is running high load query like:
 select count(*) from rdb$triggers,rdb$triggers,rdb$triggers,rdb$triggers,rdb$triggers;

"gfix -shut full -force 0 " is waiting for such query completion. In case query is ran away query and it will be running for hours or days - there is no way to finish shutdown operation. Exact query identification using monitoring tables is also problematic. See CORE-1561 for details.


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Saulius Vabalas added a comment - 20/Nov/07 12:49 PM
Dmitry,

I retested this case on Firebird-2.1.0.17176-0_Win32 (2007-11-14 02:11:33 snapshot build). Even gfix now exists with error "Connection Lost to database", the high load connection is not killed. It is listed as active process with 0 CPU utilization. Starting from this point it's impossible to bring DB online. "gfix -online" gives "lock conflict on no wait transaction -database C:\TEST.FDB shutdown" error. Can You look into it one more time?

Dmitry Yemanov added a comment - 22/Nov/07 02:49 AM
By design, shutdown doesn't kill connections. It just interrupts their activity, releases their locks and mark database as shutdown. So the behavior you see is expected. However, the issue with bringing database online smells like a bug. I will take a look.

Saulius Vabalas added a comment - 23/Nov/07 11:50 PM
For some reason client activity is not interrupted on client side. After shutdown it keeps running withour any error. So client has no clue what is going on ank keeps waiting for data which will never be delivered. Shouldn't client get SQL error in this case?

Dmitry Yemanov added a comment - 10/Dec/07 09:41 AM
The issue with a loaded process being locked up after shutdown is confirmed, I'm working on a solution.