.
D 2000-10-26T05:12:27
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s6282\sBug\nVersion:\s8.3.1\nSubmitDate:\s'2000-09-18'\nLastModified:\s'2000-09-20'\nSeverity:\sSER\nStatus:\sUnAssn\nSubmitter:\stechsupp\nChangedBy:\swelch\nOS:\sLinux\nOSVersion:\sLinux\sbugger\s2.2.17\s#1\sFri\sSep\s15\s02:22:10\sEEST\s2000\si586\sunknow\nMachine:\sVarious\sPentiums\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nName:\nKristoffer\sLawson\n\nReproducibleScript:\n===============\s\sServer:\n\nvariable\sfirstread\s1\n\nproc\saccept\s{sock\saddr\sport}\s{\n\s\s\s\sfconfigure\s$sock\s-buffering\snone\n\s\s\s\sfconfigure\s$sock\s-blocking\s0\n\s\s\s\sfileevent\s$sock\sr\s[list\sstuff\s$sock]\n}\n\nproc\sstuff\s{sock}\s{\n\s\s\s\sfileevent\s$sock\sr\s{}\s\s\s\s;#\sthis\swas\sin\sthe\soriginal\scode\sbut\swith\sthem\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;#\sit's\svery\shard\sto\sreproduce!\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;#\ssudo\snice\s-n\s-20\sfor\ssender\sshould\sdo\sthe\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;#\sjob...\s;)\n\n\s\s\s\sif\s{[eof\s$sock]}\s{\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sputs\s"***EOF***"\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sexit\n\s\s\s\s}\n\s\s\s\sputs\s-nonewline\sstdout\s[read\s$sock]\n\n\s\s\s\svariable\sfirstread\n\s\s\s\s\s\s\s\svariable\sdelay\n\n\s\s\s\sif\s{$firstread}\s{\n\s\s\s\s\s\s\s\sset\sdelay\s0\n\s\s\s\s\s\s\s\safter\s2000\s{set\sdelay\s1}\n\s\s\s\s\s\s\s\svwait\sdelay\n\s\s\s\s\s\s\s\s##\ssend\sresponse\n\s\s\s\s\s\s\s\sputs\s$sock\s"\s"\n\s\s\s\s\s\s\s\sset\sfirstread\s0\n\s\s\s\s}\n\n\s\s\s\sfileevent\s$sock\sr\s[list\sstuff\s$sock]\n}\n\nsocket\s-server\saccept\s40010\nvwait\sforever\n\n===================\sClient:\n\nset\saddr\s[lindex\s$argv\s0]\n\n##\scalled\swhen\sdata\sfrom\sremote\send\sarrives.\nproc\scb\s{}\s{\n\s\s\s\s\s\s\s\svariable\ssock\n\n\s\s\s\s\s\s\s\sread\s$sock\n\n\s\s\s\s\s\s\s\sputs\s$sock\s"<callback\sfirstsend>"\n\s\s\s\s\s\s\s\sputs\s$sock\s"<callback\ssecondsend>"\n\n\s\s\s\s\s\s\s\sfor\s{set\si\s0}\s{$i\s<\s9000}\s{incr\si}\s{\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sputs\s$sock\s"test32432\stest3211\s$i"\n\s\s\s\s\s\s\s\s}\n\n\s\s\s\s\s\s\s\sputs\s$sock\s"<callback\slastnormalsend>"\n\s\s\s\s\s\s\s\sputs\s$sock\s"all\sdata\sok"\n\n\s\s\s\s\s\s\s\sclose\s$sock\n\s\s\s\s\s\s\s\sexit\n}\n\n##\sOpen\s&\sconfigure\nvariable\ssock\s[socket\s$addr\s40010]\nfconfigure\s$sock\s-blocking\s0\nfconfigure\s$sock\s-buffering\snone\n\nfileevent\s$sock\sr\scb\n#\scb\n\nputs\s$sock\s"start"\n\nvwait\sforever\n\nObservedBehavior:\nI\sam\snow\sfairly\sconvinced\sthis\sis\sa\sbug\sin\sTcl8.3.1.\sWhen\sthe\sclient\sis\srun\son\sa\sfast\smachine\sand\nespecially\sif\sit\sis\sniced\sto\sa\shigh\spriority\stha\sserver\sreceives\san\sEOF\sbefore\sall\sthe\sdata\sis\ssent.\sThis\salso\nonly\sseems\sto\shappen\swhen\sthe\sserver\shas\sresponded\swith\ssome\sdata\sfirst.\n\nThe\sreason\sfor\smy\ssuspicions\sis\sthat\sthe\shttp\spackage\sseems\sto\sbe\sdoing\sexactly\sthe\ssame\swith\sTcl\s8.3.1.\nIe.\sI\smight\stry\sto\sreceive\sa\slarge\simage\sbut\sa\schunk\sfrom\sthe\send\sis\smissing.\sWhen\sI\sdo\sexactly\sthe\ssame\noperation\swith\sTcl8.2\sor\s8.0\sI\shave\sno\sproblems.\sOf\scourse,\sthis\smight\sbe\sa\sbug\sintroduced\sinto\nhttp\sbut\sI\scouldn't\ssee\sanything\sin\sthe\scode\sthat\slooked\slike\sit\swould\scause\sthat\skind\sof\sbehaviour\sand\sas\swe\nhave\ssimilar\sbehaviour\swith\sscripts\slike\sthe\sabove\sI\sbelieve\sthere\sreally\sis\ssomething\sfishy\sin\sTcl's\sIO\n(specifically\swith\ssockets).\s\n\nThis\sis\srather\sawkward\sfor\sus\sas\swe\sare\sbuilding\slarge\ssystems\saround\sTcl\swhich\squite\sheavily\suse\sthe\sIO\nfacilities.\sOf\scourse,\sthis\smight\shave\sbeen\sfixed\sin\s8.3.2\s(I\shaven't\sbeen\sable\sto\stest\sthat\syet),\sbut\sas\sI\ncouldn't\sfind\sthis\sbug\slisted\sspecifically\sthen\sI\sthought\sit\sbetter\sto\sreport.\n\nDesiredBehavior:\nIn\sthe\sgiven\sscript\sall\sof\sthe\sdata\sshould\sbe\ssent\sand\soutputted\sto\sthe\sscreen\sbefore\sthe\sEOF\snotification.\n\n\n\nI\scan\srepeat\sthis\swith\sboth\s8.3.1\sand\s8.3.2\son\sLinux,\sbut\sonly\nin\sthe\sloopback\scase\swhere\sthe\sclient\sand\sserver\sare\son\sthe\ssame\shost.\nIt\sworks\sfine\son\sSolaris\sloopback,\sand\sbetween\sSolaris\sand\sLinux\sboxes.\nHowever,\sI\shad\sto\scomment-out\sthe\s\n\s\s\s\sfileevent\s$sock\sr\s{}\s\s\s\s;#\sthis\swas\sin\sthe\soriginal\scode\sbut\swith\sthem\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;#\sit's\svery\shard\sto\sreproduce!\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;#\ssudo\snice\s-n\s-20\sfor\ssender\sshould\sdo\sthe\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;#\sjob...\s;)\ncall\sin\sthe\sserver's\sfileevent\shandler.\s\sWithout\sthat\sit\sworks\s-\sthe\nnice'ing\sdoesn't\shave\sany\seffect.\s\sSo,\sit\scould\sbe\spossible\sthat\ssetting\nfileevents\sis\sperturbing\sthe\ssystem\ssomehow.\n\s\n--\s09/20/2000\swelch
J foundin obsolete:\s8.3.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title EOF\ssent/received\stoo\searly\sor\spossible\sbug\sin\shttp\spackage\s
J type Bug
K 219400ffffffffffffffffffffffffffffffffff
U nobody
Z 5fdfb4bfc3824e1e055be7f65b8ca2bb