-
-
Notifications
You must be signed in to change notification settings - Fork 497
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
nng_close occasionally hang on Windows #1219
Comments
I did more tests to investigate this issue. If I add a brief waiting (thread sleep) before invoking nng_close, everything works smoothly. So my guess is that the unfinished transmission is interfering with the nng_close operation. |
Thanks for the information. I will investigate. |
Which side did you invoke close on? |
Close is invoked on the pull0 side. |
The send buffer size option of push0 node (NNG_OPT_SENDBUF) and the receive buffer size option of pull0 node (NNG_OPT_RECVBUF) are both set to 8192 in the previous tests. I removed both options from my test code today and the hang does not occurs. Did I do something wrong with these two options? |
This is helpful information. Thanks. |
Out of curiosity, how many CPU cores are present on your system? |
Intel i7-6700 (4 cores). 4GB of RAM (available RAM less than 1GB actually) |
Hi everybody! I encountered a similar issue. Not sure if it is related because the setup is different, but the symptom (nng_close() hangs) is the same. Here is my setup:
Expected behavior: |
Thanks for the information. This is helpful feedback, and may help me isolate the problem. |
I think its possible that there were two separate issues. I've found a bug in the TCP transport which affects all platforms, and I think there was a bug in the abort handling as well. |
I'm going to push the fixes I have so far. I am about 99% certain that this will fix your bug. Stay tuned. |
Unfortunatly, I cannot confirm that the bug is fixed. The problem still occurs. However, as described above I encounter it when using (raw) bus sockets, which differs from all the other issues. Should I create a separate issue for this? |
Note that by filing an issue, you agree that you have read and agreed to
our contribution guidelines.
NNG & Platform details.
NNG 1.2.6 & 1.3.0
Windows 10
Expected Behavior
nng_close returns with socket closed
Actual Behavior
nng_close occasionally hanged and not returned
Steps to Reproduce
NNG 1.1.1, 1.2.6 & 1.3.0 have been tested. Both NNG 1.2.6 & 1.3.0 occasionally hanged on nng_close, but NNG 1.1.1 does not hang.
The text was updated successfully, but these errors were encountered: