.
D 2025-11-25T14:32:35.912
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment In\swhat\sappears\sto\sbe\sa\srecurrence\sof\s[217794],\sI'm\sgetting\scrashes\sin\s<tt>socket-*-12.3</tt>\s(both\saddress\sfamilies,\scommit\s[4724603ffb]\son\s<tt>trunk</tt>)\sapparently\sdue\sto\sinheritance\sof\sthe\ssocket,\sbut\sonly\swhen\sthe\sprocess\sexits\swith\san\sevent\sloop\srunning.\sHere's\sa\stypical\spiece\sof\soutput:\r\n\r\n<verbatim>\r\n====\ssocket_inet-12.3\stesting\sinheritance\sof\saccepted\ssockets\sFAILED\r\n====\sContents\sof\stest\scase:\r\n\r\n\s\s\s\s#\sLaunch\sthe\sscript2\sprocess\sand\sconnect\sto\sit.\sSee\show\slong\sthe\ssocket\r\n\s\s\s\s#\sstays\sopen\r\n\s\s\s\s##\sexec\s[interpreter]\sscript2\s&\r\n\s\s\s\sset\sp\s[open\s"|[list\s[interpreter]\s$path(script2)]"\sr]\r\n\s\s\s\sgets\s$p\slisten\r\n\s\s\s\sset\sf\s[socket\s$localhost\s$listen]\r\n\s\s\s\sfconfigure\s$f\s-buffering\sfull\s-blocking\s0\r\n\s\s\s\sfileevent\s$f\sreadable\s[list\sgetdata\s$f]\r\n\s\s\s\s#\sIf\sthe\ssocket\sis\sstill\sopen\safter\s5\sseconds,\sthe\sscript1\sprocess\smust\r\n\s\s\s\s#\shave\sinherited\sthe\saccepted\ssocket.\r\n\s\s\s\sset\sfailed\s0\r\n\s\s\s\sset\safter\s[after\s5000\s[list\sset\sx\s"accepted\ssocket\swas\sinherited"]]\r\n\s\s\s\sproc\sgetdata\s{\sfile\s}\s{\r\n\s\s\s\s\s\s\s\s#\sRead\shandler\son\sthe\sclient\ssocket.\r\n\s\s\s\s\s\s\s\sglobal\sx\r\n\s\s\s\s\s\s\s\sglobal\sfailed\r\n\s\s\s\s\s\s\s\sset\sstatus\s[catch\s{read\s$file}\sdata]\r\n\s\s\s\s\s\s\s\sif\s{$status\s!=\s0}\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\sset\sx\s"read\sfailed,\serror\swas\s$data"\r\n\s\s\s\s\s\s\s\s}\selseif\s{[string\scompare\s{}\s$data]}\s{\r\n\s\s\s\s\s\s\s\s}\selseif\s{[fblocked\s$file]}\s{\r\n\s\s\s\s\s\s\s\s}\selseif\s{[eof\s$file]}\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\sset\sx\s"accepted\ssocket\swas\snot\sinherited"\r\n\s\s\s\s\s\s\s\s}\selse\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\sset\sx\s"impossible\scase"\r\n\s\s\s\s\s\s\s\s}\r\n\s\s\s\s\s\s\s\sreturn\r\n\s\s\s\s}\r\n\s\s\s\svwait\sx\r\n\s\s\s\sset\sx\r\n\r\n----\sTest\scleanup\sfailed:\r\nchild\skilled:\ssegmentation\sviolation\r\n----\serrorInfo(cleanup):\schild\skilled:\ssegmentation\sviolation\r\n\s\s\s\swhile\sexecuting\r\n"close\s$p"\r\n\s\s\s\s("uplevel"\sbody\sline\s5)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"uplevel\s1\s$cleanup"\r\n----\serrorCode(cleanup):\sCHILDKILLED\s18364\sSIGSEGV\s{segmentation\sviolation}\r\n====\ssocket_inet-12.3\sFAILED\r\n</verbatim>\r\n\r\nThe\scrash\scomes\sfrom\sone\sof\sthe\ssubprocesses\slaunched,\sbut\s<i>only\swhen\sthe\sinnermost\ssubprocess\sdoes\san\sexit\swith\sthe\sevent\sloop\sstill\srunning;</i>\saltering\sthe\scallbacks\sso\sthat\sthe\ssubprocess\sexits\safter\sstopping\sthe\sevent\sloop\s(<tt>socket_*.12.4</tt>)\sprevents\sthe\scrash.\r\n\r\nI\sdon't\sthink\sthe\scode\sshould\scrash.\sI\sdon't\sknow\swhy\sthe\scode\sis\scrashing.\sI've\smarked\sthe\stest\sas\sa\s<tt>knownBug</tt>.
J is_private 0
J login dkf
J priority 5\sMedium
J private_contact f6b536f9c1ed4b589e96e38fb613afc3d8991783
J resolution None
J severity Minor
J status Open
J submitter dkf
J subsystem 27.\sChannel\sTypes
J title socket_*-12.3\scrashes\son\sWindows\s11
J type Bug
K 06f19cc401de076eea76538424796d1ee54ed221
U dkf
Z 5599648d90aa29518c0bf1f202aa3b49