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 hangs in embed mode [CORE4753] #5057
Comments
Commented by: Denis (artden) Example to reproduce |
Modified by: Denis (artden)Attachment: FTBugTest.cpp [ 12705 ] |
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Commented by: @hvlad The reason is that child process by default inherits all handles of parent process. Obvious workaround is to run child process with bInheritHandles == FALSE, but this is not always possible and The proposed fix is to explicitly disable handle inheritance for named syncronization objects used by the engine. Fix is committed into v2.5 tree, please verify it with next snapshot build. |
Commented by: @hvlad Simplified test case, using FB3 embedded connection: firebird>isql c:\temp\A.FDB Hung with high CPU load at this point until calc.exe is terminated. Database: c:\temp\a.fdb |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 2 [ 10586 ] Fix Version: 2.5.5 [ 10670 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Denis (artden)
Attachments:
FTBugTest.cpp
Firebird embed hangs in isc_attach_database if to execute new application during previous connection exists. Here is my example how to reproduce it (look at HANGS HERE comment):
#include <Windows.h>
#include <string>
#include "ibase.h"
#pragma comment(lib, "fbclient_ms.lib")
const std::string server_and_path = "d:\\DATABASE.FDB";
const std::string process = "C:\\Windows\\System32\\calc.exe";
const unsigned StatusLen = 20;
void connect1()
{
isc_db_handle db_handle = nullptr;
ISC_STATUS status_vect[StatusLen] = {};
char pdb[1] = { isc_dpb_version1 };
}
void connect2()
{
isc_db_handle db_handle = nullptr;
char pdb[1] = { isc_dpb_version1 };
}
int main(int argc, char* argv[])
{
connect1();
connect2();
return 0;
}
Commits: 67383e1 840ac35 FirebirdSQL/fbt-repository@b8313be FirebirdSQL/fbt-repository@798bba3
The text was updated successfully, but these errors were encountered: