Issue Details (XML | Word | Printable)

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

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

Possible races while Service destruction

Created: 24/Dec/13 12:21 PM   Updated: 29/May/16 10:30 PM
Component/s: Engine
Affects Version/s: 2.5.2 Update 1, 3.0 Alpha 1, 3.0 Alpha 2, 2.5.3
Fix Version/s: 2.5.3, 3.0 Beta 1

QA Status: Cannot be tested


 Description  « Hide
This destructor sometimes is called concurrently with existing Service::ExistenceGuard object in another thread
Service::~Service()
{
removeFromAllServices();

delete svc_trace_manager;
svc_trace_manager = NULL;

if (svc_current_guard)
{
svc_current_guard->release();
}
}
Variable svc_current_guard is not null exactly in such moment. But after check another thread with ExistenceGuard can continue its work and ExistenceGuard object will be destroyed and svc_current_guard will be released. In this case ~Service will try to leave svc->svc_existence_lock the second time which leads to abort.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov made changes - 24/Dec/13 12:33 PM
Field Original Value New Value
Assignee Alexander Peshkov [ alexpeshkoff ]
Alexander Peshkov made changes - 24/Apr/14 01:41 PM
Fix Version/s 3.0 Beta 1 [ 10332 ]
Alexander Peshkov made changes - 24/Apr/14 01:41 PM
Fix Version/s 2.5.3 [ 10461 ]
Alexander Peshkov added a comment - 25/Apr/14 11:02 AM
In trunk we also avoid cases when global services mutex may get locked for a relatively long time.

Alexander Peshkov made changes - 25/Apr/14 11:02 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Pavel Cisar made changes - 23/Sep/15 11:20 AM
Status Resolved [ 5 ] Closed [ 6 ]
Pavel Zotov made changes - 18/Jan/16 03:32 PM
Status Closed [ 6 ] Closed [ 6 ]
QA Status No test
Pavel Zotov made changes - 29/May/16 10:30 PM
Status Closed [ 6 ] Closed [ 6 ]
QA Status No test Cannot be tested