Issue Details (XML | Word | Printable)

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

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

Races when starting and quickly shutting down blocking AST thread

Created: 20/Aug/07 06:33 AM   Updated: 26/Oct/07 05:51 AM
Component/s: Engine
Affects Version/s: 2.0.0, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2
Fix Version/s: 2.0.3, 2.1 Beta 2

Time Tracking:
Not Specified

Environment: Solaris 10 / sparc


 Description  « Hide
When engine tries to attach to any database, it starts (if not running yet) blocking AST thread. In case when database does not exist, that thread need to be shutted down. To do it, main thread posts own_wakeup event, and waits for blocking thread to shutdown (or 10 seconds timeout). But in case, when blocking thread performed event clear and wait calls after that post (i.e. have not started yet when was already requested to shutdown), it will never be awakened and will keep running after that 10secs timeout. When closing server process, it leads to AV due to attempts to work with deallocated shared memory.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 30/Aug/07 11:28 AM
Use of native semaphore (incapsulated into class Semaphore) to synchronize blocking AST thread startup solved a problem.