fundrawtransaction causing bitcoind 0.17 to crash

0

I've updated to bitcoincore 0.17 and I'm trying to create a raw transaction to be signed on an offline wallet.

I'm creating a raw transaction with createrawtransaction with no inputs and the desired outputs. With the hex generated I'm using fundrawtransaction to match inputs.

Since the online wallet is watch only I need to pass includeWatching as params. Also I want to send the change amount to a different address, so I add changeAddress the the options hash. This kills the entire bitcoind process with no warnings and no log messages

This is the commands I've tried and their output:

$ bitcoin-cli createrawtransaction '[]' '{"14XbnUUvc2Kt8TrnnEG9zjF1XM2jYD1h8x":0.001}'
020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000

$ bitcoin-cli fundrawtransaction 020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000
error code: -4
error message:
Insufficient funds

$ bitcoin-cli fundrawtransaction 020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000 '{"includeWatching":true}'
{
  "hex": "02000000016c4262fe490eb44becac4d4aa37f86b4433327ffa40a00a5498006c6ec5b0b240100000000feffffff02089a03000000000017a914ab7dd53603b6b64d3851569b90eeae8f39fd9f0087a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000",
  "fee": 0.00000675,
  "changepos": 0
}

$ bitcoin-cli fundrawtransaction 020000000001a0860100000000001976a91426b1e477be0f7bc5e2cf12dd5b973e57e7fab5bf88ac00000000 '{"includeWatching":true,"changeAddress":"185pJS3yVizdE3RtXKALtVbGRv9gzzypT1"}'
error: Could not connect to the server 127.0.0.1:8332 (error code 1 - "EOF reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

How can I see the error that killed bitcoind? Am I doing something wrong?

UPDATE

After using GDB I've found that this is the problem:

bitcoind: policy/feerate.cpp:25: CAmount CFeeRate::GetFee(size_t) const: Assertion `nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max())' failed.

Thread 7 "bitcoin-httpwor" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffebfff700 (LWP 22448)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

Any hints?

Nicos Karalis

Posted 2018-11-01T18:27:00.243

Reputation: 133

That's a strange error, not sure if this will help, but what OS are you on, and how did you install bitcoind?JBaczuk 2018-11-01T19:20:05.963

Sorry, forgot to add. I'm using ubuntu 18.04, i've installed via apt-get. Also, if you know how to downgrade bitcoind it should work tooNicos Karalis 2018-11-01T19:22:28.037

You can download and install whichever binaries you want to your system folders from https://bitcoincore.org/en/releases/

JBaczuk 2018-11-01T19:33:40.303

That's what I wan't. But I'm not that good with ubuntu. Can you point me a guide to install binaries?Nicos Karalis 2018-11-01T19:48:33.807

Depending on which version your downgrading to, all you need to do is replace the binaries that you want (probably bitcoind and bitcoin-cli in /usr/local/bin or wherever they are installed (try running $which bitcoind to find where they are).JBaczuk 2018-11-01T19:56:29.360

File an issue. That shouldn’t crash.Anonymous 2018-11-01T23:29:50.033

Answers

2

This is a known crasher in 0.17.

You need to either:

  • downgrade to 0.16.3
  • apply the patch given in the pull request and build Bitcoin Core yourself
  • wait until 0.17.1 is released to fix the issue.

Anonymous

Posted 2018-11-01T18:27:00.243

Reputation: 10 054