-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
TCP/client-mode: disconnect #2065
Comments
by Sharron LIU: Andrei, can you update status on this? It's highest priority issue. |
by Ravi kumar Veeramally: Exchanged information thru mail from Flavio. The reported issue refers to the IP stack ignoring the CLOSE flag. So, if a patch is submitted such that the CLOSE flag is processed by the stack, I am sure that everything will be fine. Furthermore, the GH-2065 is also related to the way the stack is implemented. It does not make sense that if a Zephyr app wants to connect or disconnect it must send "something", I mean, a payload. So, IMHO that behaviour must be avoided, because it is based on a very limited use-case that blocks our work. |
by Ravi kumar Veeramally:
|
by Ravi kumar Veeramally:
|
by Ravi kumar Veeramally: Hi Flavio, Please find attached wireshark [^tcp-conn-close.pcapng] log, and also changes in echo_server application. [^tcp-bug.patch] . We have net tools in https://gerrit.zephyrproject.org/r/#/admin/projects/net-tools. I tried echo-server running in qemu and echo-client on linux host. Attached sample tcp log from wireshark. It shows that core stack handles close connection properly. Please try this.
Let me know your findings. |
by Flavio Santes: Before to do any test from my side, I kindly ask you to test this patch in real hardware (Galileo). Once you verify your solution we can close this. |
by Flavio Santes: Could you submit your solution in Gerrit? |
by Flavio Santes: Last comment, could you run your tests in IPv4? |
by Ravi kumar Veeramally: Ok, I will try with Galileo and IPv4. |
by Ravi kumar Veeramally:
|
by Ravi kumar Veeramally: Attached Ipv4 pcap log [^tcp-conn-close-ipv4.pcapng] . I haven't verified on Galileo, I will try that next. |
by Ravi kumar Veeramally:
|
by Ravi kumar Veeramally: Attached Galileo log. [^tcp-conn-close-ipv4-galileo.pcapng] |
by Flavio Santes: Ravi kumar Veeramally I appreciate your help, but if you have a patch for this issue please submit it trough Gerrit. |
by Ravi kumar Veeramally: Flavio, I don't have any core IP stack related patch. Patch which I attached here is few changes in application to test different environments( like, based on network switch subnet defining src IP address according to it.). But anyway I will send attached patch to gerrit. |
by Ravi kumar Veeramally: https://gerrit.zephyrproject.org/r/#/c/3935/ Submitted patches related to sample changes, this will help to run samples properly. No changes in core IP stack. |
by Flavio Santes: Hello Ravi, please document your findings, the ones you comment in gerrit. This is important for all the engineers developing network applications. Even so, I do not see how this will fix the current issue (if any). Could you please share with me the line of code that handles the disconnect in client mode? If there is no mechanism for that task, please specify it. Regards |
by Ravi kumar Veeramally: As per the bug description core IP stack doesn't handle TCP disconnect. I tried with possible different scenarios TCP/IPv6|IPv4 between qemu and in Galileo. I provided the pcap logs. Connect, data exchange and disconnect seems fine in all scenarios. Patches are not related to this issue at all, samples in zephyr/sample/net are provided for few scenarios. When I tried to check TCP in IPv6 and IPv4 in qemu and galileo, I noticed that it requires few changes in samples. That's it. https://gerrit.zephyrproject.org/r/#/c/3935/ is about proper usage of NET_TESTING_USE_RFC3849_ADDRESSES define and https://gerrit.zephyrproject.org/r/#/c/3936 is about Rx buffers (depends on network environment, we have to allocate minimum number of Rx/tx buffers). So if you find some issue, please provide samples, logs and steps to reproduce the scenario. I tried possible scenarios based on "Core stack doesn't handle TCP disconnect". |
by Flavio Santes: The original description and the extended one that I sent to you describe something not yet solved. If you have sample code that handles this situation with the high-level API please share it. Otherwise, if this functionality is handled internally by the current API, please specify that. |
by Ravi kumar Veeramally: Can you provide your samples or test and logs where the issue is. Steps to reproduce the issue. |
by Flavio Santes: The sample code I am using can be found at: samples/net/echo_client and echo_server. You say there is no issue, so I must assume, everything is fine, right?. However, do you know how to handle this situation with the high-level API?. Where is the sample code that shows how you, the maintainers, use the API? As you may be aware, 1.5 and perhaps 1.6 will use the "old IP stack", so I am not the only one interested in sample code that works. Regards. |
by Ravi kumar Veeramally: Looks like my message is not clear. I didn't say there is no issue. I said, I tried few possibilities which I could. In those trials I didn't see the issue which you described. So I am asking you to provide scenario and steps, if possible logs will be helpful. And the rest "high-level API and sample code using API", I don't understand your concern (how does core stack doesn't handle close flag related to High-level API). |
by Flavio Santes: I apologize if I was not clear enough. Given your feedback and after discussing this issue with my team. I think it is better to keep this issue closed. I will open other Jiras trying to only focus on one issue:
What do you think? |
by Ravi kumar Veeramally: ok. I will try/investigate 632 and let you know. |
by Sharron LIU: Please reporter verify this. |
by Flavio Santes: We are still working on this. So far, it could not be verified at all. |
by Mark Linkmeyer: Flavio Santes , if this isn't fixed correctly, I think it's appropriate to move it to the Reopened state and then back into the Accepted state so it's in Dev's queue to be fixed. |
by Ravi kumar Veeramally: As per the bug description stack doesn't handle disconnect/close flag. I have tried with few scenarios where client application connects and disconnects. Provided pcap logs. It seems fine. But actual bug is GH-2157, where MQTT client connect and disconnect and in a loop its trying to connect/disconnect again. Looks like some issue in reconnection as per its description. I am investigating it. Asked bit more details in GH-2157. |
by Ravi kumar Veeramally: Flavio, Finally I could reproduce the GH-2157 issue. Looks like this bug doesn't have enough information to reproduce GH-2157 scenario and seems duplicate of it. So I recommend mark this one as duplicate to GH-2157 and let's figure it out. What do you say? Please check my comments in GH-2157. |
by Flavio Santes: Ravi kumar Veeramally : sounds good to me. |
by Kuo-Lang Tseng: Based on comments from Ravi kumar Veeramally and Flavio Santes , closing this as duplicate of GH-2157. |
Blocks GH-1970 |
Blocks GH-1969 |
Blocks GH-2015 |
Blocks GH-2157 |
Reported by Flavio Santes:
In order to close a connection with a server, the client must:
This should be seen as a design failure, because some high-level protocols consider unwanted data as errors.
Furthermore, the high-level network API must provide a mechanism to close a connection in an easy way.
(Imported from Jira ZEP-522)
The text was updated successfully, but these errors were encountered: