1. Firebird client library cannot create global mutex "firebird_trace_mutex" for trace log file thread-safe access, when firebird server engine is running on the same machine.
The call in file gds.cpp
HANDLE trace_mutex_handle = CreateMutex(NULL, FALSE, "firebird_trace_mutex");
returns NULL and GetLastError returns 5(ACCESS_IS_DENIED).
2. Different trace log files from different server instances or client application instances are protected by same global mutex.
3. All WaitForSingleObject calls on trace_mutex_handle don`t contain error code checks. Also in case of exception in mutex-protected code block, corresponding ReleaseMutex won`t be called.