Skip to content

Conversation

@practicalswift
Copy link
Contributor

Fix data race (UB) in InterruptRPC().

Before:

$ ./configure --with-sanitizers=thread
$ make
$ test/functional/test_runner.py feature_shutdown.py
…
SUMMARY: ThreadSanitizer: data race rpc/server.cpp:314 in InterruptRPC()
…
ALL                 | ✖ Failed  | 2 s (accumulated)

After:

$ ./configure --with-sanitizers=thread
$ make
$ test/functional/test_runner.py feature_shutdown.py
…
ALL                 | ✓ Passed  | 3 s (accumulated)

@laanwj
Copy link
Member

laanwj commented Dec 18, 2018

utACK 10f8244a777392f87c2671d743b14201d24351be

I don't think this can actually result in a data race but an atomic is certainly more appropriate here.

@promag
Copy link
Contributor

promag commented Dec 18, 2018

utACK 9ed8713.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

Remove from the suppressions file?

@practicalswift
Copy link
Contributor Author

@MarcoFalke Done! Please re-review :-)

@promag
Copy link
Contributor

promag commented Dec 18, 2018

utACK 6c10037.

@laanwj laanwj merged commit 6c10037 into bitcoin:master Dec 19, 2018
laanwj added a commit that referenced this pull request Dec 19, 2018
6c10037 rpc: Fix data race (UB) in InterruptRPC() (practicalswift)

Pull request description:

  Fix data race (UB) in `InterruptRPC()`.

  Before:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  SUMMARY: ThreadSanitizer: data race rpc/server.cpp:314 in InterruptRPC()
  …
  ALL                 | ✖ Failed  | 2 s (accumulated)
  ```

  After:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  ALL                 | ✓ Passed  | 3 s (accumulated)
  ```

Tree-SHA512: b139ca1a0480258f8caa7730cabd7783a821d906630f51487750a6b15b7842675ed679747e1ff1bdade77d248807e9d77bae7bb88da54d1df84a179cd9b9b987
@Sjors
Copy link
Member

Sjors commented Dec 21, 2018

I'm still getting feature_shutdown.py failures on Travis, see e.g. https://travis-ci.org/bitcoin/bitcoin/jobs/470997593#L3104

@promag
Copy link
Contributor

promag commented Dec 21, 2018

@Sjors that's fixed by #14958 which depends on #14982.

@markblundeberg
Copy link

(introduced in #14670)

Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request May 23, 2022
6c10037 rpc: Fix data race (UB) in InterruptRPC() (practicalswift)

Pull request description:

  Fix data race (UB) in `InterruptRPC()`.

  Before:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  SUMMARY: ThreadSanitizer: data race rpc/server.cpp:314 in InterruptRPC()
  …
  ALL                 | ✖ Failed  | 2 s (accumulated)
  ```

  After:

  ```
  $ ./configure --with-sanitizers=thread
  $ make
  $ test/functional/test_runner.py feature_shutdown.py
  …
  ALL                 | ✓ Passed  | 3 s (accumulated)
  ```

Tree-SHA512: b139ca1a0480258f8caa7730cabd7783a821d906630f51487750a6b15b7842675ed679747e1ff1bdade77d248807e9d77bae7bb88da54d1df84a179cd9b9b987
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants