Artifacts Associated With Ticket 05b158ed56
Ticket change [c74c94a144] (rid 256365) by jmroot on 2026-09-15 16:50:16:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-plain"
- comment initialized to:
A call like this in a polling loop occasionally errors for me: set my_url https://example.org ::http::geturl $my_url -keepalive 1 The errorInfo isn't terribly helpful but it does look like a bug in the http package: can't read "socketWrState(example.org:443)": no such element in array while executing "::http::geturl $my_url -keepalive 1" I'm using TclTLS 2.0.1 for https support. The same code running under Tcl 8.6 didn't have this problem. I'm happy to add code to print some more info if you can tell me what to have it look at. - foundin initialized to: "9.0.4"
- is_private initialized to: "0"
- login: "jmroot"
- priority initialized to: "5 Medium"
- private_contact initialized to: "76145175b6ffee50eff3d492ff299da342ff102d"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "jmroot"
- subsystem initialized to: "29. http Package"
- title initialized to:
http::geturl -keepalive intermittent socketWrState errors
- type initialized to: "Bug"
Ticket change [0239461772] (rid 256416) by jmroot on 2026-09-16 22:48:07:
- icomment:
Here's a test program that reproduces the error on the second loop iteration for me: package require http set url http://ftp.fau.de/macports/ while 1 { if {![catch {::http::geturl $url -keepalive 1} token]} { if {[::http::status $token] eq "ok" && [::http::ncode $token] == 200} { set data [::http::data $token] puts "page fetched ok" } else { puts stderr "HTTP error: [::http::error $token]" } ::http::cleanup $token } else { puts stderr $::errorInfo puts stderr "Error: ::http::geturl returned: $token" } after 60000 } - login: "jmroot"
- mimetype: "text/plain"
- icomment:
Ticket change [c785a96d0c] (rid 256417) by oehhar on 2026-09-17 06:35:29:
- icomment:
I can confirm with tcl 9.0.4 and 8.6.15 that this happens in TCL 9 and not in TCL 8.6. Thanks for the report! Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [a07f327187] (rid 258307) by serhiy.storchaka on 2026-10-16 21:36:11:
- foundin changed to: "9.0.5, 9.1.0"
- icomment:
Reproduced on 9.0 and main with a local server that closes idle keep-alive connections: http::CheckEof closes the idle socket after geturl has chosen to reuse it but before http::OpenSocket runs, so the reuse path reads the removed socketWrState element. Proposed fix in branch [/timeline?r=http-keepalive-reuse-closed|http-keepalive-reuse-closed]: OpenSocket opens a new connection in that case. Test http-4.19. It also fixes [3764f4e81f].
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
Ticket change [35ab351019] (rid 261449) by jan.nijtmans on 2026-11-11 22:28:52:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2461356.4367218521"
- closer changed to: "jan.nijtmans"
- icomment: "Merged to [98a1b78011|trunk] and core-9-0-branch"
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"