.
D 2004-12-03T00:08:10
J assignee davygrvy
J cmimetype text/plain
J comment There\sis\san\sissue\swith\sfinalization\sof\sthe\sthreaded\nWindows\sbuild\sthat\scan\sappear\sin\swinDde.test\sand\noccasionally\swinPipe.test.\s\sKevin\snarrowed\sit\sdown\sto\nthis\sseries\sof\sevents:\n\n*\sTcl_Finalize\sis\scalled\sfrom\sTcl_Exit\sand\sruns\sall\sthe\nexit\shandlers.\n\n*\sAfter\sall\sthe\sexit\shandlers\sare\srun,\sit\swinds\sup\ncalling\sTcl_FinalizeThread.\n\n*\sFrom\sthere\swe\sget\sinto\sTcl_FinalizeIOSubsystem,\sand\nthence\sto\sTcl_Close\n\n*\sWe\shave\san\sopen\spipe\sat\sthis\spoint,\sso\swe\sget\sinto\nPipeClose2Proc\sfrom\stclWinPipe.c.\n\n*\sThis\scalls\sTcl_CleanupChildren\s->\sTcl_WaitPid\n\n*\sand\sTcl_WaitPid\sfinds\sthat\sthe\spipe\ssubsystem\sisn't\ninitialized\s-\sbecause\sits\sexit\shandler\shas\salready\srun,\nso\scalls\sPipeInit,\sre-establishing\sthe\sexit\shandler.\n\n*\sNow\swe\sshut\sdown\sthe\szippy\smemory\sallocator\s-\swith\nthe\sexit\shandler\sstill\son\sthe\slist.\n\n*\sThe\slast-ditch\sTcl_Finalize\sin\sDLL_PROCESS_DETACH\nfinds\sthe\sexit\shandler\sand\sruns\sit\s-\sand\sthen\sfrees\sthe\nmemory.\n\n*\sWhich\sis\snow\sin\suse\sas\sa\sCRITICAL_SECTION\sdown\sin\sthe\nC\sruntime...\sboom.\n\n*\sI\sbelieve\sthat\sit's\sa\sthreaded\sproblem\sonly,\sand\sthe\nexit\shandler\sis\sbeing\screated\sin\sWindows-specific\scode.\n\n*\sI\sdon't\sknow\sif\sthere's\ssimilar\scode\sin\sUnix.\n\nThis\sis\sperhaps\srelated\sto\s990457\s(this\sis\sunix\nspecific,\sbut\sabout\sthreaded\sexit\sbehavior)\n
J foundin obsolete:\s8.4.8
J priority 7\sHigh
J resolution None
J status Open
J submitter hobbs
J subsystem 49.\sThreading
J title threaded\sexit\scan\sreinit\sPipeInit\son\sexit\sand\scrash
J type Bug
K 1078024fffffffffffffffffffffffffffffffff
U hobbs
Z 019ccdc152dcf3ea4db019a96b2ae187