[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] unexpected error on recv function via socket
From: |
Gavin |
Subject: |
[lwip-users] unexpected error on recv function via socket |
Date: |
Sun, 8 Feb 2015 23:56:22 -0700 (MST) |
Hi,
I meet one unexpected disconnect on recv function.
I have one test case and repeat it to test stability:
1. create one socket and connect to server.
2. data exchange with server.
3. close socket.
After several runs, it failed on recv function. I get the debug log like
below:
--------------------------------------
test run : 155
lwip_socket(PF_INET, SOCK_STREAM, 0) = 0
lwip_connect(0, addr=10.0.2.23 port=10000)
lwip_connect(0) succeeded
lwip_send(0, data=2002a938, size=17, flags=0x0)
lwip_send(0) err=0 written=17
lwip_recvfrom(0, 2003b9f8, 9, 0x0, ..)
lwip_recvfrom: top while sock->lastdata=0
lwip_recvfrom: netconn_recv err=0, netbuf=2000f3cc
lwip_recvfrom: buflen=9 len=9 off=0 sock->lastoffset=0
lwip_recvfrom(0): addr=10.0.2.23 port=10000 len=9
lwip_recvfrom: deleting netbuf=2000f3cc
lwip_recvfrom(0, 2003b9f8, 40, 0x0, ..)
lwip_recvfrom: top while sock->lastdata=0
lwip_recvfrom: netconn_recv err=0, netbuf=2000ebac
lwip_recvfrom: buflen=40 len=40 off=0 sock->lastoffset=0
lwip_recvfrom(0): addr=10.0.2.23 port=10000 len=40
lwip_recvfrom: deleting netbuf=2000ebac
lwip_send(0, data=2002a908, size=40, flags=0x0)
lwip_send(0) err=0 written=40
lwip_send(0, data=2002a908, size=40, flags=0x0)
lwip_send(0) err=0 written=40
lwip_recvfrom(0, 2003b9f8, 40, 0x0, ..)
lwip_recvfrom: top while sock->lastdata=0
lwip_recvfrom: netconn_recv err=0, netbuf=2000e79c
lwip_recvfrom: buflen=40 len=40 off=0 sock->lastoffset=0
lwip_recvfrom(0): addr=10.0.2.23 port=10000 len=40
lwip_recvfrom: deleting netbuf=2000e79c
lwip_close(0)
test run : 156
lwip_socket(PF_INET, SOCK_STREAM, 0) = 0
lwip_connect(0, addr=10.0.2.23 port=10000)
lwip_connect(0) succeeded
lwip_send(0, data=2002a938, size=17, flags=0x0)
lwip_send(0) err=0 written=17
lwip_recvfrom(0, 2003b9f8, 9, 0x0, ..)
lwip_recvfrom: top while sock->lastdata=0
lwip_recvfrom: netconn_recv err=-13, netbuf=0 <-- error log
lwip_recvfrom(0): buf == NULL, error is "Not connected."! <-- socket still
here
lwip_close(0)
--------------------------------------
The error number is -13 (ERR_CONN).
I have no idea about the reason, I check the socket is still exists , not
clear at all.
Does anyone have some suggestion for me?
BTW, I work on TM4C platform with free rtos.
thanks
Gavin
--
View this message in context:
http://lwip.100.n7.nabble.com/unexpected-error-on-recv-function-via-socket-tp23842.html
Sent from the lwip-users mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] unexpected error on recv function via socket,
Gavin <=