FirebirdSQL/firebird

Deadlock happens when running 'List Trace Sessions' service and there are many active trace sessions

hvlad opened this issue · 2 comments

The bug was found when few instances of QA tests was running concurrently.

The stack trace is attached, look at threads 7 and 2

The problem happens when textual representation for list of trace sessions takes more than 1KB (internal size of service output buffer) and service working thread runs faster than service start thread fire EVENT_SERVICE_START.

Hello. I've noticed the findSession method does not check check if the slot is alive (used > 0) or not. Is it by design?

Hello. I've noticed the findSession method does not check check if the slot is alive (used > 0) or not. Is it by design?

Yes, by design. This is low-level routine that implements binary search, no more.
The caller intentions is not known here.