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

tests: Limit the segments to be merged under tsan to suppress deadlock #9259

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Jul 26, 2024

What problem does this PR solve?

Issue Number: close #9257

Problem Summary:

The TSAN will failed when one thread hold locks larger than 64. StoreIngestTest.ConcurrentIngestAndWrite will try to do "segmentMerge" on many segments (more than 500), causing this problem.

The code in question is in lib/sanitizer_common/sanitizer_deadlock_detector.h
It limits the number of simultaneously held locks in a given thread to an arbitrary large number 64.
If you hold 65 locks in one thread at once, this will fail.

What is changed and how it works?


  • Limit the segments to be merged under tsan
  • Suppress a data race on xxh3

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Jul 26, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 26, 2024
Copy link
Contributor

@yibin87 yibin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-26 11:38:56.02014423 +0000 UTC m=+5820.147204406: ☑️ agreed by JinheLin.
  • 2024-07-29 01:35:08.86383267 +0000 UTC m=+146825.143880740: ☑️ agreed by yibin87.

@JaySon-Huang
Copy link
Contributor Author

/test pull-unit-test

Copy link
Contributor

ti-chi-bot bot commented Jul 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JinheLin, Lloyd-Pottiger, yibin87

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JinheLin,Lloyd-Pottiger,yibin87]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot merged commit 334d9b9 into pingcap:master Jul 29, 2024
5 checks passed
@JaySon-Huang JaySon-Huang deleted the fix_tsan_check branch July 29, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed test StoreIngestTest.ConcurrentIngestAndWrite under tsan
4 participants