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

[DocDB] Enable deadlock detection in TSAN mode #14709

Closed
amitanandaiyer opened this issue Oct 28, 2022 · 1 comment
Closed

[DocDB] Enable deadlock detection in TSAN mode #14709

amitanandaiyer opened this issue Oct 28, 2022 · 1 comment
Assignees
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@amitanandaiyer
Copy link
Contributor

amitanandaiyer commented Oct 28, 2022

Jira Link: DB-4056

Description

enable deadlock detection in TSAN

@amitanandaiyer amitanandaiyer added area/docdb YugabyteDB core features status/awaiting-triage Issue awaiting triage labels Oct 28, 2022
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Oct 28, 2022
@amitanandaiyer amitanandaiyer self-assigned this Oct 28, 2022
@amitanandaiyer
Copy link
Contributor Author

To look for the first few lines of stack trace where the lock was requested:

Useful for making sense of the stack traces cat ~/bin/process_tsan_failures.sh


if [[ $# -ne 1 ]]; then
    echo "Usage: $0 <log_file>"
    exit -1
fi
LOG_FILE=$1


grep -B 5 -A 25 -E "acquired here|acquired by" $LOG_FILE | awk  '
    BEGIN { max_looking = 5; looking = 0; }
    /=========/
    /thread/ {print ""}
    /acquired/ { looking = max_looking; }
    /lock/ { looking = looking + 1 }
    // { if (looking > 0) { looking = looking - 1; print $0 } } ' | grep -v -E -i "[^ ]lock[^ -]" | grep -v mutex_lock

@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature and removed status/awaiting-triage Issue awaiting triage kind/bug This issue is a bug labels Nov 1, 2022
amitanandaiyer added a commit that referenced this issue Feb 3, 2023
Summary:
# Enable deadlock detection in TSAN_OPTIONS
# Some minor fixes for issues found
# Issues related to cassandra-cpp-driver will be fixed with https://phabricator.dev.yugabyte.com/D20480. Until it lands and third-party is updated, we suppress errors from libcassandra
# For MasterSnapshot related issues. opened #14677. Until it lands we suppress MasterSnapshotCoordinator related errors

Test Plan: jenkins

Reviewers: mbautin, bogdan, rthallam

Reviewed By: rthallam

Subscribers: asrivastava, rsami

Differential Revision: https://phabricator.dev.yugabyte.com/D20426
@bmatican bmatican closed this as completed Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants