Skip to content

Running fbserver.exe and fbembed.dll on the same computer (same session) with different locations for FIREBIRD_LOCK leads to deadlock because of fb_trace file [CORE4046] #4376

@firebird-automations

Description

@firebird-automations

Submitted by: Martin Schwedhelm (schwedhelm_m)

1. Start fbServer with FIREBIRD_LOCK="C:\A"
2. Start client application which uses fbembed.dll with FIREBIRD_LOCK="C:\B"
3. Try to open a database in the client application via fbembed.dll.

The problem only occurs if the user has full rights. In my opinion the reason for that is the following code snippet:

TraceConfigStorage.cpp (line 101)

if (fb_utils::isGlobalKernelPrefix() ||
!pfnProcessIdToSessionId ||
pfnProcessIdToSessionId(GetCurrentProcessId(), &sesID) == 0 ||
sesID == 0)
{
filename.printf(TRACE_FILE); // TODO: it must be per engine instance
}
else
{
filename.printf("%s.%u", TRACE_FILE, sesID);
}

Without "fb_utils::isGlobalKernelPrefix()" everything works as expected, but I don't know if that could have side effects.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions