-
Notifications
You must be signed in to change notification settings - Fork 708
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
Comments
Hello @AetheWu, do you have a reproduction example? I tried to reproduce this and so far I am getting a valid error ( |
in version 1.36 is bug:
Obviously, if paf != nil && m.Reply == "", we praise panic. And in version 1.38:
that is, the data is taken from a non-empty paf. |
Can you confirm that this bug on version 1.38 was resolved? |
It seems to me that panic occurs when trying to resend, when using paf. |
Its covered by tests in 1.38 here: nats.go/jetstream/test/publish_test.go Lines 1071 to 1086 in 99545ec
If use 1.38 and rollback this:
to 1.36:
you will catch this bug. |
@patihomirov I'm a bit lost here, so you're saying there is no issue in 1.38.0 or are you still seeing something? I would assume this (and a few other) issue were fixed in #1719 |
Im not sure yet. We try to catch/retry bug on 1.36 to be shure that it was fixed on 1.38. |
I think I caught something on 1.36 while I was using a debugger on the code during the test. But not stable. 2 times out of 6 attempts. Here: https://github.com/nats-io/nats.go/blob/c97f022375952007086bf4b063b8e5e708e64620/jetstream/publish .go#L290-L293 Panic happens if I spend a long time using a debugger on PublishMsgAsync and this defer Lines 288 to 291 in c97f022
It works before we get to here: Line 389 in c97f022
|
We have made a global chan. We are waiting for this chan in the defer here Line 288 in c97f022
Line 398 in c97f022
nats.go/jetstream/test/publish_test.go Line 1072 in c97f022
The pill for this panic for our project is to call PublishMsgAsync with opts: []jetstream.PublishOpt{jetstream.WithRetryAttempts(0)}, because we do not use Retry in the project. Or upgrade to 1.38, but we are not completely sure that we can safely include 1.38 in our project. |
Observed behavior
Publish messages to a stream which is not existed, then the client panic
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
The text was updated successfully, but these errors were encountered: