Overview
| Artifact ID: | 8d03a89608f5f6362ebdc8678a3824e22c071327 |
|---|---|
| Ticket: | 2840603fffffffffffffffffffffffffffffffff
Tcl hangs or crashes with [fileevent] on too many sockets |
| User & Date: | eee on 2009-08-19 21:39:02 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.5.7"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "eee"
- subsystem changed to: "25. Channel System"
- title changed to:
Tcl hangs or crashes with [fileevent] on too many sockets
- type changed to: "Bug"