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

Fix possible panic on monitorStream when shutting down #6007

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented Oct 15, 2024

Spotted the following in a test run:

=== RUN   TestJetStreamClusterUserSnapshotAndRestoreConfigChanges
    jetstream_cluster_1_test.go:3029: Unexpected error: nats: no responders available for request
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x25c pc=0x939f79]
goroutine 22770 [running]:
github.com/nats-io/nats-server/v2/server.(*jetStream).monitorStream.func1()
	./server/jetstream_cluster.go:2269 +0x19
github.com/nats-io/nats-server/v2/server.(*jetStream).monitorStream(0xc00070aa00, 0x0, 0xc000ac2900, 0x0)
	./server/jetstream_cluster.go:2428 +0x2333
github.com/nats-io/nats-server/v2/server.(*jetStream).processClusterCreateStream.func1()
	./server/jetstream_cluster.go:3876 +0x25
github.com/nats-io/nats-server/v2/server.(*Server).startGoRoutine.func1()
	./server/server.go:3794 +0x32
created by github.com/nats-io/nats-server/v2/server.(*Server).startGoRoutine in goroutine 22569
	./server/server.go:3792 +0x145
FAIL	github.com/nats-io/nats-server/v2/server	88.009s

Signed-off-by: Waldemar Quevedo <wally@nats.io>
@wallyqs wallyqs requested a review from a team as a code owner October 15, 2024 16:23
Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit c0a38c4 into main Oct 15, 2024
3 of 5 checks passed
@derekcollison derekcollison deleted the mset-stop-fix branch October 15, 2024 16:32
neilalexander added a commit that referenced this pull request Oct 16, 2024
Includes:

- #5986
- #5995 
- #6000
- #5996
- #6002
- #6003
- #6007

Signed-off-by: Neil Twigg <neil@nats.io>
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

Successfully merging this pull request may close these issues.

3 participants