.
D 2014-06-07T02:38:16.240
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment I\snoticed\sthat\sthe\stest\ssocket_$af-2.11\sin\ssocket.test\ssometimes\sfails.\sThe\sfailure\sseems\sto\sbe\sdue\sto\sa\srace\scondition\sin\sthe\stest\sitself.\r\nThe\sbug\swas\sintroduced\sin\scommit\s63da2a6cf068dfcd2906ebc7278bb7618f8a0eb3\r\n(https://github.com/tcltk/tcl/commit/63da2a6cf068dfcd2906ebc7278bb7618f8a0eb3).\r\n\r\nIn\sthis\stest,\ssome\stext\sis\swritten\sto\sa\sTCP\ssocket,\sthen\sthis\stext\sis\sread,\sthen\sanother\sread\sattempt\sis\smade\s(which\sshould\sreturn\snothing),\sthen\smore\stext\sis\swritten,\swhich\sis\sthen\sread.\sTo\sbe\ssure\sthat\sthe\swritten\stext\sis\sactually\savailable\sfor\sthe\sread\sattempt,\sline\s574\sand\s581\sof\ssocket.test\s("after\s500")\sbefore\sthis\scommit\scaused\sTcl\sto\swait\sfor\s500\smilliseconds.\sAfter\sthe\scommit,\sthis\sline\swas\sreplaced\sby\r\n\r\nafter\sidle\s{set\sx\s1}\r\nvwait\sx\r\n\r\nto\smake\sa\spass\sthrough\sthe\sevent\sloop.\sHowever,\sthis\sdoes\snot\sguarantee\sthat\sthe\stext\swritten\sto\sthe\ssocket\scan\sactually\sbe\sread.\sHence,\ssometimes\sthe\sfirst\sread\sreturns\snothing,\sand\sthe\stest\sfails.\r\nUntil\ssomebody\scomes\sup\swith\sa\sbetter\sway\sto\sspeed\sup\sthis\stest,\sI\sthink\swe\sshould\srevert\sto\s500\smillisecond\sdelay\sto\savoid\shaving\stest\sfailures.
J foundin 8.6.1
J is_private 0
J login anonymous
J priority 5\sMedium
J private_contact 500c9a7a4e11b3ea0441850610e04006941c0cf3
J resolution None
J severity Minor
J status Open
J submitter anonymous
J subsystem 34.\stcltest\sPackage
J title bug\sin\ssocket.test\ssocket_$af-2.11\s{detecting\snew\sdata}
J type Patch
K 65533ec089b4d315a773d638d816673e311b3f03
U anonymous
Z d6aa61b30b3bdff577eb40912988014b