Skip to content

test: Suppress epoll_ctl data race#20218

Merged
maflcko merged 1 commit intobitcoin:masterfrom
maflcko:2010-testSuppWalletRace
Nov 11, 2020
Merged

test: Suppress epoll_ctl data race#20218
maflcko merged 1 commit intobitcoin:masterfrom
maflcko:2010-testSuppWalletRace

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Oct 22, 2020

@DrahtBot DrahtBot added the Tests label Oct 22, 2020
@hebasto
Copy link
Member

hebasto commented Nov 10, 2020

I think our code should fixed to prevent data race in MaybeCompactWalletDB instead of silencing a warning as it seems related to CScheduler rather internal BDB code.

Updated.

@maflcko
Copy link
Member Author

maflcko commented Nov 10, 2020

@hebasto I agree, but until someone figured out where the issue happens and how to fix it, we should suppress the intermittent failures, because they are hurting the project.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

Approach ACK fa5c8f4b7027200d8f54aad83ab5c1bfc5a42c90.

It seems the data race in epoll_ctl could be false positive, and be caused by clang tsan instrumentation code (e.g., https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20131007/190642.html). But not for sure, of course.

Also there is a possibility that this issue is/will be fixed in newer libevent versions.

@maflcko maflcko changed the title test: Suppress MaybeCompactWalletDB data race test: Suppress epoll_ctl data race Nov 11, 2020
@maflcko maflcko force-pushed the 2010-testSuppWalletRace branch from fa5c8f4 to fa949b3 Compare November 11, 2020 09:10
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK fa949b3, I have reviewed the code and it looks OK, I agree it can be merged.

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@maflcko maflcko merged commit 179ece4 into bitcoin:master Nov 11, 2020
@maflcko maflcko deleted the 2010-testSuppWalletRace branch November 11, 2020 15:00
@maflcko
Copy link
Member Author

maflcko commented Dec 3, 2020

Not sure why, but this doesn't work:

https://cirrus-ci.com/task/5734386425397248?command=ci#L5451

@hebasto
Copy link
Member

hebasto commented Dec 3, 2020

Not sure why, but this doesn't work:

https://cirrus-ci.com/task/5734386425397248?command=ci#L5451

Indeed (

hebasto added a commit to hebasto/bitcoin that referenced this pull request Dec 22, 2020
Fixup of bitcoin#20218. Comments must start from the beginning of the line.
@hebasto
Copy link
Member

hebasto commented Dec 22, 2020

@MarcoFalke

Not sure why, but this doesn't work:

https://cirrus-ci.com/task/5734386425397248?command=ci#L5451

See #20745.

maflcko pushed a commit that referenced this pull request Dec 22, 2020
d71e29e qa: Correct epoll_ctl data race suppression (Hennadii Stepanov)

Pull request description:

  Fixup of #20218. Comments must start from the beginning of the line.

ACKs for top commit:
  MarcoFalke:
    review ACK d71e29e

Tree-SHA512: 4d8663ab505c347bcb62c2f118656e3343d5179825be0d1b86761ffdfdae1e7462002bf226a54dfc94be5885ce7f2633abaf70421ea35bf06eddad8e99fb9683
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 22, 2021
Summary:
> It seems the data race in epoll_ctl could be false positive, and be caused by clang tsan instrumentation code (e.g., https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20131007/190642.html). But not for sure, of course.

This is a backport of [[bitcoin/bitcoin#20218 | core#20218]] and [[bitcoin/bitcoin#20745 | core#20745]]

Note: I wasn't able to reproduce it today in a loop of 10 `ninja check-functional`, but I have seen this race in the past. I have a log file locally with a `ThreadSanitizer` data race involving `epoll_ctl`.

Test Plan:
With TSAN:

```
for i in `seq 10`; do  ninja check-functional; done
```

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10722
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants