Artifacts Associated With Ticket 513385ffffffffff
Ticket change [d2c54645a5] (rid 113594) by dgp on 2002-02-05 17:36:16:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The timeout option for http::geturl is implemented by a timer event that calls http::reset $token timeout If there's an error returned by the command specified by the -command option, then http::reset will unset the state array and raise an error that will be processed as a background error. All this processing takes place in an event loop, probably within [http::wait $token]. Given the above, it appears that callers of [http::wait $token] need to be able to handle the non-existence of $token upon its return. Also, [http::wait] itself needs to be written to deal with the non-existence of $token when its call to [vwait] returns. Something needs fixing around lines 358 and 840 of the current http.tcl.
- foundin initialized to: "obsolete: 8.4a4"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "29. http Package"
- title initialized to: "error in timeout destroys token"
- type initialized to: "Bug"
Ticket change [40233ff31c] (rid 121580) by dgp on 2002-02-28 11:56:59:
- icomment:
Logged In: YES user_id=80530 Would be good to fix this for the release of http 2.4.2 with Tcl 8.4a4. Is there an historical reason for the unset of the state array in [reset] ? It seems to be the cause of the trouble. Wouldn't we rather keep the state array around with a status of "error"? The log indicates that "sandeep" added the unset to [reset] in Revision 1.28 of http.tcl to "fix two potential memory leaks". Anyone have more detailed recollection about this?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [6caf332d1e] (rid 128560) by hobbs on 2002-02-28 16:04:24:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=72656 IIRC, if you don't reset when that happens, you otherwise leave around that array (because an http::cleanup is not expected). That is the mem leak - one at the Tcl level by leaving http state arrays around.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
Ticket change [e0cdc670ec] (rid 87341) by dgp on 2002-03-02 01:19:06:
- icomment:
Logged In: YES user_id=80530 I looked over this again, and it's really unclear to me whose reponsibility it should be to do the cleanup. [geturl] returns a token, and the public command [cleanup] is available, so that suggests to me it should be the caller's job to cleanup tokens, but in some parts the http package appears to act as its own caller. Unfortunately, looking through the code did not help much, since there are several related commands [reset], [Finish], [cleanup], etc. without a real clear distinction about what job each one has to perform. A good auditing and refactoring could be helpful here.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [54734ffcde] (rid 93952) by hobbs on 2004-05-26 05:05:55:
- icomment:
Logged In: YES user_id=72656 Is this related to 705956 ?
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [1fcacb12c7] (rid 91206) by dgp on 2004-05-26 11:25:37:
- icomment:
Logged In: YES user_id=80530 only in the general sense that the cleanup logic of the http package is an utter mess, and both these problems arise from that. However, the specific problem in this report is that the state array is unset by [http::reset], so whenever both the -timeout and -command options are in use, and the timeout triggers and the -command callback returns an error, then the [vwait] within [http::wait] will return with the state array unset. This will cause the command return $state(status) on line 848 to raise an error about being unable to read the variable that's been unset. Any code not calling [http::wait] but relying on another event loop may have similar problems, if it is not prepared for the possibility that the state array may be unset. Bug 705956 doesn't appear to be about having the state array unset at all. The -timeout option is not involved. In contrast, it assumes the state array still exists, and the value of $state(status) is "error" and the issue is whether some cleanup logic based on that value has been inverted. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [33332cb973] (rid 106544) by dgp on 2007-11-15 22:04:54:
- assignee changed to: "patthoyts"
Ticket change [ea3ef13349] (rid 103335) by dgp on 2007-11-28 01:49:01:
- icomment:
Logged In: YES user_id=80530 Originator: YES patthoyts, had any chance to look at this?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7af5da7eb8] (rid 90430) by patthoyts on 2008-02-22 18:13:13:
- closedate changed to: "2008-02-22T11:13:13"
- closer changed to: "patthoyts"
- icomment:
Logged In: YES user_id=202636 Originator: NO Same as #1818565
- login: "patthoyts"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
- username: "patthoyts"