<i>Intermittent crash in threaded Tcl</i> status still Open with 4 other changes
by
.
D 2007-06-19T14:27:39
J icomment \n\nFile\sAdded\s-\s233646:\stcl-thread-syncobj-leak.patch\n\nLogged\sIn:\sYES\s\nuser_id=91629\nOriginator:\sYES\n\n*mutter*\sKnew\sI\swas\sforgetting\ssomething\s--\slike\ssubmitting\sback\sour\spatch\s;(\n\nI\sagree\swith\smistachkin's\sanalysis\s--\swe\smanaged\sto\screate\sa\ssmall\sapp\swith\sa\sgroup\sof\sthreads\sjust\ssending\smessages\sto\seach\sother,\sand\swere\sable\sto\sreproduce\sthis\sbug\sin\sanywhere\sfrom\s1\sto\s15\sminutes.\s\sIt\sis\sa\srace\scondition\sin\sthe\sTcl_*Finalize\sfunctions\sresulting\sfrom\sthe\slack\sof\slocking.\s\sFor\sinterest,\sthe\swindow\sfor\sthe\sbug\sto\soccur\sis\sabout\stwo\sasm\sinstructions\slong\s;/\n\nThe\ssolution\swe\sdeveloped\s(see\sattached\spatch\sfile)\sdoes\snot\suse\sthe\smasterLock,\sbut\sit\sis\sthreadsafe.\s\sWe\shave\sreworked\show\sthe\sSyncObjRecord\slists\sare\srepresented\sto\sget\saway\sfrom\sthe\sneed\sto\sfree\sdynamically\sallocated\smemory\s(this\sis\sthe\sroot\sof\sthe\sproblem\s--\seither\syou\sput\sa\slock\saround\sall\sactivity\sinvolving\sthat\smemory,\sor\syou\srework\sRememberSyncObj\sso\sthat\sit\snever\sfrees\sthe\smemory).\n\nWe\sspecifically\swanted\sto\savoid\susing\sthe\smasterLock,\sotherwise\syou\shave\sto\slock/unlock\sa\smutex\s(critical\ssection,\setc.)\sin\sorder\sto\srelease\sa\sTcl\smutex\sor\scondition.\s\sThat\sin\smy\sexperience\shas\snasty\simplications\sfor\sperformance\s(in\sparticular\syou\smay\send\sup\sgiving\sup\syour\stimeslice\sprematurely\son\ssome\splatforms).\n\nIn\sthe\scontext\sof\sthis\spatch\sthe\smini-patch\sprovided\sby\safredd\sdoesn't\smake\smuch\ssense\s--\sthere\sare\sno\sfields\sin\sSyncObjRecord\sthat\swould\sreally\sbenefit\sfrom\sguarding.\n\nFile\sAdded:\stcl-thread-syncobj-leak.patch\n
J login twylite
J mimetype text/plain
J username twylite
K 1726873fffffffffffffffffffffffffffffffff
U twylite
Z 3c3baffcebfeecc55a9d6c885b467559