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
FB 2.5 freezes during data pump operations [CORE2760] #1164
Comments
Modified by: michalk1 (michalk1)Attachment: FreezeTest.zip [ 11521 ] |
Commented by: Sean Leyne (seanleyne) Since the problem only occurs with loopback database connections, this strongly suggests that the problem is not with Firebird but the local PC/system. This issue should be discussed in the Support mailing list, please see the Firebird web site (http://www.firebirdsql.org) for the subscription details. |
Commented by: michalk1 (michalk1) Sean, I am able to reproduce the problem on several machines with different OS versions. If it really was just a problem of some local PCs, why would it be specific to FB 2.5 only, or Superserver only ? I assume the fact that remote acces is resistant to the error may be caused by different timing (slower rate of inserts than on local connection). Support mailing list says is (according to its description) intended only for released FB versions (not for Beta builds) and FB 2.1 passes the test without problems. |
Commented by: @dyemanov Could you please post the source code of the test application? |
Commented by: michalk1 (michalk1) The source files (Delphi) are included in the attached file Freezetest.Zip, in Src subdirectory. |
Commented by: @dyemanov I see them now, sorry :-) I can reproduce the issue and have already started debugging it. |
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 RC2 [ 10372 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: No test => Cannot be tested Test Details: Attach does not exist. |
Submitted by: michalk1 (michalk1)
Attachments:
FreezeTest.zip
When there is a combination of concurrent read and insert operations in one application with two database connections (application which select records from one table and inserts them into another one), application tends to freeze on some of the insert calls.
Some clues:
- The test application must be the only one accessing the server. Any other server access (even to another database) seems to "unfreeze" the application for some time.
- Application opens two independent database connections. When I use just one connection, the freeze never occures.
- The problem seem to be specific to Superserver, i can't reproduce it with classic.
- Connection must be local TCP connection (localhost). When I switch to true local connection or connect from another machine, all is ok.
- There must be more CPU cores in the machine or enabled hyperthreading, machines with only one enabled core without hyperthreading don't freeze.
- The problem is less likely if I set CPU affinity in firebird.conf to 3.
Many of those aspects resemble CORE419 that was fixed in FB2.0, but this time the application freezes forever, not just 60 seconds. I attach slightly modified testcase from CORE419 with instructions how to reproduce the problem:
It uses two independent database connections to one database. One to read from "source" table, second to write to "destination" table. Source connection executes SELECT * from source table, and for every fetched row the destination connection inserts one row into destination table by INSERT INTO statement. The database contains no other tables and the tables contain just one integer column. The main loop (written in Delphi using IBX components) looks like this:
...
SrcSQL.SQL.Add('SELECT * FROM SRCTAB');
SrcSQL.ExecQuery;
DstSQL.SQL.Add('INSERT INTO DSTTAB (ID) VALUES (:ID)');
...
RecNo:=0;
while not SrcSQL.Eof do
begin
...
DstSQL.Params[0].AsInteger:=RecNo;
DstSQL.ExecQuery;
SrcSQL.Next;
Inc(RecNo);
end;
The loop transfers 10000 rows, then commits the data. The loop is executed repeatedly, the destination table is cleaned after every cycle. The application freezes at random moments after executing the DstSQL.ExecQuery command.
====== Test Details ======
Attach does not exist.
The text was updated successfully, but these errors were encountered: