Skip to content

doc: Internal bug detected running listtransactions on OP_RETURN output #26338

@dooglus

Description

@dooglus

I saw an internal bug detected message running listtransactions:

$ bitcoin-cli listtransactions '*' 500
error code: -1
error message:
Internal bug detected: "std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); })"
rpc/util.cpp:587 (HandleRequest)
Please report this issue here: https://github.com/bitcoin/bitcoin/issues

I narrowed it down to a particular transaction in my history:

$ for i in {453..455}; do echo "--- $i ---"; bitcoin-cli listtransactions '*' 1 $i; done
--- 453 ---
[
  {
    "address": "bc1qnle0kjvz4wyju49m00krxztdqu5ygak00nft37",
    "category": "send",
    "amount": -1.26545600,
    "label": "",
    "vout": 0,
    "fee": -0.00006450,
    "confirmations": 253723,
    "blockhash": "00000000000000000025a92c80f5c259ca5d9d36d407906dbefbd8075c3ae77b",
    "blockheight": 505672,
    "blockindex": 857,
    "blocktime": 1516693344,
    "txid": "b6439e1c9eb3915b3cc89871d2c2479f3f1847f0c7bab252c3ebc503b8f6d344",
    "wtxid": "393cfba86cb0d3274850aa461dab433b5d62c1dce68dc10d43de969b8dec2359",
    "walletconflicts": [
    ],
    "time": 1516689935,
    "timereceived": 1516689935,
    "bip125-replaceable": "no",
    "abandoned": false
  }
]
--- 454 ---
error code: -1
error message:
Internal bug detected: "std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); })"
rpc/util.cpp:587 (HandleRequest)
Please report this issue here: https://github.com/bitcoin/bitcoin/issues

--- 455 ---
[
  {
    "address": "bc1qnle0kjvz4wyju49m00krxztdqu5ygak00nft37",
    "parent_descs": [
    ],
    "category": "receive",
    "amount": 1.26545600,
    "label": "",
    "vout": 0,
    "confirmations": 253723,
    "blockhash": "00000000000000000025a92c80f5c259ca5d9d36d407906dbefbd8075c3ae77b",
    "blockheight": 505672,
    "blockindex": 857,
    "blocktime": 1516693344,
    "txid": "b6439e1c9eb3915b3cc89871d2c2479f3f1847f0c7bab252c3ebc503b8f6d344",
    "wtxid": "393cfba86cb0d3274850aa461dab433b5d62c1dce68dc10d43de969b8dec2359",
    "walletconflicts": [
    ],
    "time": 1516689935,
    "timereceived": 1516689935,
    "bip125-replaceable": "no"
  }
]

Note how the txid on the two transactions surrounding the bad one are the same. the block explorer shows that this transaction has an OP_RETURN output, which is probably what is triggering this internal bug detection.

System information

I built bitcoin core from the git tag v24.0rc1. It's running on a Debian Linux system, Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, SSD.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions