Hang in send() to a socket

2004-07-23 Thread IƱigo Lopez Barranco

Hi. I'm testing a program to send files thru a TCP socket on an MPC5200. The 
program itself is quite simple: reads block from file, adds headers for a 
custom protocol, and sends the packet to the socket.
This works without problems on x86 architecture, but in PPC, the programs stops 
forever in one of the writings to the socket after having sent a random number 
of packets. Strace says that it stops on a send(), and netstat shows that the 
connection is stablished, and stays this way:
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  63903 160.100.100.169:12700   160.100.100.189:41097   ESTABLISHED
Until the kernel destroys the socket. The program isn't hanged, and it detects 
when the socket closes (Connection timed out) if you wait enough, and exits 
properly. It just stops in send().

Is there any know problem with this on the MPC5200?
The platform is a Lite5200, and kernel linuxppc_2_4_devel from Denx CVS.
Thanks

I?igo

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





MPC5200, Hang in send() to a socket

2004-07-23 Thread David Wolfe

[ I?igo Lopez Barranco writes: ]
 Hi. I'm testing a program to send files thru a TCP socket on an MPC5200.

 programs stops forever in one of the writings to the socket after
 having sent a random number of packets. Strace says that it stops on a
 send(), and netstat shows that the connection is stablished, and stays
 this way:

I see this problem too during a FTP put operation. The network remains up
as a concurrently executing ping has no problem and I can restart the FTP
transfer which will happily transfer an random number of packets before
halting again. I also noticed a nasty memory leak associated with this
-- if I rerun the FTP transfer enough times the system will run out of
memory. It may be related to lost RX packets. The RX error count seen
from ifconfig adds up very quickly on a put. FTP get doesn't provoke
this bug nearly as much.

I'm looking into the driver, though I am quite unfamiliar with Linux
networking kernel code.

--
David Wolfe
Digital Audio, Radio  Telematics
Freescale Semiconductor

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/