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

Intermittent failure in mining_getblocktemplate_longpoll.py #26962

Closed
mzumsande opened this issue Jan 24, 2023 · 3 comments · Fixed by #27941
Closed

Intermittent failure in mining_getblocktemplate_longpoll.py #26962

mzumsande opened this issue Jan 24, 2023 · 3 comments · Fixed by #27941

Comments

@mzumsande
Copy link
Contributor

Seen on master, https://cirrus-ci.com/task/6706434163867648?logs=ci#L5577

2023-01-24T20:06:14.173000Z TestFramework (INFO): Test that introducing a new transaction into the mempool will terminate the longpoll
2023-01-24T20:07:34.182000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 134, in main
    self.run_test()
  File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/mining_getblocktemplate_longpoll.py", line 74, in run_test
    assert not thr.is_alive()
AssertionError
2023-01-24T20:07:

@mzumsande mzumsande added the Bug label Jan 24, 2023
@maflcko maflcko added the Tests label Feb 7, 2023
@maflcko
Copy link
Member

maflcko commented Feb 7, 2023

My guess is that the thread (or memory, or storage) is put to sleep for several seconds. Not sure how to fix this, though.

@mzumsande
Copy link
Contributor Author

Doesn't look very critical to me, plus it's very rare (I've seen it just this once), so maybe close this as a one-off at some point.

@maflcko
Copy link
Member

maflcko commented Feb 7, 2023

I am seeing it regularly. (A few times per month, depending on how many CI runs you look at in the month, see #19684 (comment))

But there is also the tx delay issue, #19732, so maybe we just give up and accept some failures

sidhujag pushed a commit to syscoin/syscoin that referenced this issue Aug 17, 2023
…emplate_longpoll.py

fa748c6 test: Fix intermittent issue in mining_getblocktemplate_longpoll.py (MarcoFalke)

Pull request description:

  Fixes bitcoin#26962

  Wait for the thread to have started and the RPC to have reached the node before continuing. Otherwise the test may run into a race.

  For example:

  ```
   test  2023-06-23T13:10:29.245000Z TestFramework (INFO): Test that introducing a new transaction into the mempool will terminate the longpoll
   node0 2023-06-23T13:10:29.245712Z [http] [httpserver.cpp:254] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:43568
   node0 2023-06-23T13:10:29.245915Z [httpworker.3] [rpc/request.cpp:181] [parse] [rpc] ThreadRPCServer method=getblocktemplate user=__cookie__
   node0 2023-06-23T13:10:29.252594Z [http] [httpserver.cpp:254] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:43568
   node0 2023-06-23T13:10:29.254545Z [httpworker.2] [rpc/request.cpp:181] [parse] [rpc] ThreadRPCServer method=getblockchaininfo user=__cookie__
   node0 2023-06-23T13:10:29.256530Z [http] [httpserver.cpp:254] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:43568
   node0 2023-06-23T13:10:29.256741Z [httpworker.1] [rpc/request.cpp:181] [parse] [rpc] ThreadRPCServer method=sendrawtransaction user=__cookie__
   node0 2023-06-23T13:10:29.258033Z [httpworker.1] [validationinterface.cpp:213] [TransactionAddedToMempool] [validation] Enqueuing TransactionAddedToMempool: txid=38335600f2465c0f8bb2b86d5830a34851d86fa879800c0e1434ddfc78c42898 wtxid=c033cd3efd301c369d66cf759769159609471bd4f9efb3ee30e7209e57b74778
   node0 2023-06-23T13:10:29.258263Z [httpworker.1] [txmempool.cpp:660] [check] [mempool] Checking mempool with 1 transactions and 1 inputs
   node0 2023-06-23T13:10:29.258542Z [scheduler] [validationinterface.cpp:213] [operator()] [validation] TransactionAddedToMempool: txid=38335600f2465c0f8bb2b86d5830a34851d86fa879800c0e1434ddfc78c42898 wtxid=c033cd3efd301c369d66cf759769159609471bd4f9efb3ee30e7209e57b74778
   node0 2023-06-23T13:10:29.259549Z [http] [httpserver.cpp:254] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:43568
   node0 2023-06-23T13:10:29.259745Z [httpworker.0] [rpc/request.cpp:181] [parse] [rpc] ThreadRPCServer method=decoderawtransaction user=__cookie__
   node0 2023-06-23T13:10:29.261066Z [http] [httpserver.cpp:254] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:52690
   node0 2023-06-23T13:10:29.261803Z [http] [httpserver.cpp:254] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:43568
   node0 2023-06-23T13:10:29.262770Z [httpworker.2] [rpc/request.cpp:181] [parse] [rpc] ThreadRPCServer method=getblocktemplate user=__cookie__
  ```

  (`sendrawtransaction` is called before `getblocktemplate`)

ACKs for top commit:
  jamesob:
    Github ACK bitcoin@fa748c6
  theStack:
    ACK fa748c6

Tree-SHA512: c67d9ec7c56e8a22c1a26a3c3d4d4a4bcc17e4282cad0d66561ba2abd6e92240cb028369b4edc6077ea34e8736c0294f6066381979aee22a6166580cea43729a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants