Re: TCP assert error logs


Vakul Garg <vakul.garg@...>
 

Hello Paul

I have attached a test case with the given ticket.

Regards

Vakul

-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Monday, September 11, 2017 4:52 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 09:31:14 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

I just open a TCP server socket and let it listen for new connections
on 127.0.0.1 on a given server port.
Right, that might work, thanks to
https://gerrit.zephyrproject.org/r/#/c/7007/ , and if you verified, it apparently does (I don't remember if I ever using 127.0.0.1 address, I usually tried to use a local interface address in such cases, i.e.
192.0.2.1 by default). But just to get terminology right, there's no explicit loopback interface in Zephyr, it's just an adhoc check for the conventional loopback address (though this note is probably irrelevant for your usecase, so feel free to ignore it [for now]).

Then another thread creates a TCP client socket and connects to the
127.0.0.1 on the same server port. After connection is successful,
client sends one data message on the socket.
What can I say? With such scenario, you went farther than I. Last time I tried, it wasn't possible to establish a TCP connection under such conditions at all: https://jira.zephyrproject.org/browse/ZEP-2001 .

I'd suggest to add some comments to the above ticket, describing your usecase. And ultimately, we'd need a typical small testcase to reproduce the issue, so feel free to post your code to make a step towards progress in that direction. I faced that issue when testing networking support in Zephyr.JS and MicroPython projects, so there're no readily available minimal testcases.



Thanks,
Paul



-----Original Message-----
From: Paul Sokolovsky [mailto:paul.sokolovsky@linaro.org]
Sent: Saturday, September 09, 2017 2:57 PM
To: Vakul Garg <vakul.garg@nxp.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] TCP assert error logs

Hello Vakul,

On Sat, 9 Sep 2017 06:47:35 +0000
Vakul Garg <vakul.garg@nxp.com> wrote:

Hi

I have two threads on my system communicating using TCP over
loopback interface. I am getting following errors.
To the best of my knowledge, there is (was) no loopback interface
support in Zephyr. So, I'd interested to know how to achieved the
setup above.


[net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed} [net/tcp]
[ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain TCP
header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag' failed}
[net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not contain
TCP header [net/tcp] [ERR] net_tcp_get_hdr: {assert: 'frag'
failed} [net/tcp] [ERR] net_tcp_send_pkt: Packet 0x20004664 does not
contain TCP header [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x200046a0 double free [net/buf] [ERR]
net_buf_unref_debug: net_pkt_frag_unref():826: buf 0x200046a0 double
free [net/buf] [ERR] net_buf_unref_debug:
net_pkt_frag_unref():826: buf 0x20004830 double free

Can someone help?

Regards, Vakul

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro:
http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg
- http://www.linaro.org/linaro-blog


--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Join users@lists.zephyrproject.org to automatically receive all group messages.