Commit Graph

43 Commits

Author SHA1 Message Date
MarcoFalke
e669c3156f
Merge #20748: test: Add race:SendZmqMessage tsan suppression
fa957f8dc9 test: Add race:SendZmqMessage tsan suppression (MarcoFalke)

Pull request description:

  Add suppression for `race:SendZmqMessage`, which isn't covered by the existing `zmq::*` suppression

  Fixes #20618

ACKs for top commit:
  hebasto:
    re-ACK fa957f8dc9, as my previous comment is not directly related to this pull changes.

Tree-SHA512: 8642a8b79bbfa4bee89042b66e528f27fd78c5e84a33023df440662e9114e31445fd7b04940f44b11fa4ab7438d346385a21816289c818cce9958a9b16730452
2020-12-23 12:32:33 +01:00
MarcoFalke
fa957f8dc9
test: Add race:SendZmqMessage tsan suppression 2020-12-22 21:53:13 +01:00
Hennadii Stepanov
3e1571285f
Update TSan suppressions 2020-12-22 20:24:23 +02:00
Hennadii Stepanov
d71e29e3e8
qa: Correct epoll_ctl data race suppression
Fixup of #20218. Comments must start from the beginning of the line.
2020-12-22 17:34:29 +02:00
Hennadii Stepanov
e1e68b6305
test: Fix inconsistent lock order in wallet_tests/CreateWallet 2020-12-10 20:49:06 +02:00
Jonas Schnelli
0f020cdf0a sanitizers: Add suppression for unsigned-integer-overflow in libstdc++ basic_string.tcc 2020-11-20 08:40:50 +01:00
practicalswift
0ccb3addf6 tests: Remove no longer needed UBSan suppression (float-divide-by-zero in validation.cpp) 2020-11-12 18:58:59 +00:00
fanquake
c82336c493
Remove references to CreateWalletFromFile
CWallet::CreateWalletFromFile() was removed in
8b5e7297c0 but these references remain.
2020-11-12 13:12:29 +08:00
MarcoFalke
d9f5132736
Merge #20344: wallet: fix scanning progress calculation for single block range
5e146022da wallet: fix scanning progress calculation for single block range (Sebastian Falbesoner)

Pull request description:

  If the blockchain is rescanned for a single block (i.e. start and stop hashes are equal, and with that also the estimated start/stop verification progress values) the progress calculation could lead to a NaN value caused by a division by zero (0.0/0.0), resulting in an invalid JSON result for the `getwalletinfo` RPC.  This PR fixes this behaviour by setting the progress to zero in that special case. Fixes #20297.

  The behaviour can easily be reproduced by continuously running single block rescans in an endless loop, e.g. via
  ```bash
  #!/bin/bash
  while true
  do
      bitcoin-cli rescanblockchain $(bitcoin-cli getblockcount)
  done
  ```

  and at the same time perform some `getwalletinfo` RPCs.

  On the master branch, this leads to frequent invalid responses (tested on mainchain):
  ```
  $ bitcoin-cli getwalletinfo
  error: couldn't parse reply from server
  $ curl --user `cat ~/.bitcoin/.cookie` --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  {"result":{"walletname":"","walletversion":169900,"format":"bdb","balance":0.00000000,"unconfirmed_balance":0.00000000,"immature_balance":0.00000000,"txcount":0,"keypoololdest":1603677276,"keypoolsize":1000,"hdseedid":"3196e33ecb47c7130e6ca60f2f895f9259860dca","keypoolsize_hd_internal":1000,"paytxfee":0.00000000,"private_keys_enabled":true,"avoid_reuse":false,"scanning":{"duration":0,"progress":},"descriptors":false},"error":null,"id":"curltest"}
  ```
  (note that missing value for "progress" in the JSON result).

  On the PR branch, the behaviour doesn't occur anymore.

ACKs for top commit:
  MarcoFalke:
    review ACK 5e146022da
  promag:
    Core review ACK 5e146022da.

Tree-SHA512: f0e6aad5a6cd08b36c5fe820fff0ef26663229b39169a4dbe757f3c795a41cf5c69c9dc90efe7515675ae1059307f8971123781a0514d10704123a6f28b125ab
2020-11-11 16:11:01 +01:00
Sebastian Falbesoner
5e146022da wallet: fix scanning progress calculation for single block range
If the blockchain is rescanned for a single block (i.e. start and stop hashes
are equal, and with that also the estimated verification progress) the progress
calculation could lead to a NaN value caused by a division by zero, resulting in
an invalid JSON result for the getwalletinfo RPC.  Fixed by setting the progress
to zero in that special case.

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2020-11-11 13:15:00 +01:00
MarcoFalke
fa949b3c13
test: Suppress epoll_ctl data race 2020-11-11 10:10:31 +01:00
Antoine Poinsot
a3abeec33a
policy/fees: remove a floating-point division by zero
Reported-by: practicalswift <practicalswift@users.noreply.github.com>
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-09-14 16:23:23 +02:00
John Newbery
58bd369b0d scripted-diff: [net processing] Rename PeerLogicValidation to PeerManager
-BEGIN VERIFY SCRIPT-
sed -i 's/PeerLogicValidation/PeerManager/g' $(git grep -l PeerLogicValidation ./src ./test)
sed -i 's/peer_logic/peerman/g' $(git grep -l peer_logic ./src ./test)
-END VERIFY SCRIPT-

PeerLogicValidation was originally net_processing's implementation to
the validation interface. It has since grown to contain much of
net_processing's logic. Therefore rename it to reflect its
responsibilities.

Suggested in
https://github.com/bitcoin/bitcoin/pull/10756#pullrequestreview-53892618.
2020-09-07 11:15:48 +01:00
MarcoFalke
fa1fc536bb
test: Add tsan supp for leveldb::DBImpl::DeleteObsoleteFiles 2020-08-29 09:55:44 +02:00
Hennadii Stepanov
9a2f12680b
ci: Add tsan suppression for race in DatabaseBatch 2020-07-16 22:41:10 +03:00
Hennadii Stepanov
a76dafa51d
ci: Add tsan suppression for race in BerkeleyBatch 2020-07-05 18:23:26 +03:00
MarcoFalke
fa12d8d3ed
ci: Add tsan suppression for race in wallet 2020-06-30 19:36:25 -04:00
MarcoFalke
fa7b46cc91
test: Add BerkeleyDatabase tsan suppression 2020-06-09 14:15:04 -04:00
MarcoFalke
fa7e002d52
ci: tsan with wallet 2020-06-04 18:26:01 -04:00
MarcoFalke
fa563cef61
test: Add more tsan suppressions 2020-05-31 10:52:06 -04:00
MarcoFalke
fa906bf298
test: Extend tsan suppressions for clang stdlib 2020-05-30 08:33:06 -04:00
MarcoFalke
fa3cc0bfc4
test: Remove unsafe BOOST_TEST_MESSAGE 2020-03-30 15:18:42 -04:00
Wladimir J. van der Laan
2bdc476d4d
Merge #17708: prevector: avoid misaligned member accesses
5f26855f10 test: Remove ubsan alignment suppressions (Wladimir J. van der Laan)
9d933ef919 prevector: avoid misaligned member accesses (Anthony Towns)

Pull request description:

  Ensure prevector data is appropriately aligned. Earlier discussion in #17530.

  **Edit laanwj**: In contrast to #17530, it does this without increase in size of any of the coin cache data structures (x86_64, clang)

  | Struct        | (size,align) before           | (size,align) after  |
  | ------------- | ------------- | ------- |
  | Coin | 48, 8        |     48, 8   |
  | CCoinsCacheEntry | 56, 8    |   56, 8  |
  | CScript | 32, 1       |      32, 8  |

ACKs for top commit:
  laanwj:
    ACK 5f26855f10
  practicalswift:
    ACK 5f26855f10
  jonatack:
    ACK 5f26855f10

Tree-SHA512: 98d112d6856f683d5b212410b73f3071d2994f1efb046a2418a35890aa1cf1aa7c96a960fc2e963fa15241e861093c1ea41951cf5b4b5431f88345eb1dd0a98a
2020-02-12 17:48:30 +01:00
Wladimir J. van der Laan
677fb8e923 test: Add ubsan surpression for crc32c 2020-01-28 17:01:48 +01:00
MarcoFalke
fa37e0a68b
test: Show debug log on unit test failure 2020-01-02 18:00:05 -05:00
Wladimir J. van der Laan
5f26855f10 test: Remove ubsan alignment suppressions
This can be done now that prevector is properly aligned.
2019-12-10 21:00:15 +10:00
MarcoFalke
fa1bfc476c
ci: ubsan report_error_type=1 and add suppressions 2019-12-04 12:16:38 -05:00
Wladimir J. van der Laan
7ea55264b9 test: remove lsan suppression for libcrypto 2019-11-19 15:03:44 +01:00
practicalswift
0616138a07 tests: Remove no longer needed UBSan suppressions (issues fixed). Add documentation. 2019-10-21 18:24:27 +00:00
MarcoFalke
fa410f67aa
test: Suppress false positive leak in secure_allocator<RNGState> 2019-06-18 16:37:28 -04:00
Jonas Schnelli
e9d5e97561
Poly1305: tolerate the intentional unsigned wraparound in poly1305.cpp 2019-03-26 18:12:31 +01:00
practicalswift
d855e4cac8 Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...) 2019-02-07 22:30:25 +01:00
MarcoFalke
88bbcdc4e9
Merge #14357: streams: Fix broken streams_vector_reader test. Remove unused seek(size_t).
4f4993fe2a Remove UBSan suppression (practicalswift)
958e1a307e streams: Remove unused seek(size_t) (practicalswift)

Pull request description:

  Fix broken `streams_vector_reader` test. Remove unused `seek(size_t)`.

  Before this change the test `streams_vector_reader` triggered an unintended unsigned integer wraparound. It tried so seek using a negative value in `reader.seek(-6)`.

  Changes in this PR:
  * Fix broken `VectorReader::seek(size_t)` test case
  * Remove unused `seek(size_t)`

Tree-SHA512: 6c6affd680626363eef9e496748f2f86a522325abab9d6b13161f41125cdc29ceb36c2c1509c90b8ff108d606df7629e55e094cc2b6253b05a892b81ce176b71
2019-01-05 15:06:43 +01:00
practicalswift
6c10037f72 rpc: Fix data race (UB) in InterruptRPC() 2018-12-18 18:52:12 +01:00
practicalswift
eaf4070e3a Add suppression for InterruptRPC (fRPCRunning) data race 2018-12-18 09:33:02 +01:00
practicalswift
069752b726 build: Enable functional tests in the ThreadSanitizer (TSan) build job 2018-12-17 09:24:37 +01:00
Hennadii Stepanov
c5ed6e73d3
Move CheckBlock() call to critical section
This prevents data race for CBlock::fChecked.
2018-11-30 12:40:57 +02:00
MarcoFalke
fa5cef0f78
bench: Destroy wallet txs instead of leaking their memory 2018-11-27 16:52:56 -05:00
practicalswift
6541d59ddc Add LSan suppression warnings 2018-11-26 23:33:17 +01:00
practicalswift
ff7212ec32 Add ASan Travis build 2018-11-26 22:20:46 +01:00
practicalswift
4f4993fe2a Remove UBSan suppression 2018-11-23 16:58:44 +01:00
MarcoFalke
fa7d36b8e7
test: Move UBSAN suppressions to test/sanitizer_suppressions/ubsan 2018-11-22 11:55:53 -05:00
MarcoFalke
89bf196c88 travis: Run thread sanitizer 2018-11-22 11:47:36 -05:00