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

Panic in WS client in subscription mechanism #3516

Closed
carpawell opened this issue Jul 16, 2024 · 1 comment
Closed

Panic in WS client in subscription mechanism #3516

carpawell opened this issue Jul 16, 2024 · 1 comment
Labels
bug Something isn't working I4 No visible changes S4 Routine U1 Critically important to resolve quickly

Comments

@carpawell
Copy link
Member

carpawell commented Jul 16, 2024

Have 100ms block machines (4) and our SN nodes (https://github.com/nspcc-dev/neofs-node) are subscribed to some events. Once in a time we have panics and have it more than once, i would say even consistently.

Current Behavior

Create a client, subscribe, use it, panic.

Expected Behavior

Create a client, subscribe, use it, no panic.

Possible Solution

Not sure, i guess some slices (receivers and subscriptions) are not in sync.

Steps to Reproduce

Run SN, go 100ms block time, see panics.

Context

июл 16 14:06:04 node04 neofs-node[642022]: panic: runtime error: invalid memory address or nil pointer dereference
июл 16 14:06:04 node04 neofs-node[642022]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xa2e02e]
июл 16 14:06:04 node04 neofs-node[642022]: goroutine 114 [running]:
июл 16 14:06:04 node04 neofs-node[642022]: github.com/nspcc-dev/neo-go/pkg/rpcclient.(*WSClient).notifySubscribers(0xc001402540, {0x1a?, {0x1063ca0?, 0xc0000fda40?}})
июл 16 14:06:04 node04 neofs-node[642022]:         github.com/nspcc-dev/[email protected]/pkg/rpcclient/wsclient.go:696 +0x26e
июл 16 14:06:04 node04 neofs-node[642022]: github.com/nspcc-dev/neo-go/pkg/rpcclient.(*WSClient).wsReader(0xc001402540)
июл 16 14:06:04 node04 neofs-node[642022]:         github.com/nspcc-dev/[email protected]/pkg/rpcclient/wsclient.go:592 +0x625
июл 16 14:06:04 node04 neofs-node[642022]: created by github.com/nspcc-dev/neo-go/pkg/rpcclient.NewWS in goroutine 1
июл 16 14:06:04 node04 neofs-node[642022]:         github.com/nspcc-dev/[email protected]/pkg/rpcclient/wsclient.go:493 +0x51b

Regression

Not sure. Have never seen it but also have never tried the client on this short block time.

Your Environment

Neo-go was taken from this branch: #3508. Not a release but looks like some recent master.

@carpawell carpawell added bug Something isn't working U2 Seriously planned labels Jul 16, 2024
@roman-khimov roman-khimov added U1 Critically important to resolve quickly S4 Routine I4 No visible changes and removed U2 Seriously planned labels Jul 16, 2024
@roman-khimov roman-khimov added this to the v0.106.3 milestone Jul 16, 2024
@roman-khimov
Copy link
Member

Duplicates #3093.

@roman-khimov roman-khimov closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
@roman-khimov roman-khimov removed this from the v0.106.3 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes S4 Routine U1 Critically important to resolve quickly
Projects
None yet
Development

No branches or pull requests

2 participants