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

Improve mutex handling when generating stacktraces with NANO_TIMED_LOCKS/txn tracker #2685

Merged
merged 3 commits into from
Jul 16, 2020

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Mar 26, 2020

A new CMake variable is introduced, which can be used like so:
-DNANO_TIMED_LOCKS_IGNORE_BLOCKED=ON

Which turns off the timings with NANO_TIMED_LOCKS for mutexes which are blocked while waiting for other thread to release the mutex. This necessarily needs to be done after acquiring the mutex so cannot avoid generating a stacktrace while holding the mutex (which is slow on Windows). With the database transaction tracker it can avoid generating the stacktrace while acquiring the track mutex, so this is now done (TSAN ran with the rpc.database_txn_tracker test).

It does not help in the case where an unrelated mutex has been acquired prior to these operations.

Updated some comments

@wezrule wezrule added documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability cli Changes related to the Command Line Interface labels Mar 26, 2020
@wezrule wezrule added this to the V22.0 milestone Mar 26, 2020
@wezrule wezrule self-assigned this Mar 26, 2020
@wezrule wezrule requested a review from argakiig June 18, 2020 14:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cli Changes related to the Command Line Interface documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants