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

nats c client hanging forever on natsConnection_PublishString #761

Open
edmundsj opened this issue Jun 6, 2024 · 1 comment
Open

nats c client hanging forever on natsConnection_PublishString #761

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

Comments

@edmundsj
Copy link

edmundsj commented Jun 6, 2024

Observed behavior

It appears that sometimes when I call natsConnection_PublishString, it hangs forever. I cannot kill the program with SIGINT (Ctrl + C) and it never returns control flow to the main program. What could potentially cause this? My understanding was that all publish methods are asynchronous, and they simply place the message into a queue to be published by a separate thread.

Expected behavior

I expect the method not to hang under any circumstances, and just to return immediately.

Server and client version

Client version: 3.7.1
Server version: v2.10.7-linux-amd64.

Host environment

Centos 8 + Centos 9 (replicable across both)

Steps to reproduce

No response

@edmundsj edmundsj added the defect Suspected defect such as a bug or regression label Jun 6, 2024
@kozlovic
Copy link
Member

@edmundsj If the internal buffer is full, the library will perform the socket write in place, but in any case, it is strange that you can't interrupt the program. Maybe if you could build in debug mode and attach a debugger when that happens or produce a stack trace that could help determine where the library is stuck?

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