<!-- 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. -->