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

[bug]: lnd crashes with panic: runtime error: invalid memory address or nil pointer dereference #9399

Open
greenart7c3 opened this issue Dec 31, 2024 · 6 comments
Labels
bug Unintended code behaviour needs triage
Milestone

Comments

@greenart7c3
Copy link

greenart7c3 commented Dec 31, 2024

Background

lnd crashes with panic: runtime error: invalid memory address or nil pointer dereference

Your environment

lnd 0.18.4-beta
Ubuntu
bitcoind

Steps to reproduce

Don't know how to reproduce this but its happening a lot today. The service starts and after a while a get this error


Dec 31 18:44:24 greenart7c3-desktop lnd[820440]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x497698]
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]: goroutine 30519 [running]:
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]: sync.(*RWMutex).Lock(0xc000273180?)
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]:         sync/rwmutex.go:146 +0x18
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]: github.com/lightningnetwork/lnd/lnwallet/chainfee.(*filterManager).updateMedian(0xc0041e6f00, {0xc00237b500, 0x8, 0x8})
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]:         github.com/lightningnetwork/lnd/lnwallet/chainfee/filtermanager.go:208 +0x5f
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]: github.com/lightningnetwork/lnd/lnwallet/chainfee.(*filterManager).fetchPeerFilters(0xc0041e6f00)
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]:         github.com/lightningnetwork/lnd/lnwallet/chainfee/filtermanager.go:87 +0xc5
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]: created by github.com/lightningnetwork/lnd/lnwallet/chainfee.(*filterManager).Start in goroutine 1
Dec 31 18:44:24 greenart7c3-desktop lnd[820440]:         github.com/lightningnetwork/lnd/lnwallet/chainfee/filtermanager.go:60 +0x65

Expected behaviour

Actual behaviour

@greenart7c3 greenart7c3 added bug Unintended code behaviour needs triage labels Dec 31, 2024
@Crypt-iQ Crypt-iQ added this to the v0.19.0 milestone Dec 31, 2024
@saubyk saubyk added this to lnd v0.19 Jan 1, 2025
@saubyk saubyk moved this to Todo in lnd v0.19 Jan 1, 2025
@JhovanEscobidal

This comment was marked as spam.

@Crypt-iQ
Copy link
Collaborator

Crypt-iQ commented Jan 3, 2025

@greenart7c3 what Go version are you using?

@greenart7c3
Copy link
Author

go version go1.23.1 linux/amd64

@Crypt-iQ
Copy link
Collaborator

Crypt-iQ commented Jan 3, 2025

@greenart7c3 did you compile lnd yourself or did you use some sort of installer? I ask because the crashing line number in sync.rwmutex.go seems a little off if the go version used was go1.23.1 but I could be missing something.

@greenart7c3
Copy link
Author

I used the compiled version from the releases

@Crypt-iQ
Copy link
Collaborator

Crypt-iQ commented Jan 5, 2025

I looked it up and the compiled version uses go1.22.6 and it looks like the mutex is nil for some reason

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
Status: Todo
Development

No branches or pull requests

3 participants