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

Fix TSAN error with test confirmation_height.conflict_rollback_cemented #2002

Merged
merged 2 commits into from May 21, 2019

Conversation

2 participants
@wezrule
Copy link
Collaborator

commented May 21, 2019

The std::stringstream used to redirect cerr is not thread safe as it can be modifed when logging is done in the background while we are trying to read from it. I've wrapped it in a boost sink which gives exclusive access now with a mutex, this is only used in tests. I also don't think it is thread-safe to add a sink on the fly so am doing this at the start of the test as well.

Add more blocks to use in rpc.confirmation_height_currently_processing to prevent it failing when run under ASAN.

@wezrule wezrule added this to the V19.0 milestone May 21, 2019

@wezrule wezrule requested a review from SergiySW May 21, 2019

@wezrule wezrule self-assigned this May 21, 2019

@zhyatt zhyatt added this to RC 3 (TBD) in V19 May 21, 2019

@wezrule wezrule merged commit f230c88 into nanocurrency:master May 21, 2019

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details

@wezrule wezrule deleted the wezrule:fix_asan_tsan_tests branch May 21, 2019

argakiig added a commit to argakiig/raiblocks that referenced this pull request May 21, 2019

Fix TSAN error with test confirmation_height.conflict_rollback_cement…
…ed (nanocurrency#2002)

* Fix TSAN error with confirmation_height.conflict_rollback_cemented

* Fix rpc.confirmation_height_currently_processing when running slowly (i.e ASAN)

argakiig added a commit to argakiig/raiblocks that referenced this pull request May 22, 2019

Fix TSAN error with test confirmation_height.conflict_rollback_cement…
…ed (nanocurrency#2002)

* Fix TSAN error with confirmation_height.conflict_rollback_cemented

* Fix rpc.confirmation_height_currently_processing when running slowly (i.e ASAN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.