Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owning subdaemon lightning_onchaind died #1290

Closed
redstorm1 opened this issue Mar 27, 2018 · 10 comments
Closed

Owning subdaemon lightning_onchaind died #1290

redstorm1 opened this issue Mar 27, 2018 · 10 comments

Comments

@redstorm1
Copy link

Issue and Steps to Reproduce

Hard to say how to reproduce unfortunatly but this channel is stuck and cannot close due to daemon died.

getinfo output

{ "id" : "0392419c02fbca83ae8d541cd2f48b662b2238ed8e1e92a93547c23ba32f0d64c6", "port" : 9735, "address" :
[
{ "type" : "ipv4", "address" : "203.86.204.88", "port" : 9735 } ], "version" : "v0.5.2-2016-11-21-2422-g286cfef", "blockheight" : 1289331, "network" : "testnet" }

getlog

http://paste.ubuntu.com/p/bsN2tyN35X/

@rustyrussell
Copy link
Contributor

This is a Should Never Happen. I'll add some more debugging for this case so we can get an exact trace of what happens.

@rustyrussell
Copy link
Contributor

Best logs will be if you do a lightning-cli listpeers 02ed613f005d8dae7e7211d628c63c963c4df35d9b56afabac39fefe9e90a89c75 debug which will return the per-peer logs.

You can either pull branch pr/1293 or wait until travis passes in 25 minutes and I'll merge into master.

@redstorm1
Copy link
Author

peer debug log

http://paste.ubuntu.com/p/nDrdcnDNtX/

@redstorm1
Copy link
Author

2018-03-28T01:49:11.427Z lightningd(12461): lightning_onchaind-02ed613f005d8dae7e7211d628c63c963c4df35d9b56afabac39fefe9e90a89c75 chan #4: grind_feerate failed from 1015 - 4028 for tx 02000000017698fdb6ad5b12f964b1e721942d0f5ae8cff290da3ae9cb9c1e92ff51b9184c02000000000000000001a30a030000000000220020151afb44dd24be5f287b1399dd0cf63c62c0fde90e587647b1c07849d6dc65a80dab1300, signature 3045022100c484336113327e47ed0d4fdaba0eca49f117e98a8ae1c584929bda86a4e2eb7d0220452c93179d6c2e35234674cde56c60f3c044c88b03f5000696357826a60082cc, multiplier 663
2018-03-28T01:49:11.428Z lightningd(12461): lightning_onchaind-02ed613f005d8dae7e7211d628c63c963c4df35d9b56afabac39fefe9e90a89c75 chan #4: STATUS_FAIL_INTERNAL_ERROR: Could not find feerate for signature on HTLC timeout between 1015 and 4028
2018-03-28T01:49:11.428Z lightningd(12461): 02ed613f005d8dae7e7211d628c63c963c4df35d9b56afabac39fefe9e90a89c75 chan #4: Owning subdaemon lightning_onchaind died (61952)
2018-03-28T01:49:45.696Z lightning_gossipd(12469): Failed to connect after 10 attempts, giving up after 45 seconds

@redstorm1
Copy link
Author

updated listpeers debug log with grindfee output.

http://paste.ubuntu.com/p/fqc56jRMdZ/

rustyrussell added a commit to rustyrussell/lightning that referenced this issue Apr 3, 2018
We previously tried to use the commitment tx to create an initial
feerate range, then refine it as we look at each HTLC tx.  This was
wrong, because the commitment tx can underpay fees (if it can't afford
it), and our estimate of the maximum possible feerate would be too low.

Now, we only have two fees we need to figure out: HTLC timeout txs and
HTLC success txs, so simply grind them on first use.

Fixes: ElementsProject#1290
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
rustyrussell added a commit to rustyrussell/lightning that referenced this issue Apr 3, 2018
We previously tried to use the commitment tx to create an initial
feerate range, then refine it as we look at each HTLC tx.  This was
wrong, because the commitment tx can underpay fees (if it can't afford
it), and our estimate of the maximum possible feerate would be too low.

Now, we only have two fees we need to figure out: HTLC timeout txs and
HTLC success txs, so simply grind them on first use.

Fixes: ElementsProject#1290
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@redstorm1
Copy link
Author

errors now changed slightly.

2018-04-04T08:19:13.623Z lightningd(25977): lightning_onchaind-02ed613f005d8dae7e7211d628c63c963c4df35d9b56afabac39fefe9e90a89c75 chan #4: STATUS_FAIL_INTERNAL_ERROR: htlc_timeout_fee 1672 failed sigcheck for tx 02000000017698fdb6ad5b12f964b1e721942d0f5ae8cff290da3ae9cb9c1e92ff51b9184c02000000000000000001bb06030000000000220020151afb44dd24be5f287b1399dd0cf63c62c0fde90e587647b1c07849d6dc65a80dab1300, signature 3045022100c484336113327e47ed0d4fdaba0eca49f117e98a8ae1c584929bda86a4e2eb7d0220452c93179d6c2e35234674cde56c60f3c044c88b03f5000696357826a60082cc, wscript 76a91436b3f906c15b44d86f60db0f902c4d0cdc9751c68763ac672102a7afa2906363ee562ce1b1bc73f2094a3621af05370345bb3cb73de1b717dd277c820120876475527c2103a9de3e5d78f3b253a42421c36c29ce9e8c78ffdabd061c2c8d1a5fb3e083d4a252ae67a914ab198fefb1c023a0df97a00af41a1407a9ce3a7f88ac6868
2018-04-04T08:19:13.623Z lightningd(25977): 02ed613f005d8dae7e7211d628c63c963c4df35d9b56afabac39fefe9e90a89c75 chan #4: Owning subdaemon lightning_onchaind died (61952)

@redstorm1
Copy link
Author

update on merge progress?

@ZmnSCPxj
Copy link
Collaborator

The original issue was supposedly closed in a merged pull request #1293. Maybe open a new issue?

@redstorm1
Copy link
Author

#1293 only merged the changes to add more logging to see what was happening,
rustyrussell@250d7f6
fixes it but it has yet to be merged into master.

@ZmnSCPxj
Copy link
Collaborator

564615d and #1314 on master?

Saibato pushed a commit to Saibato/lightning that referenced this issue Apr 17, 2018
We previously tried to use the commitment tx to create an initial
feerate range, then refine it as we look at each HTLC tx.  This was
wrong, because the commitment tx can underpay fees (if it can't afford
it), and our estimate of the maximum possible feerate would be too low.

Now, we only have two fees we need to figure out: HTLC timeout txs and
HTLC success txs, so simply grind them on first use.

Fixes: ElementsProject#1290
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants