Problems with Sockets and TCL

Ryan Miller rmiller at
Thu Feb 23 15:21:37 CST 2006



I have an app running under Wine called Auctionpay Event Software.  It's
currently using TCL to implement a SOAP interface.  I've found a bug
that can be reproduced with two lines of TCL:


package require http

http::geturl <>  -timeout 0
-query "asdf"


9 times out of 10 this command will fail to return a page.  Sometimes
the command works.  I've traced it down the write event not being
received by TCL.  Looking into Wine, it appears upon connecting to a
socket a user message is sent (WM_USER+2).  In the handler
WSAAsyncSelect is being called.  WSAAsyncSelect somehow is triggering
the message loop again (possibly in a different thread?!), and the write
event seems to be processed before the original WM_USER+2 is completed.
This leads to no write event, which leads to no query being posted to
the socket, and finally leading to both computers just sitting there
until the server drops the socket.  


Yet 1/10, it seems that the interrupting message processor interrupts
the main message loop as WM_USER+2 message handler has exited/is
exiting, and the write message is properly processed and the operation
works fine.  


I have been having a terrible time working with winedbg and setting
breakpoints (seems to cause crashes).  Is there someone interested in
working on this bug or possible just shedding some light on just what
might be going on to cause the main message loop to be interrupted in a
race condition like this?





-------------- next part --------------
An HTML attachment was scrubbed...

More information about the wine-devel mailing list