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

jetstream.PublishMsgAsync panic #1661

Open
AetheWu opened this issue Jun 21, 2024 · 1 comment
Open

jetstream.PublishMsgAsync panic #1661

AetheWu opened this issue Jun 21, 2024 · 1 comment
Labels
defect Suspected defect such as a bug or regression

Comments

@AetheWu
Copy link

AetheWu commented Jun 21, 2024

Observed behavior

Publish messages to a stream which is not existed, then the client panic

panic: runtime error: slice bounds out of range [14:0]

goroutine 2369 [running]:
github.com/nats-io/nats.go/jetstream.(*jetStream).PublishMsgAsync(0xc00007e690, 0xc00033f810, {0xc00073e7c8, 0x1, 0x1?})
	/go/pkg/mod/github.com/nats-io/[email protected]/jetstream/publish.go:306 +0xa49
github.com/nats-io/nats.go/jetstream.(*jetStream).handleAsyncReply.func2()
	/go/pkg/mod/github.com/nats-io/[email protected]/jetstream/publish.go:398 +0xd8
created by time.goFunc
	/usr/local/go/src/time/sleep.go:177 +0x2d

Expected behavior

no panic

Server and client version

nats-server: v2.10.16
nats-client: nats.go-v1.34.1

Host environment

linux amd64;
nats deploy with helm

Steps to reproduce

No response

@AetheWu AetheWu added the defect Suspected defect such as a bug or regression label Jun 21, 2024
@piotrpio
Copy link
Collaborator

Hello @AetheWu, do you have a reproduction example? I tried to reproduce this and so far I am getting a valid error (nats: no response from stream) and no panic, so it would be awesome if you could provide some more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants