Skip to content
Tcl Source Code Artifact [8d03a89608]
Login

Artifact [8d03a89608]

Artifact 8d03a89608f5f6362ebdc8678a3824e22c071327:

Ticket change [8d03a89608] - New ticket [2840603fffffffff|2840603fff] <i>Tcl hangs or crashes with [fileevent] on too many sockets</i>. by eee on 2009-08-19 21:39:02.
D 2009-08-19T21:39:02
J assignee andreas_kupries
J cmimetype text/plain
J comment Tcl\shangs\sif\sI\stry\sto\suse\sevent-driven\sI/O\son\smore\sthan\sapproximately\s1024\schannels,\sand\sif\sI\suse\sgreatly\smore\sthan\sthat,\sTcl\scrashes.\sI\sused\sActiveTcl\s8.5.6\sand\san\s8.6b1.1\sbasekit\sfrom\sthe\steapot.\sRunning\son\ssparc\sSolaris\s10.\n\ngps\ssuggested\sthat\sthe\sissue\shas\sto\sdo\swith\sthe\sFD_SETSIZE\sdefine\sof\sthe\sselect()\ssystem\scall,\sand\ssuggested\sthat\sthe\sfix\sinvolved\schecking\s"if\s(\sfd\s>=\sFD_SETSIZE)"\sin\stclUnixNotfy.c:Tcl_CreateFileHandler()\n\n#\sSAMPLE\sscript\sthat\swill\scoredump.\n#\s(for\sa\sscript\sthat\smerely\shangs,\schange\sthe\s"3000"\sto\s"1100"\sor\ssmaller)\nproc\saccept\s{fd\shost\sport}\s{\n\s\s\s\s\s\s\s\sputs\s"Got\sconnection:\s$host:$host:$fd"\n\s\s\s\s\s\s\s\sfileevent\sreadable\s$fd\s[list\sread-data\s$fd]\n}\nproc\sread-data\s{fd}\s{\n\s\s\s\s\s\s\s\sputs\s"$fd:\s[read\s$fd]"\n}\nfor\s{set\sport\s1}\s{$port\s<\s3000}\s{incr\sport}\s{catch\s{socket\s-server\saccept\s$port}\sres;\sputs\s"$port:$res"}\nputs\s"Now\slistening."\n%\svwait\sforever
J foundin obsolete:\s8.5.7
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter eee
J subsystem 25.\sChannel\sSystem
J title Tcl\shangs\sor\scrashes\swith\s[fileevent]\son\stoo\smany\ssockets
J type Bug
K 2840603fffffffffffffffffffffffffffffffff
U eee
Z c0b93a924803c69982a5c74c40b2cccc