From: SourceForge.net <no...@so...> - 2009-08-19 21:39:02
|
Bugs item #2840603, was opened at 2009-08-19 17:39 Message generated for change (Tracker Item Submitted) made by eee You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2840603&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 25. Channel System Group: current: 8.5.7 Status: Open Resolution: None Priority: 5 Private: No Submitted By: eee (eee) Assigned to: Andreas Kupries (andreas_kupries) Summary: Tcl hangs or crashes with [fileevent] on too many sockets Initial Comment: 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2840603&group_id=10894 |