.
D 2007-05-28T12:34:06
J assignee nobody
J cmimetype text/plain
J comment We\shave\sa\smultithreaded\sTcl\sapplication\srunning\sunder\sWindows.\s\sOne\sthread\sis\sa\sTCP\sserver\sthat\sdispatches\scalls\sto\sa\spool\sof\sprocessing\sthreads\svia\sthread::send\s-async(and\sthey\sreply\svia\sthread::send)\n\nWe\shave\sexperienced\san\sintermittent\scrash\sbug\sthat\soccurs\sin\sForgetSyncObject\sin\sgeneric/tclThread.c,\scausing\san\saccess\sviolation\sexception.\s\sWe\sa\sproblem\swith\sthe\ssame\ssymptoms\son\svarious\soccasions,\sand\smanaged\sto\sget\sa\sdebugger\sinvolved\stwice\s(on\sdifferent\ssystems,\sone\sunder\s2000\sPro\sand\sthe\sother\s2003\sServer)\sto\sconfirm\sthat\sis\swas\sthe\ssame\sbug.\n\nBy\s"intermittent"\swe\smean\sthat\swe\scan\sprocess\sup\sto\s100\smillion\stransactions\s(that's\sat\sleast\s200m\sthread::send\scalls)\sbefore\sseeing\sthe\sproblem\s;(\s\sOn\sthe\sup\sside\swe're\snot\sseeing\sany\sresource\sleaks\s;)\n\nstatic\svoid\nForgetSyncObject(\n\s\s\s\schar\s*objPtr,\s/*\sPointer\sto\ssync\sobject\s*/\n\s\s\s\sSyncObjRecord\s*recPtr)\s/*\sRecord\sof\ssync\sobjects\s*/\n{\n\s\s\s\sint\si;\n\n\s\s\s\sfor\s(i=0\s;\si<recPtr->num\s;\si++)\s{\nif\s(objPtr\s==\srecPtr->list[i])\s{\n\s\s\s\srecPtr->list[i]\s=\sNULL;\n\s\s\s\sreturn;\n}\n\s\s\s\s}\n}\n\nWith\sthe\sdebugger\swe\ssee\si\sgo\smassively\sout\sof\srange.\s\sIn\son\scase\sby\sabout\s17,000;\sin\sanother\sby\saround\s100,000.\n\nLooking\sat\scode\sthat\smodifies\srecPtr->num\stells\sme\sthat\sthere\sshould\sbe\sno\scondition\sunder\swhich\sthis\scan\spossibly\shappen\s(unless\s32-bit\soperations\sare\snot\satomic\son\sx86,\sand\slast\stime\sI\schecked\sthey\swere).\n\nThat\sonly\sguess\swe\shave\sat\sthe\smoment\sis\sthat\sparts\sof\sthe\sstack\s(including\si)\sare\sgetting\strashed\sby\sactivity\ssomewhere\sin\sanother\sthread.\s\sWe\shave\sonly\sobserved\sthis\sbug\sin\sa\smultithreaded\sscenario.\s\sBut\sif\swe\sset\sthe\svalue\sof\si\sto\s(recPtr->num\s-\s1)\sthrough\sthe\sdebugger\sand\slet\sthe\sprogram\srun,\severything\sis\sstill\sfine\s(so\sthe\sreturn\svalue\son\sthe\sstack\sisn't\sdamaged).\n\nEvery\stime\swe've\sseen\sthis\sthere\shas\sbeen\sa\scall\sto\sForgetSyncObj\sfrom\sTcl_ConditionFinalize,\swhich\swas\scalled\sfrom\sThreadSend\s(in\sthreadCmd.c\sin\sthe\sThread\sextension).\n\nTo\smake\smatters\sworse\swe\sdon't\sknow\show\sto\sreproduce\sthe\sproblem,\sbut\swe\shave\sseen\sit\sunder\sboth\sdebug/unchecked\sand\srelease\sbuilds\sof\s8.5a6\s(built\sunder\sMSVC6).\n\nWe\sneed\sto\stry\sand\strack\sdown\sthis\sbug,\sand\shave\sresources\sto\scommit\sto\sdoing\sso,\sbut\sright\snow\swe're\sat\sa\sloss\son\show\sto\sproceed.\s\sAny\ssuggestions\son\spossible\scause\sand/or\show\swe\smay\sbe\sable\sto\sforce\sa\sreproduction\smay\shelp.\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter twylite
J subsystem 49.\sThreading
J title Intermittent\scrash\sin\sthreaded\sTcl
J type Bug
K 1726873fffffffffffffffffffffffffffffffff
U twylite
Z f71994de9e160b09e4a8c316bb5bdb4c