RE: CIPE-Win32 transfer hangs|
Jan Olderdissen <jolderdissen,AT,ixiacom,DOT,com>|
Fri, 8 Mar 2002 22:33:43 +0100|
I think I have a clue to what "failed on pending read attempt" means.
Comparing Windump's output with the service's output, I would invariably see
"failed on pending read attempt" after getting a "port unreachable" ICMP
message because the other side was down:
11:19:11.259599 10.105.1.6 > 10.105.1.2: icmp: 10.105.1.6 udp port 50
unreachable [tos 0xc0]
Perhaps your systems block ICMP messages so you never see the error.
After "failed on pending read attempt" the service seems to remain alive, it
even sends out pings. I suspect, however, that its incoming socket is dead
from that point on due to the "port unreachable" not having been handled
properly. Perhaps the error wants to be read, or something, before more
packets can be read from the socket.
From: Damion Wilson [mailto:dwilson,AT,ibl,DOT,bm
Sent: Thursday, March 07, 2002 08:33
To: Jan Olderdissen
Cc: Juan Antonio Ruiz Zwollo; cipe-l,AT,inka,DOT,de
Subject: Re: CIPE-Win32 transfer hangs
I never see it. Ever. I just installed CIPE-Win32 on a Win2k Fujitsu laptop
for a client who was using it to manage his network from home and it doesn't
do it. None of my test boxes have ever exhibited; either on NT4.0 or Win2K.
As a correction to my answer to Juan Antonio, the message has nothing to do
with cipdrvr.sys. In fact it is in the asynchronous I/O to the UDP socket
used to implement the tunnel.
IN the method CipeSocketIO::RequestAsyncReceive(), the code attempts to do
multiple Winsock WSARecvFrom's using an Overlapped I/O structure which has
been initialized with an Event. If the WSARecvFrom succeeds in
returning data, the data is handled synchronously. The only time that the
call should fail is when there is no data to be read, which should only
result in a pending read request to be satisfied later using the overlapped
I/O; this returns the status WSA_IO_PENDING. Anything other that this value
consider an error and the socket will not be able to get data without
the socket again.
Here's the code excerpt from CipeSocketIO.cpp:
while (m_Synchronous = (WSARecvFrom (m_Socket, &l_Desc, 1,
&m_Buffer.length, &l_Flags, (struct sockaddr *) &m_PeerInfo, &l_PeerLen,
&m_Overlapped, NULL) != SOCKET_ERROR))
if (WSAGetLastError() != WSA_IO_PENDING)
DbgPrint ("[%s] failed on pending read attempt\n",
Jan, I can generate you a cipsrvr.exe that prints out the value of
WSAGetLastError() so that I can see what Winsock wants. If you can do this
without my interaction then that'll be even faster. I have heard some things
about the granularity of Events and overlapped I/O before so maybe this
problem is a known, resolvable one.
On Thursday 07 March 2002 11:43 am, you wrote:
> "failed on pending read attempt" seems to be an ongoing issue with the
> Windows version of cipe. I get it quite often too. Another issue is that
> the service will just exit at higher throughput rates. On an older Ixia
> test chassis using a Pentium MMX 233Mhz, this happens at around 150kB/s.
> -----Original Message-----
> From: Juan Antonio Ruiz Zwollo [mailto:J.Antonio,AT,jaruz,DOT,com
> Sent: Thursday, March 07, 2002 6:41 AM
> To: cipe-l,AT,inka,DOT,de
> Cc: sandino,AT,sandino,DOT,net
> Subject: CIPE-Win32 transfer hangs
> On one side, I'm using CIPE-Win32-2.0-pre10.
> On the other side, cipe-1.5.2 on Linux.
> There are various tunnels going from the Linux box to other Linux boxes.
> All work fine. But the tunnel to the Win32 box hangs every few minutes.
> I ran the Win32 CIPE as a console, and found out that each time the
> transfer hangs, the following output appears:
> [SIP] failed on pending read attempt
> It is strange that the transfer just stops and the tunnel no longer works
> but CIPE continues to run. If it would at least stop itself, I could
> restart it every time the tunnel hangs.
> What can be done? I already tried setting the Timeout value higher.
> Kind regards,
> Juan Antonio Ruiz Zwollo