Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible races while Service destruction [CORE4303] #4626

Closed
firebird-issue-importer opened this issue Dec 24, 2013 · 8 comments
Closed

Possible races while Service destruction [CORE4303] #4626

firebird-issue-importer opened this issue Dec 24, 2013 · 8 comments

Comments

@firebird-issue-importer

Submitted by: @romansimakov

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.

Commits: cb73693 a98e565 FirebirdSQL/fbt-repository@cbe27b4 FirebirdSQL/fbt-repository@ec4bc87

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 24, 2013

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 24, 2014

Modified by: @AlexPeshkoff

Fix Version: 3.0 Beta 1 [ 10332 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 24, 2014

Modified by: @AlexPeshkoff

Fix Version: 2.5.3 [ 10461 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 25, 2014

Commented by: @AlexPeshkoff

In trunk we also avoid cases when global services mutex may get locked for a relatively long time.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 25, 2014

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 23, 2015

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 18, 2016

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 30, 2016

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment