W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2003

two HTLoadAbsolute in a row causes Winsock error (WWW_WIN_ASYNC)

From: Timothee Besset <ttimo@idsoftware.com>
Date: Mon, 28 Apr 2003 16:07:47 +0200
Message-ID: <3EAD35B3.3060907@idsoftware.com>
To: www-lib@w3.org

I've been looking at a pretty annoying bug for a few days now. I have a 
setup doing two successive calls to retrieve files from the same host. 
While the first request is processed fine, the second request always 
fails with the follow error in the traces:

Write Socket 178 bytes written to 1896
Read Socket. WOULD BLOCK fd 1896
Event....... Register socket 1896, request 00000000 handler 005BE880 
type HTEvent_CLOSE at priority 20
Event....... Registering socket for HTEvent_CLOSE
Event....... WSAAsyncSelect returned `WinSock reported 
error=10022'!Event....... Register socket 1896, request 0FB2D0F0 handler 
005BE880 type HTEvent_READ at priority 20
Event....... Registering socket for HTEvent_READ
Event....... WSAAsyncSelect returned `WinSock reported 
error=10022'!Memory Free. 0FB2DED8


WinSock 10022 means invalid parameter.
It is specific to win32, I suspect it has to do with 'REUSING CHANNEL' 
when I am talking to the same host for the second time.

The same situation is working fine on unix. The two files are properly 
downloaded.

I got a backtrace of the first error:

>	ET.exe!HTErrnoString(int errornumber=10022)  Line 44	C
>  	ET.exe!HTEventList_register(unsigned int s=1908, HTEventType type=HTEvent_CLOSE, _HTEvent * event=0x0fbd3518)  Line 421 + 0x17	C
>  	ET.exe!HTEvent_register(unsigned int s=1908, HTEventType type=HTEvent_CLOSE, _HTEvent * event=0x0fbd3518)  Line 59 + 0x14	C
>  	ET.exe!HTHost_register(_HTHost * host=0x0fbd3248, _HTNet * net=0x0fbe2a78, HTEventType type=HTEvent_READ)  Line 1461 + 0x1e	C
>  	ET.exe!HTReader_read(_HTInputStream * me=0x0fbd3b88)  Line 123 + 0xf	C
>  	ET.exe!HTHost_read(_HTHost * host=0x0fbd3248, _HTNet * net=0x0fbe2a78)  Line 1641 + 0x14	C
>  	ET.exe!HTTPEvent(unsigned int soc=4294967295, void * pVoid=0x0fbe2b08, HTEventType type=HTEvent_READ)  Line 1309 + 0xd	C
>  	ET.exe!HTLoadHTTP(unsigned int soc=4294967295, _HTRequest * request=0x0fbde1a0)  Line 1034 + 0x12	C
>  	ET.exe!HTNet_newClient(_HTRequest * request=0x0fbde1a0)  Line 807 + 0xb	C
>  	ET.exe!HTLoad(_HTRequest * me=0x0fbde1a0, int recursive=0)  Line 1718 + 0x9	C
>  	ET.exe!launch_request(_HTRequest * request=0x0fbde1a0, int recursive=0)  Line 79 + 0xd	C
>  	ET.exe!HTLoadAbsolute(const char * url=0x0fbde0b8, _HTRequest * request=0x0fbde1a0)  Line 92 + 0xb	C
>  	ET.exe!HTLoadToFile(const char * url=0x0fbde0b8, _HTRequest * request=0x0fbde1a0, const char * filename=0x01afdaf8)  Line 168 + 0xd	C
>  	ET.exe!DL_BeginDownload(const char * localName=0x01afdaf8, const char * remoteName=0x01afd9f8, int debug=1)  Line 226 + 0x14	C

But at this point I'm kind of stuck not knowing what to do. What kind of 
bug could that be? The window handle became invalid maybe? Or since it's 
still using the same socket, it has a problem with that? (i.e. remote 
closed socket?)

This is all happening with the current libwww cvs source. It is 
happening in the last tarball release too.

Maybe I could force the HTHost to be released, so that it starts clean 
next time? That's wouldn't solve the bug though, it would be a workaround..

Any help greatly appreciated ..

TTimo
Received on Monday, 28 April 2003 10:07:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:43 GMT