8000 [bug]: `panic: runtime error` resuming HTLC attempt · Issue #9688 · lightningnetwork/lnd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[bug]: panic: runtime error resuming HTLC attempt #9688

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

Closed
djkazic opened this issue Apr 8, 2025 · 2 comments · Fixed by #9703
Closed

[bug]: panic: runtime error resuming HTLC attempt #9688

djkazic opened this issue Apr 8, 2025 · 2 comments · Fixed by #9703
Assignees
Labels
bug Unintended code behaviour needs triage
Milestone

Comments

@djkazic
Copy link
Contributor
djkazic commented Apr 8, 2025

Background

On LND 0.19.0 rc2 during startup this panic was observed:

2025-04-08 18:51:38.941 [INF] CRTR: Resuming HTLC attempt 35020 for payment 53a3012ec149f3a478e13a7e16617fca658f87e80f26c8b5ffa7091be9ce34a6
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x19c407e]
goroutine 1191 [running]:
github.com/lightningnetwork/lnd/channeldb.(*HTLCAttemptInfo).attachOnionBlobAndCircuit(0xc00775ca08)
    github.com/lightningnetwork/lnd/channeldb/mp_payment.go:123 +0x1e
github.com/lightningnetwork/lnd/channeldb.(*HTLCAttemptInfo).Circuit(...)
    github.com/lightningnetwork/lnd/channeldb/mp_payment.go:111
github.com/lightningnetwork/lnd/routing.(*paymentLifecycle).collectResult(0xc00509a180, 0xc00775ca08)
    github.com/lightningnetwork/lnd/routing/payment_lifecycle.go:508 +0x11a
github.com/lightningnetwork/lnd/routing.(*paymentLifecycle).collectResultAsync.func1()
    github.com/lightningnetwork/lnd/routing/payment_lifecycle.go:464 +0x31
created by github.com/lightningnetwork/lnd/routing.(*paymentLifecycle).collectResultAsync in goroutine 1068
    github.com/lightningnetwork/lnd/routing/payment_lifecycle.go:463 +0x12a

Line for ref:

    onionBlob, circuit, err := GenerateSphinxPacket(
        &h.Route, h.Hash[:], h.SessionKey(),
    )

Based on the valid memory address, h itself is not nil, so the culprit likely lies in the other fields (i.e. Route, Hash, etc.)

Your environment

  • version of lnd: 0.19 rc2
  • which operating system (uname -a on *Nix): Linux 5.10.225
  • version of btcd, bitcoind, or other backend: bitcoind

Steps to reproduce

Upgrade instance to LND 0.19 rc2.

Expected behaviour

Start up.

Actual behaviour

Runtime panic.

@djkazic djkazic added bug Unintended code behaviour needs triage labels Apr 8, 2025
@yyforyongyu
Copy link
Member

It looks like the panic is from h.Hash[:], caused by the [:] part since Route is a concrete struct. So this only happens in 0.19 rc2?

@djkazic
Copy link
Contributor Author
djkazic commented Apr 9, 2025

It looks like the panic is from h.Hash[:], caused by the [:] part since Route is a concrete struct. So this only happens in 0.19 rc2?

Have not tried to repro in other versions, noticed it during an upgrade from 0.18.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0