bitcoin: Intermittent failures in interface_usdt_mempool.py
https://cirrus-ci.com/task/5779522121891840
[0;34m node0 2023-03-31T11:45:58.812384Z (mocktime: 2023-04-14T11:46:01Z) [http] [httpserver.cpp:257] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:38238 [0m
[0;34m node0 2023-03-31T11:45:58.812543Z (mocktime: 2023-04-14T11:46:01Z) [httpworker.2] [rpc/request.cpp:179] [parse] [rpc] ThreadRPCServer method=getpeerinfo user=__cookie__ [0m
[0;36m test 2023-03-31T11:45:58.814000Z TestFramework (INFO): Hooking into mempool:rejected tracepoint... [0m
[0;36m test 2023-03-31T11:45:59.798000Z TestFramework (INFO): Sending invalid transaction... [0m
[0;36m test 2023-03-31T11:45:59.799000Z TestFramework.p2p (DEBUG): Send message to 127.0.0.1:15944: msg_tx(tx=CTransaction(nVersion=2 vin=[CTxIn(prevout=COutPoint(hash=76b2ca9a8c3ffa3c454db9591dfaf5c4979926154e33a5bef67412ea0eaa16c5 n=0) scriptSig= nSequence=0)] vout=[CTxOut(nValue=49.99968800 scriptPubKey=51202913b252fe537830f843bfdc5fa7d20ba48639a87c86ff837b92d083c55ad7c1)] wit=CTxWitness(CScriptWitness(51,c00000000000000000000000000000000000000000000000000000000000000001)) nLockTime=0)) [0m
[0;36m test 2023-03-31T11:45:59.799000Z TestFramework.p2p (DEBUG): Send message to 127.0.0.1:15944: msg_ping(nonce=00000002) [0m
[0;34m node0 2023-03-31T11:45:59.799697Z (mocktime: 2023-04-14T11:46:01Z) [msghand] [net_processing.cpp:3169] [ProcessMessage] [net] received: tx (133 bytes) peer=0 [0m
[0;34m node0 2023-03-31T11:45:59.800472Z (mocktime: 2023-04-14T11:46:01Z) [msghand] [txmempool.cpp:658] [check] [mempool] Checking mempool with 2 transactions and 2 inputs [0m
[0;34m node0 2023-03-31T11:45:59.800746Z (mocktime: 2023-04-14T11:46:01Z) [msghand] [net_processing.cpp:4174] [ProcessMessage] [mempoolrej] c917a71e43b825756c1d45985fcc87f8c245db0654f5eeb000a92dc2cccb1d6c from peer=0 was not accepted: min relay fee not met, 0 < 104 [0m
[0;34m node0 2023-03-31T11:45:59.800913Z (mocktime: 2023-04-14T11:46:01Z) [msghand] [net_processing.cpp:3169] [ProcessMessage] [net] received: ping (8 bytes) peer=0 [0m
[0;34m node0 2023-03-31T11:45:59.800953Z (mocktime: 2023-04-14T11:46:01Z) [msghand] [net.cpp:2841] [PushMessage] [net] sending pong (8 bytes) peer=0 [0m
[0;36m test 2023-03-31T11:45:59.801000Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:15944: msg_pong(nonce=00000002) [0m
[0;34m node0 2023-03-31T11:45:59.849969Z (mocktime: 2023-04-14T11:46:01Z) [http] [httpserver.cpp:257] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:38238 [0m
[0;36m test 2023-03-31T11:45:59.850000Z TestFramework (INFO): Polling buffer... [0m
[0;34m node0 2023-03-31T11:45:59.850174Z (mocktime: 2023-04-14T11:46:01Z) [httpworker.3] [rpc/request.cpp:179] [parse] [rpc] ThreadRPCServer method=getrawmempool user=__cookie__ [0m
[0;36m test 2023-03-31T11:45:59.898000Z TestFramework (INFO): Ensuring mempool:rejected event was handled successfully... [0m
[0;36m test 2023-03-31T11:45:59.898000Z TestFramework (ERROR): Assertion failed [0m
[0;36m Traceback (most recent call last):[0m
[0;36m File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 132, in main[0m
[0;36m self.run_test()[0m
[0;36m File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/interface_usdt_mempool.py", line 339, in run_test[0m
[0;36m self.rejected_test()[0m
[0;36m File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/interface_usdt_mempool.py", line 323, in rejected_test[0m
[0;36m assert_equal(EXPECTED_REJECTED_EVENTS, handled_rejected_events)[0m
[0;36m File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/util.py", line 56, in assert_equal[0m
[0;36m raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))[0m
[0;36m AssertionError: not(1 == 0)[0m
[0;36m test 2023-03-31T11:45:59.899000Z TestFramework (DEBUG): Closing down network thread [0m
[0;36m test 2023-03-31T11:45:59.949000Z TestFramework (INFO): Stopping nodes [0m
[0;36m test 2023-03-31T11:45:59.950000Z TestFramework.node0 (DEBUG): Stopping node [0m
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 33 (33 by maintainers)
Commits related to this issue
- ci: fix asan task name Pointed out in https://github.com/bitcoin/bitcoin/issues/27380#issuecomment-1536434598. — committed to fanquake/bitcoin by fanquake a year ago
- Merge bitcoin/bitcoin#27584: ci: fix asan task name bf07e3a47e4a8677077e0508558bb11227989ab2 ci: fix asan task name (fanquake) Pull request description: Pointed out in https://github.com/bitcoin/... — committed to bitcoin-core/gui by fanquake a year ago
- Merge bitcoin/bitcoin#27584: ci: fix asan task name bf07e3a47e4a8677077e0508558bb11227989ab2 ci: fix asan task name (fanquake) Pull request description: Pointed out in https://github.com/bitcoin/... — committed to syscoin/syscoin by fanquake a year ago
- ci: fix asan task name Pointed out in https://github.com/bitcoin/bitcoin/issues/27380#issuecomment-1536434598. — committed to 0xB10C/bitcoin by fanquake a year ago
- ci: fix asan task name Pointed out in https://github.com/bitcoin/bitcoin/issues/27380#issuecomment-1536434598. — committed to RandyMcMillan/bitcoin by fanquake a year ago
- no-merge: introduce typo to demonstrate assert_equal issue https://github.com/bitcoin/bitcoin/issues/27380#issuecomment-1578265398 — committed to 0xB10C/bitcoin by 0xB10C a year ago
- Merge bitcoin/bitcoin#27831: test: handle failed `assert_equal()` assertions in bcc callback functions 61f4b9b7ad6e992a9dbbbb091e9b7ba9abe529ac Manage exceptions in bcc callback functions (virtu) Pu... — committed to bitcoin/bitcoin by fanquake a year ago
- Merge bitcoin/bitcoin#27831: test: handle failed `assert_equal()` assertions in bcc callback functions 61f4b9b7ad6e992a9dbbbb091e9b7ba9abe529ac Manage exceptions in bcc callback functions (virtu) Pu... — committed to syscoin/syscoin by fanquake a year ago
- Merge bitcoin/bitcoin#27846: [coinselection] Increase SRD target by change_fee 1771daa815ec014276cfcb30c934b0eaff4d72bf [fuzz] Show that SRD budgets for non-dust change (Murch) 941b8c6539d72890fd4e36... — committed to bitcoin-core/gui by achow101 a year ago
- Merge bitcoin/bitcoin#27846: [coinselection] Increase SRD target by change_fee 1771daa815ec014276cfcb30c934b0eaff4d72bf [fuzz] Show that SRD budgets for non-dust change (Murch) 941b8c6539d72890fd4e36... — committed to syscoin/syscoin by achow101 a year ago
- Merge bitcoin/bitcoin#28088: test: Disable known broken USDT test faf8be7c32be00f660eba90d3f07313fb25d5d1c test: Disable known broken USDT test (MarcoFalke) Pull request description: The failure ... — committed to bitcoin-core/gui by fanquake a year ago
- Merge bitcoin/bitcoin#28088: test: Disable known broken USDT test faf8be7c32be00f660eba90d3f07313fb25d5d1c test: Disable known broken USDT test (MarcoFalke) Pull request description: The failure ... — committed to syscoin/syscoin by fanquake a year ago
- ci: fix asan task name Pointed out in https://github.com/bitcoin/bitcoin/issues/27380#issuecomment-1536434598. — committed to BitgesellOfficial/bitgesell by fanquake a year ago
https://cirrus-ci.com/task/6053265947754496 ? š¢
Unfortunately, it didnāt (https://github.com/bitcoin/bitcoin/runs/13206824577 from master after #27360 was merged)
Have seen this a couple times by now.
cc @0xB10C @virtu
I donāt think the lifetime of
result
is relevant here.GetRejectReason()
gives birth to a fresh temporary copy of the string, having its own lifetime.Yeah, I am just guessing that this is a lifetime issue. It would be good to rule this out.
AFAIU the macros themselves donāt copy any data, rather just define a static probe point. Any arguments passed to them just get incorporated into the assembly code. The tracing program (BPF) if loaded into the kernel can run code at the trace points. Here it can choose to, and AFAIU does in our case with BPF, copy the data into a different kernel space map when it hits a tracepoint, which can then be read by the USDT probe in our python test.
So the data does get copied but not by the macro, rather by the BPF program.
https://cirrus-ci.com/task/4626519738286080?logs=ci#L3262
https://github.com/bitcoin/bitcoin/pull/27831 improves the logging, probably.
see https://github.com/0xB10C/bitcoin/commit/4091d621f16b6316eef5551a56c00bf0e2c0e541 and this CI task https://cirrus-ci.com/task/4909169740873728
@0xB10C and I had a look at this today. Hereās what we found so far:
handle_rejected_event
callback (although we are not sure why they fail).assert_equal()
communicates failed assertions via exceptions. Unfortunately exceptions raised in bcc callback functions are not properly propagated (Exception ignored on calling ctypes callback function: <function PerfEventArray._open_perf_buffer.<locals>.raw_cb_ at 0xffff83490e50>
), so they only appear on stderr, not in the logs. As a consequence, the logs only show that the test case failed, not why it failed.assert_equals()
in bcc callback functions intry
blocks and logging anyAssertionError
exceptions usingself.log()
. Once this (or a better solution, preferable one that involves not ignoring exceptions in ctype callback functions, if thatās possible) is merged, the logs should tell us why themempool:rejected
test fails sporadically.master @ e0a70c5b4f2c691e8d6b507c8ce879f0b0424254. https://cirrus-ci.com/task/5247512164958208:
Again here https://cirrus-ci.com/task/5250935128064000?logs=ci#L3275