<i>dead-console busy-loop in tclWinConsole.c</i> status still Open with 3 other changes
by
.
D 2026-07-12T04:01:53.897
J icomment My\sfailed\sinitial\sticket\ssubmission\swas\sclearly\smarked\sdescribed\sas\shaving\sbeen\sgenerated\sby\suse\sof\sFable\s5\s-\swith\smy\sown\spreamble.\r\n\r\nI\smentioned\sthat\sit\sshould\sbe\staken\swith\sa\sgrain\sof\ssalt\sas\sto\swhether\sthis\sis\striggered\sin\sreal-world\sapplication\suse\sversus\sthe\sllm\sgenerated\sscratch\sscripts\sand\stesting\sharnesses\sthat\scaught\sthis.\r\n\r\nI\swas\sable\sto\sreproduce\sthe\seffect\susing\sthe\sgenerated\srepro\spowershell\sscripts\sand\snoticed\sincreased\scpu\suse\sand\sfan\sspinups.\r\n\r\nFirst\spart\sof\sreport\shere.\sI've\sommitted\sthe\srest\sunder\sthe\sguess\sthat\sCDN\swas\striggered\sby\scode\ssamples\srather\sthan\sdetecting\sAI\scontent.\r\n\r\nllm\swas\spointed\sat\sup\sto\sdate\stcl\ssource\sand\sdid\sa\sfairly\sfull\sanalysis\swith\ssuggestions.\r\n\r\nPing\sme\sfor\smore\sif\sit\sseems\sinteresting.\r\n\r\n------------------------------------------------------\r\n\r\n\r\n**Component:**\swin/tclWinConsole.c\s(channel\sdriver)\r\n**Versions\saffected:**\sverified\s9.0.2\sand\s9.0.3\son\sWindows\s11\s(build\s26200);\sthe\sdefective\r\ncode\spaths\sare\sunchanged\sin\s9.1b1\ssources.\sTcl\s8.6\sis\snot\saffected\s(pre-rewrite\sconsole\r\ndriver;\sdifferent\smechanism).\r\n**Severity:**\sSerious.\sEach\soccurrence\sleaves\sa\snear-invisible\sorphan\sburning\s~1-2\scores\r\nforever,\sand\soccurrences\saccumulate:\snothing\sever\sreaps\sthem,\sso\severy\sconsole-host\sdeath\r\nagainst\sa\sfileevent-reading\stclsh\sadds\sone.\sEight\sconcurrent\sorphans\sproduced\san\saudible\r\nthermal/fan\sresponse\son\sthe\stest\sworkstation\swhile\sstill\sshowing\snothing\sconspicuous\sin\r\nTask\sManager\s(see\sObservability).\r\n\r\n##\sSummary\r\n\r\nWhen\sthe\sconsole\s*server*\s(conhost.exe)\sserving\sa\sTcl\s9\sprocess\sdies\swithout\sthe\sclient\r\nbeing\sterminated,\sa\sscript\swith\sa\s`chan\sevent\sstdin\sreadable`\shandler\sis\snever\snotified:\r\nthe\sdriver\sdetects\sthe\serror\sinternally,\sbut\sthe\sevent\sit\squeues\sfor\sthe\sinterp\sthread\sis\r\ndiscarded\sbefore\s`Tcl_NotifyChannel`,\sso\sno\sreadable\sevent,\sno\sEOF,\sno\sread\serror\sever\r\nreaches\sscript\slevel.\sMeanwhile\sthe\sdriver's\sconsole\sreader\sthread\sbusy-loops\son\sthe\r\npersistent\serror\swith\sno\swait,\sand\sits\scontinuous\swatcher-nudging\skeeps\sthe\sinterp\r\nthread's\sevent\sloop\scycling\sat\szero\sblock\stime.\sThe\sprocess\scannot\seven\simplement\sits\sown\r\ndefence\svia\sfileevents\s-\sonly\sa\spoll\s(see\sWorkaround)\scan\ssee\sthe\scondition.\r\n\r\n##\sReal-world\striggers\s(legitimate\sapplication\sscenarios)\r\n\r\nThe\sreproduction\sbelow\sforce-kills\sa\sconhost\sto\smake\sthe\strigger\sdeterministic,\sbut\sthe\r\nsame\sclient-side\sstate\s-\sconsole\sserver\sgone,\sclient\salive\s-\sarises\sin\sordinary\suse.\r\nExposed\sapplication\sprofile:\sany\slong-running\sTcl\sprogram\sthat\sreads\sconsole\sstdin\svia\sa\r\nfileevent\s-\sa\sREPL,\sa\smonitor\saccepting\soperator\scommands,\sa\sserver\swith\sconsole\scontrol\r\ninput\s-\ssince\sthe\strigger\sis\sentirely\soutside\sthe\sapplication's\scontrol:\r\n\r\n-\s**A\suser\skills\sa\shung\sconsole\swindow\svia\sTask\sManager.**\sKilling\s"Console\sWindow\sHost"\r\n\s\s(conhost.exe)\sis\scommon\sfolk-advice\sfor\sa\sstuck\swindow;\sTerminateProcess\sdelivers\sno\r\n\s\sCTRL_CLOSE_EVENT,\sso\sthe\sclient\ssurvives\sagainst\sa\sdead\sconsole.\s(Identical\smechanism\r\n\s\sto\sthe\sscripted\srepro\s-\sverified.)\r\n-\s**conhost.exe\scrashes.**\sThe\shost\sis\san\sordinary\suser-mode\sprocess;\swhen\sit\sdies\sof\sits\r\n\s\sown\sbug\sthe\sclient\sis\sorphaned\sexactly\sas\sabove.\r\n-\s**A\sterminal\semulator\scrashes.**\sA\sclean\sclose\sruns\sConPTY/tab\steardown\sthat\sterminates\r\n\s\sthe\sclient\stree,\sbut\sa\s*crashed*\sterminal\s(Windows\sTerminal\sor\sthird-party)\snever\sruns\r\n\s\sthat\scleanup;\sits\sconsole\sserver\sgoes\saway\sungracefully.\s(Plausible-by-mechanism;\r\n\s\suntested\shere\s-\sthe\sclassic-conhost\scase\sis\sthe\sverified\srepro.)\r\n-\s**Automation/CI\sharnesses\sthat\skill\stheir\sconsole\shost.**\sA\sharness\sthat\slaunches\swork\r\n\s\sunder\sa\shidden\sconsole\s(Start-Process\s-WindowStyle\sHidden,\sscheduled\stasks,\sagent\r\n\s\srunners)\sand\slater\s"cleans\sup"\sby\skilling\sthe\slauncher\sor\shost\sprocess\s-\swithout\sa\sjob\r\n\s\sobject\sthat\scovers\sthe\sclients\s-\sleaves\sthe\sworker\stclsh\sorphaned.\sThis\sis\show\sthe\sbug\r\n\s\swas\sfirst\shit\sin\sproduction\suse:\san\sinteractive\sshell\sunder\sa\shidden\sconsole\soutlived\r\n\s\sits\shost\sand\swas\sfound\s37\sminutes\slater\swith\s~1550\scpu-seconds\saccumulated,\sdiscovered\r\n\s\sonly\sbecause\sit\spolluted\sa\stest\sharness's\sprocess-liveness\schecks.\r\n-\s**Session\steardown\sedge\scases.**\sAny\spath\swhere\sthe\ssession\sinfrastructure\stears\sdown\r\n\s\sthe\sconsole\shost\sbefore\s(or\swithout)\sterminating\sits\sclients\sproduces\sthe\ssame\sstate.\r\n\r\nIn\severy\scase\sthe\sfailure\scompounds:\seach\sevent\sadds\sone\simmortal\sspinner,\sand\sthe\r\nObservability\ssection\sexplains\swhy\snobody\snotices\sthem.\r\n\r\n<elided>
J login juliannoble2
J mimetype text/plain
K f10d91c2d39e1b015be44c41840f4cd0b4f4640f
U juliannoble2
Z 12a221ac541bbb06a78d812e80537925