Overview
| Artifact ID: | ed0826597b8c12424881bd4d0791e14d0448be209a106dd754c5025d818c9a1e |
|---|---|
| Ticket: | 7cf7cce42320c60ca3ed94c3ec59de1694a27f68
windows: `socket -async localhost $port` can hang sporadically in gethostbyname |
| User & Date: | sebres on 2020-08-10 15:38:12 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
Evaluation of <code>socket -async $host $port</code> can hang sporadically on windows. Further investigation shows that this really hang (freezes completely) in <code>CreateSocketAddress</code> when executing <code>gethostbyname</code>. This is not a resolve issue, since it's affected by localhost also and it does not return after timeout, so causes total freeze in calling thread. The issue is extremely sporadic, but it is better reproducible on Windows 10 box with several tcl-workers simultaneously executing <code>socket -async localhost $port</code> in the cycle. I think this could be also a reason for other sporadically hanging issues, like [e484a8407c] or [1adeb65446], at least partially (for test cases involving socket calls). Related to [https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-gethostbyname|MS documentation]: <i><blockquote>Developers creating Windows Sockets 2 applications are urged to use the <code>getaddrinfo</code> function instead of <code>gethostbyname</code>.</blockquote></i> And since [7e814eaa84] we're using Winsock 2.2 API, it must be fixed.<br/> Anyway on 8.6 using <code>getaddrinfo</code> this behavior is not reproducible at all.
- foundin changed to: "8.5"
- is_private changed to: "0"
- login: "sebres"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Critical"
- status changed to: "Open"
- submitter changed to: "sebres"
- subsystem changed to: "25. Channel System"
- title changed to:
windows: `socket -async localhost $port` can hang sporadically in gethostbyname
- type changed to: "Bug"