Issue Details (XML | Word | Printable)

Key: CORE-5452
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Alexander Peshkov
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

Segfault when engine's dynamic library is unloaded right after closing worker threads (GC and/or cache writer)

Created: 13/Jan/17 11:29 AM   Updated: 24/Jan/17 09:45 PM
Component/s: Engine
Affects Version/s: 4.0 Initial, 3.0.0, 3.0.1
Fix Version/s: 3.0.2, 4.0 Alpha 1

Environment: POSIX (reported and reproduced on Linux)

QA Status: Cannot be tested

 Description  « Hide
The issue was reported multiple times in fb devel list, I will mention here Damyan Ivanov and Stephan Bergmann.

The reason of a bug is related with a method of worker thread shutdown based on semaphore. At the very end of thread code shutdown semaphore is released. Code that initiated worker thread shutdown waits for that semaphore and continues execution when shutdown semaphore is released. That's almost always OK but sometimes thread may get frozen after releasing shutdown semaphore (to make bug reproducible I've emulated this with long cycle after semaphore release) and when it tries to resume dynamic library is already unloaded from RAM causing attempt to execute code at wrong address. That's why we always get blind stacks for a thread which caused segfault.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.