Skip to content
Tcl Source Code Artifact [1e394a37e8]
Login

Artifact [1e394a37e8]

Artifact 1e394a37e86c12d1e85195b53f45cd4d9ace40de:

Ticket change [1e394a37e8] - New ticket [219118ffffffffff|219118ffff] <i>failed exec leaves defunct process</i>. by nobody on 2000-10-26 01:11:03.
D 2000-10-26T01:11:03
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s6148\sBug\nVersion:\s8.3.2\nSubmitDate:\s'2000-08-18'\nLastModified:\s'2000-09-06'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\shobbs\nRelatedBugIDs:\s5759\nOS:\sSolaris\nOSVersion:\sSolaris\s2.7\nMachine:\smultiprocessor\sSparc\s(E450\sI\sthink)\nFixedDate:\s'2000-09-06'\nFixedInVersion:\s8.4a2\nClosedDate:\s'2000-10-25'\n\n\nName:\n\nRob\sMayoff\n\n\nComments:\n\nThe\sproblem\sis\sthat\sthe\schild\swrites\sits\serror\scode\sto\sthe\spipe\sand\sthen\n\n\s\s\s\sexits.\s\sThe\sparent\sreads\sthe\scode\sand\sthen\scalls\swaidpid\swith\sthe\n\n\s\s\s\sWNOHANG\sflag.\s\sThe\sproblem\sis\sthat\sthe\sparent\smight\sread\sthe\scode\sand\n\n\s\s\s\scall\swaitpid\sbefore\sthe\schild\shas\sreached\sthe\sexit\scall,\sin\swhich\scase\n\n\s\s\s\swaidpid\sreturns\s0.\s\sThere\sis\sno\sreason\sfor\sthe\sparent\sto\suse\sthe\sWNOHANG\n\n\s\s\s\sflag.\s\sEliminating\sthe\sWNOHANG\sflag\sremoves\sthe\srace\scondition.\n\n\n\s\s\s\sThis\sproblem\salso\sexists\sin\sTcl\s7.6.\n\n\nReproducibleScript:\n\n#\sRun\sthis\sin\san\sinteractive\stclsh:\n\nfor\s{set\si\s0}\s{$i\s<\s100}\s{incr\si}\s{\n\n\s\scatch\s{exec\s/this/file/does/not/exist}\n\n}\n\n\nObservedBehavior:\n\nOn\sa\smultiprocessor\sSolaris\smachine,\swhen\san\sexec\sfails,\sthere\sis\sa\spossibility\sof\sthe\sfailed\schild\snot\sbeing\swaited\son\sand\shanging\saround\sas\sa\szombie\s(defunct\sprocess),\sdue\sto\sa\srace\scondition.\s\sThe\ssample\sscript\sabove\sgenerated\sabout\s33\szombies\sin\sone\stest.\n\n\nDesiredBehavior:\n\nNo\szombies!\n\n\nPatch:\n\n***\stclUnixPipe.c\s\s\s\s\s\s\s2000/08/15\s01:11:05\s\s\s\s\s1.1.1.1\n\n---\stclUnixPipe.c\s\s\s\s\s\s\s2000/08/15\s03:57:23\s\s\s\s\s1.2\n\n***************\n\n***\s447,453\s****\n\n\s\s\s\s\s\s\s\s\s*\sstartup.\n\n\s\s\s\s\s\s\s\s\s*/\n\n\n!\s\s\s\s\s\s\sTcl_WaitPid((Tcl_Pid)\spid,\s&status,\sWNOHANG);\n\n\s\s\s\s\s\s}\n\n\n\s\s\s\s\s\sif\s(errPipeIn)\s{\n\n---\s447,453\s----\n\n\s\s\s\s\s\s\s\s\s*\sstartup.\n\n\s\s\s\s\s\s\s\s\s*/\n\n\n!\s\s\s\s\s\s\sTcl_WaitPid((Tcl_Pid)\spid,\s&status,\s0);\n\n\s\s\s\s\s\s}\n\n\n\s\s\s\s\s\sif\s(errPipeIn)\s{\n\n\nPatchFiles:\n\nunix/tclUnixPipe.c\n\n\n\n\nFixed\sin\s8.4a2.\s\n--\s09/06/2000\shobbs
J foundin obsolete:\s8.3.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 60.\sNRE\sand\scoroutines
J title failed\sexec\sleaves\sdefunct\sprocess
J type Bug
K 219118ffffffffffffffffffffffffffffffffff
U nobody
Z bb231e764557c1925aefbb1faf61662f