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

qa: Non-deterministic behavior in walletnotify.py #3464

Open
patricklodder opened this issue Mar 2, 2024 · 3 comments
Open

qa: Non-deterministic behavior in walletnotify.py #3464

patricklodder opened this issue Mar 2, 2024 · 3 comments
Labels
QA Many Quality Assurance

Comments

@patricklodder
Copy link
Member

There seems to be non-deterministic behavior in walletnotify.py (or in CWallet::AddToWallet) where 30-40% of the time, perhaps only under load, CI fails, always when testing notifications after reorgs.

  File "/home/runner/work/dogecoin/dogecoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main
    self.run_test()
  File "/home/runner/work/dogecoin/dogecoin/qa/rpc-tests/walletnotify.py", line 118, in run_test
    assert self.notifs[self.current_line + 1] == "{} {}".format(txid, 0)
@patricklodder patricklodder added the QA Many Quality Assurance label Mar 2, 2024
@patricklodder patricklodder changed the title qa: Race condition in wallet-notify.py qa: Non-deterministic behavior in wallet-notify.py Mar 2, 2024
@patricklodder patricklodder changed the title qa: Non-deterministic behavior in wallet-notify.py qa: Non-deterministic behavior in walletnotify.py Mar 2, 2024
@xanimo
Copy link
Member

xanimo commented Apr 4, 2024

I've experienced this multiple times over the past few weeks 😿 most recently https://github.com/xanimo/dogecoin/actions/runs/8547684076/job/23422183133 so +1

@daank-c
Copy link
Contributor

daank-c commented Apr 12, 2024

I picked through this a bit, and wanted to mention that the latest one-off CI failure for walletnotify.py actually appears further down at Line 175.

From #3514

Failed test log: https://github.com/dogecoin/dogecoin/actions/runs/8618664633/job/23621563836

Failed

stderr:
  File "/home/runner/work/dogecoin/dogecoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main
    self.run_test()
  File "/home/runner/work/dogecoin/dogecoin/qa/rpc-tests/walletnotify.py", line 175, in run_test
    assert self.notifs[self.current_line + i] == "{} {}".format(txid, 0)

Pass: False, Duration: 15 s

@patricklodder
Copy link
Member Author

patricklodder commented Apr 12, 2024

The 40% failure rate wasn't a joke - I'm manually restarting nearly half the CI runs.

Line 175 is the other place where we're testing notifications post-reorg, just like line 118.

The first fail condition happens in the sunny case where the same tx gets mined post-reorg and the second fail condition happens in the rainy case where we get doublespent after a reorg.

I'll put fixing this higher on my list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Many Quality Assurance
Projects
None yet
Development

No branches or pull requests

3 participants