bitcoin
bitcoin copied to clipboard
Internal bug detected: Fee needed > fee paid
Is there an existing issue for this?
- [X] I have searched the existing issues
Current behaviour
It's a bitcoinfaucet.uo1.net testnet node that is sending bitcoins and checking balance. It stopped working and was restarted. I've lost all bug details, but it happened at least once. Restarting node helped.
Relevant log output
bitcoinfaucet-background-job-1 | Internal bug detected: Fee needed > fee paid bitcoinfaucet-background-job-1 | wallet/spend.cpp:1226 (CreateTransactionInternal) bitcoinfaucet-background-job-1 | Bitcoin Core v26.0.0 bitcoinfaucet-background-job-1 | Please report this issue here: https://github.com/bitcoin/bitcoin/issues
How did you obtain Bitcoin Core
Used docker image: https://hub.docker.com/layers/lncm/bitcoind/v26.0/images/sha256-c0c0de75b134d767310ad53c9f499b013c8607ae9a8a7b0b1d8947b46726758c?context=explore
Operating system and version
Debian GNU/Linux 11 (bullseye)
Ref: https://github.com/bitcoin/bitcoin/blame/v26.0/src/wallet/spend.cpp#L1223-L1227
I presume the following may be interesting for someone to debug this, if you don't mind to share:
Which wallet settings are you using? (Feerate, etc) Which RPCs are you using? Which amounts and settings are you passing to the RPCs? SFFO? How many wallet coins do you have? Maybe an exact list with amounts ?
bitcoind settings: -limitancestorcount=1000 -txindex=1 -testnet -server
RPCs:
- sendmany('', $amounts, 0, '', [], true, 1)
- getbalance('*', 1)
- getbalance('*', 0)
Amounts vary, but quite small always. You can examine some of the last transactions:
https://live.blockcypher.com/btc-testnet/tx/980f2c14c3930d31485b94ae449177dfa8dadeeaba838d5a0a171e039d955dd2 https://live.blockcypher.com/btc-testnet/tx/298d311345c671b6cac8ca58d683789f736de106d69b67fb49cb261dc2b351c1 https://live.blockcypher.com/btc-testnet/tx/0ec27c2a1f510ba458b3eb7b28aff68a977e1a2c93a262b2c37a8a4b471aa989 https://live.blockcypher.com/btc-testnet/tx/0d6e3141c0bd2d84bed1ec3a460743f11582c691f8c6b7ee898a1e080d46a5f6
Current balance is just a little below 400.
I don't log the exact amounts, so it's not available.
I'd like to reproduce your issue on my local environment.
Can you please provide steps to reproduce this issue?
Also, does this issue happen every time, or is it intermittent?
@epiccurious The issue is intermittent, because "Restarting node helped." (see the report)
Ref: https://github.com/bitcoin/bitcoin/blame/v26.0/src/wallet/spend.cpp#L1223-L1227 Nm
For some type of error like this, why we're not containing the values (in this case fee_needed and current_fee) to show the user a more clear error message (so he can realize faster what's wrong) and also easier for debugging?
I didn't find a way to reproduce it after the restart.
So it never happened again at all after the restart?