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

Avoid data race condition in MessageLogger #986

Merged
merged 1 commit into from Oct 4, 2013

Conversation

Dr15Jones
Copy link
Contributor

Previously the code was caching into MessageLogger itself the previous state of the MessageDrop before entering a module. This was used to then attempt to reset the state after leaving the module. This doesn’t work correctly in a threaded environment. The state being remembered was just the default state between modules and is actually known at construction time. Therefore the default values are now only set at construction time. [Found by helgrind.]

…ageLogger configuration on the thread

Previously the code was caching into MessageLogger itself the previous state of the MessageDrop before entering a module. This was used to then attempt to reset the state after leaving the module. This doesn’t work correctly in a threaded environment. The state being remembered was just the default state between modules and is actually known at construction time. Therefore the default values are now only set at construction time. [Found by helgrind.]
@Dr15Jones
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2013

This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it?

@nclopezo
Copy link
Contributor

nclopezo commented Oct 4, 2013

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2013

This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it?

ktf added a commit that referenced this pull request Oct 4, 2013
Multithreaded fixes -- Avoid data race condition in MessageLogger
@ktf ktf merged commit 3030469 into cms-sw:CMSSW_7_0_X Oct 4, 2013
folguera pushed a commit to folguera/cmssw that referenced this pull request Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants