Artifacts Associated With Ticket 2840603
Ticket change [8d03a89608] (rid 127845) by eee on 2009-08-19 21:39:02:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl hangs if I try to use event-driven I/O on more than approximately 1024 channels, and if I use greatly more than that, Tcl crashes. I used ActiveTcl 8.5.6 and an 8.6b1.1 basekit from the teapot. Running on sparc Solaris 10. gps suggested that the issue has to do with the FD_SETSIZE define of the select() system call, and suggested that the fix involved checking "if ( fd >= FD_SETSIZE)" in tclUnixNotfy.c:Tcl_CreateFileHandler() # SAMPLE script that will coredump. # (for a script that merely hangs, change the "3000" to "1100" or smaller) proc accept {fd host port} { puts "Got connection: $host:$host:$fd" fileevent readable $fd [list read-data $fd] } proc read-data {fd} { puts "$fd: [read $fd]" } for {set port 1} {$port < 3000} {incr port} {catch {socket -server accept $port} res; puts "$port:$res"} puts "Now listening." % vwait forever - foundin initialized to: "obsolete: 8.5.7"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "eee"
- subsystem initialized to: "25. Channel System"
- title initialized to:
Tcl hangs or crashes with [fileevent] on too many sockets
- type initialized to: "Bug"
Ticket change [1fb15573c3] (rid 257745) by serhiy.storchaka on 2026-10-12 14:06:31:
- icomment:
This is the same problem as [c6897e6e6a]: the select() notifier uses <code>FD_SET</code> without checking <code>fd < FD_SETSIZE</code>. Since 8.7 Linux, the BSDs and macOS use the epoll or kqueue notifier, which have no such limit, but platforms using the select notifier (e.g. Solaris and illumos) are still affected. Closing as a duplicate of [c6897e6e6a], which has the analysis and proposed fixes.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [da1a6c26ad] (rid 257746) by serhiy.storchaka on 2026-10-12 14:06:31:
- login: "serhiy.storchaka"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
Ticket change [f7dd47d764] (rid 259889) by serhiy.storchaka on 2026-10-22 17:19:24:
- closedate changed to: "2461326.0878630094"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"