.
D 2014-02-18T19:20:21.734
J assignee nobody
J closer nobody
J cmimetype text/html
J comment Bug\sreproduction:\s<br>\r\nThis\sissue\saffects\sall\sWindows\stcl\sbuilds\sand\sis\shard\sto\sreproduce;\sI\shad\sthe\smost\ssuccess\sin\sreproducing\sit\son\sa\svery\sbusy\svirtual\svmware\smachine\swith\swindows\sserver\s2012.\s<br>\r\n<br>\r\nProblem:\s<br>\r\nThe\sproblem\sis\sthat\stcl\sterminates\spipe's\shelper\sthreads\sif\sthey\sdon't\sexit\sin\sa\s"timely"\smanner\s(20\sms).\s<br>\r\nIn\ssome\scases,\s20\sms\sis\snot\senough\sand\sthose\sthreads\sare\sterminated\swhile\sthey\sare\sbeing\sunloaded\sby\sthe\swindows.\s<br>\r\n<br>\r\nMore\sdetails:\s<br>\r\nTerminating\sthreads\sduring\stheir\sinitialization\sor\steardown\sphase\smay\sresult\sin\sntdll.dll's\sLoaderLock\sto\sremain\slocked\sindefinitely.\s<br>\r\nThis\scauses\sntdll.dll's\sLdrpInitializeThread()\sto\sdeadlock\strying\sto\sacquire\sLoaderLock.\s<br>\r\nLdrpInitializeThread()\sis\sexecuted\swithin\snew\sthreads\sto\sperform\sinitialization\sand\sto\sexecute\sDllMain()\sof\sloaded\sdlls.\s<br>\r\nAs\sa\sresult,\sall\snew\sthreads\sare\sdeadlocked\sin\stheir\sinitialization\sphase\sand\snever\sexecute,\seven\sthough\sCreateThread()\sreports\ssuccessful\sthread\screation.\s<br>\r\nThis\sresults\sin\sa\svery\sweird\sprocess-wide\sbehavior,\swhich\sis\sextremely\shard\sto\sdebug:\sthreads\sare\ssimply\snot\sbeing\sexecuted…\s<br>\r\n<br>\r\nFix:\s<br>\r\nThe\sfix\sis\sto\smake\ssure\sthat\sthreads\sare\snot\sterminated\sduring\stheir\sinitialization\sor\steardown\sphase.\s<br>\r\nSee\sattached\spatch\sfor\sa\sfix.\s<br>\r\nNote\sthat\seven\sthough\sthis\spatch\sfixes\sthe\sissue\sat\shand,\stclWinPipe.c\sstill\sterminates\sthreads\son\sbusy\smachines\svery\soften\s(even\sif\sthey\sare\snot\sblocked\son\sIO),\sresulting\sin\ssignificant\smemory\sleaks.\s<br>\r\nThe\sproper\sfix\swould\sbe\sfor\stcl\sto\sstop\sterminating\sthreads\sonce\sand\sfor\sall.\sThis\smay\srequire\sredesign\sof\swindows'\spipes\simplementation,\smaybe\susing\s\swindows\snamed\spipes\sinstead\sof\sanonymous\sones.\s<br>
J foundin All
J is_private 0
J login stanko
J priority 5\sMedium
J private_contact d7dd97c402985138d0d42f13120ecaa82f31bd03
J resolution None
J severity Critical
J status Open
J submitter stanko
J subsystem 49.\sThreading
J title Closing\stcl\spipes\sprevents\swindows\sthreads\sfrom\sstarting\sup
J type Bug
K 8bd13f07bde6fb0631f27927e36461fdefe8ca95
U stanko
Z 3ab57d638a3712e60ad71f93df51bac2