Skip to content
New issue

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

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

Already on GitHub? # to your account

Disable memory pools when running on Mac #2067

Merged
merged 3 commits into from
Jun 11, 2019

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Jun 7, 2019

When running TSAN on Mac I get a warning with the node.node_receive_quorum test:
https://gist.github.com/wezrule/2e3ee5bf2dcd196a40a94fdc2d18da82

Although strangely only when the previous test is run as well, running this test on its own never showed the error. Running the node daemon reports continuous warnings though. After some research I found there seems to be some known issues with the thread sanitizer on mac with shared/weak_ptrs destructors:
https://reviews.llvm.org/D21609?id=61547
https://github.com/llvm-mirror/compiler-rt/blob/master/lib/tsan/rtl/tsan_interceptors_mac.cc#L404

I don't think it's enough to suppress these in the blacklist file as there are other following on TSAN errors as well. I spent a while trying to solve this, but I'm not sure if it's possible on our end, so it seemed best just to disable the warnings entirely. Builds on Ubuntu with both Clang & GCC do not report anything with TSAN. So I'm not sure if this is something we should be concerned about or not, would like opinions on it, perhaps other Mac users can run TSAN as well and see if they see any issues currently (I used Boost 1.69).

EDIT: For now disabling memory pools on Mac entirely, not just when using TSAN

@wezrule wezrule added help wanted sanitizers Related to thread, address or undefined sanitizers labels Jun 7, 2019
@wezrule wezrule added this to the V19.0 milestone Jun 7, 2019
@wezrule wezrule self-assigned this Jun 7, 2019
@wezrule wezrule changed the title Turn off using memory pools when running TSAN on Cac Turn off using memory pools when running TSAN on Mac Jun 7, 2019
@wezrule wezrule changed the title Turn off using memory pools when running TSAN on Mac Turn off using memory pools when running on Mac Jun 10, 2019
@wezrule wezrule changed the title Turn off using memory pools when running on Mac Disable memory pools when running on Mac Jun 10, 2019
@wezrule wezrule removed the request for review from SergiySW June 11, 2019 08:23
@wezrule wezrule merged commit 5517e52 into nanocurrency:master Jun 11, 2019
@wezrule wezrule deleted the tsan_mac_use_memory_pools branch June 11, 2019 08:24
argakiig pushed a commit that referenced this pull request Jun 11, 2019
* Turn off use_memory_pools when using TSAN with mac

* Add TSAN check to nano_wallet

* Turn off using memory pools on Mac entirely
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted sanitizers Related to thread, address or undefined sanitizers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants