<p>This is a <a href="https://github.com/bitcoin/bitcoin/pull/14380" rel="nofollow noreferrer">known crasher</a> in 0.17. </p>

<p>You need to either:</p>

<ul>
<li>downgrade to 0.16.3 </li>
<li>apply the patch given in the pull request and build Bitcoin Core yourself</li>
<li>wait until 0.17.1 is released to fix the issue. </li>
</ul>

CC BY-SA 4.0
2018-11-02T03:06:55.060Z
2018-11-02T03:06:55.060Z
Claris
<p>I've updated to bitcoincore 0.17 and I'm trying to create a raw transaction to be signed on an offline wallet.</p>

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

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

<p>This is the commands I've tried and their output:</p>

<pre><code>$ 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.
</code></pre>

<p>How can I see the error that killed bitcoind?
Am I doing something wrong?</p>

<p><strong>UPDATE</strong></p>

<p>After using GDB I've found that this is the problem:</p>

<pre><code>bitcoind: policy/feerate.cpp:25: CAmount CFeeRate::GetFee(size_t) const: Assertion `nBytes_ &lt;= uint64_t(std::numeric_limits&lt;int64_t&gt;::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.
</code></pre>

<p>Any hints?</p>

CC BY-SA 4.0
2018-11-01T19:20:05.963Z
That's a strange error, not sure if this will help, but what OS are you on, and how did you install bitcoind?
JBaczuk
CC BY-SA 4.0
2018-11-01T19:22:28.037Z
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 too
Nicos Karalis
CC BY-SA 4.0
2018-11-01T19:33:40.303Z
You can download and install whichever binaries you want to your system folders from https://bitcoincore.org/en/releases/
JBaczuk
CC BY-SA 4.0
2018-11-01T19:48:33.807Z
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
CC BY-SA 4.0
2018-11-01T19:56:29.360Z
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
CC BY-SA 4.0
2018-11-01T23:29:50.033Z
File an issue. That shouldn’t crash.
Claris
<bitcoin-core><bitcoind>
fundrawtransaction causing bitcoind 0.17 to crash
Nicos Karalis
# fundrawtransaction causing bitcoind 0.17 to crash

(Asked by: username_0 on 2018-11-01)

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?

**Tags:** bitcoin-core, bitcoind

> **Comments:**
> **username_1**: That's a strange error, not sure if this will help, but what OS are you on, and how did you install bitcoind?  
> **username_0**: 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 too  
> **username_1**: You can download and install whichever binaries you want to your system folders from https://bitcoincore.org/en/releases/  
> **username_0**: That's what I wan't. But I'm not that good with ubuntu. Can you point me a guide to install binaries?  
> **username_1**: 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).  
> **username_2**: File an issue. That shouldn’t crash.  

---

## 1 answers

### Answer by username_2 on 2018-11-02. Score: 2 | Accepted answer

This is a [known crasher](https://github.com/bitcoin/bitcoin/pull/14380) 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.


---

