From: SourceForge.net <no...@so...> - 2009-11-10 23:22:02
|
Bugs item #2895565, was opened at 2009-11-11 00:02 Message generated for change (Comment added) made by ferrieux You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2895565&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 02. Event Loops Group: current: 8.5.7 Status: Open Resolution: None Priority: 9 Private: No Submitted By: Alexandre Ferrieux (ferrieux) Assigned to: Alexandre Ferrieux (ferrieux) Summary: Busyloop in vwait in innocent HTTP code Initial Comment: As reported in http://groups.google.com/group/comp.lang.tcl/tree/browse_frm/thread/6deca54954e61cfd/94ab3376153994d0?rnum=1&_done=%2Fgroup%2Fcomp.lang.tcl%2Fbrowse_frm%2Fthread%2F6deca54954e61cfd%2F432b7b5576b7ec5c%3F#doc_19398a625d24ac4d In 8.5 HEAD: set file_id [open myfile.html w] http::geturl http://www.yahoo.com -channel $file_id \ -blocksize 4096 -timeout 60000 close $file_id This code, in addition to only downloading an incomplete file, busyloops during the whole timeout. It seems the 0-millisecond timer at line 7978 of TclIO.c fires repeatedly. ---------------------------------------------------------------------- >Comment By: Alexandre Ferrieux (ferrieux) Date: 2009-11-11 00:21 Message: Turns out the tight loop involves CopyData, the worker from [fcopy]. Once established, it is entered with csPtr->toRead == -4 ! ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2009-11-11 00:21 Message: I can confirm this on 8.5 branch. It important that the channel not be binary. When I used [open output wb] the download succeeded. Adding -timeout and -command options do not affect the fault but do allow the job to be timedout which should help in testing. ie: http::geturl $url -channel $f -timeout 10000 -command [list close $f] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2895565&group_id=10894 |