wallet/spend.cpp assertion error #26232

issue devlzcode opened this issue on October 3, 2022
  1. devlzcode commented at 6:23 AM on October 3, 2022: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    Bitcoind fails to determine a fee rate which ends up crashing

    <!--- What behavior did you expect? -->

    RPC method sentoaddress should work as intended and properly calculate the fee.

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    It throws and error and exits bitcoind

    2022-10-03T03:19:42Z FeeEst: 48 > 85% decay 0.99520: feerate: 1000 from (0 - 1000) 99.11% 3063.7/(3067.7 0 mem 23.6 out) Fail: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out)
    2022-10-03T03:19:42Z FeeEst: 12 > 85% decay 0.96200: feerate: 1000 from (0 - 1000) 97.41% 331.8/(340.6 0 mem 0.0 out) Fail: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out)
    2022-10-03T03:19:42Z FeeEst: 612 > 95% decay 0.99931: feerate: 1000 from (0 - 1000) 100.00% 9445.0/(9445.0 0 mem 0.0 out) Fail: (-1 - -1) 0.00% 0.0/(0.0 0 mem 0.0 out)
    bitcoind: wallet/spend.cpp:783: bool CWallet::CreateTransactionInternal(const std::vector<CRecipient>&, CTransactionRef&, CAmount&, int&, bilingual_str&, const CCoinControl&, FeeCalculation&, bool): Assertion `coin_selection_params.m_subtract_fee_outputs || fee_needed <= change_and_fee - change_amount' failed.
    Aborted (core dumped)
    

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    Can't reproduce, the error is seemingly random.

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    22.0

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    Windows 11 WSL Linux Ubuntu 20.04 Ryzen 9 5950X 64 GB RAM

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. devlzcode added the label Bug on Oct 3, 2022
  3. devlzcode commented at 6:26 AM on October 3, 2022: none

    Ideally it should not throw because when ran during production it can have a lot of unexpected results. I should also mention that the actual error message is never logged to the debug.log so I spent a week or more trying to catch this bug and had to run coind without using daemon on my vps and just wait until it happens again. I have not tested because once again it is very unpredictable, but I assume setting a fallback fee should fix this?

  4. fanquake commented at 8:17 AM on October 3, 2022: member

    Looks like this might be the same as #23353, which should have been fixed by #22949. Are you able to test with 23.0, as we haven't yet released a 22.1.

  5. maflcko added this to the milestone 22.1 on Oct 3, 2022
  6. maflcko added the label Wallet on Oct 3, 2022
  7. bitcoin deleted a comment on Oct 4, 2022
  8. devlzcode commented at 7:42 PM on October 5, 2022: none

    Looks like this might be the same as #23353, which should have been fixed by #22949. Are you able to test with 23.0, as we haven't yet released a 22.1.

    I will test with 23.0 as setting s fallback fee rate did not solve the issue.

  9. bitcoin deleted a comment on Oct 7, 2022
  10. fanquake commented at 9:00 AM on October 10, 2022: member

    I will test with 23.0 @agent-ly were you able to test with 23.0?

  11. fanquake commented at 5:03 PM on October 31, 2022: member

    ping @agent-ly

  12. maflcko commented at 8:19 AM on November 1, 2022: member

    Anything holding back a 22.1rc1?

  13. fanquake commented at 8:57 AM on November 1, 2022: member

    Anything holding back a 22.1rc1?

    #26430.

  14. fanquake commented at 2:10 PM on November 17, 2022: member

    No response in regards to further testing, so closing this for now. Please comment if you have further info / test results, and this can be reopened if necessary. Note that binaries for a 22.1rc1 are also available for testing: https://bitcoincore.org/bin/bitcoin-core-22.1/test.rc1/.

  15. fanquake closed this on Nov 17, 2022

  16. bitcoin locked this on Nov 17, 2023
Labels

Milestone
22.1


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me