<i>Tcl_AsyncMark does not work with --enable-threads</i> status still Open with 4 other changes
by
.
D 2010-03-02T10:20:51
J icomment Sorry\sfor\slong\sabsence.\n1)\sAs\sI\smentioned\sbefore,\srecursive\smutex\sdoes\snot\sprotect\s"protected\sdata"\sfrom\scorruption\sin\ssignal\shandler.\n2)\sI\smade\sTcl\stestcase\smuch\smore\sreliable,\sit\shangs\sjust\sin\sseconds.\sNeed\sto\schange\stimeout\sin\sC\scode\sto\s100\sus\sand\sin\sTcl\sto\s1\sms\sand\sdecrease\sprinting.\sAttaching\srun3.tcl\sto\suse\swith\stclsh.\n3)\sAfter\smaking\smutexes\srecursive\sand\susing\smodified\stestcase,\sit\shangs\sin\sthe\ssame\splace.\sI\scollected\sa\snumber\sof\sdifferent\sstacks.\sLast\sone:\n\s\s\sTcl_WaitForEvent(timePtr\s=\s0x22328)\n\s\s\sTcl_MutexUnlock(mutexPtr\s=\s0xff38294c)\n\s\s\s__mutex_unlock(0x2b468,\s0x1000,\s0xfef6cbc0,\s0xff072000,\s0x2b470,\s0x6)\n\s\s\s---\sSignal\sSIGALRM\sraised\s---\n\s\s\s__sighndlr(0xe,\s0x0,\s0xffbfe4f0,\s0xfee20678,\s0x0,\s0x1)\n\s\s\sGotAlarm(signo\s=\s14)\n\s\s\sTcl_AsyncMark(async\s=\s0x51738)\n\s\s\sTcl_ThreadAlert(threadId\s=\s0x1)\n\s\s\sTcl_AlertNotifier(clientData\s=\s0x2bbe8)\n\s\s\sTcl_MutexLock(mutexPtr\s=\s0xff38294c)\n\s\s\smutex_lock_queue(0x0,\s0x0,\s0x2b468,\s0x0,\s0x0,\s0x1)\n\s\s\s__lwp_park(0x0,\s0x0,\s0x0,\s0x0,\s0xfee50000,\s0x1)\n4)\sYou\ssearch\sweb\sfor\s"pthread_mutex_lock\sasync\ssignal\ssafety"\sand\syou\swill\n\s\s\sfind\sthat\syou\scannot\suse\smutexes\sin\ssignal\shandler\sat\sall!\sHere's\san\sexample\n\s\s\sof\sfinding:\nASYNC-SIGNAL\sSAFETY\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sThe\smutex\sfunctions\sare\snot\sasync-signal\ssafe.\sWhat\sthis\smeans\sis\s\sthat\n\s\s\s\s\s\s\s\sthey\sshould\snot\sbe\scalled\sfrom\sa\ssignal\shandler.\sIn\sparticular,\scalling\n\s\s\s\s\s\s\s\spthread_mutex_lock\sor\spthread_mutex_unlock\sfrom\sa\ssignal\shandler\smay\n\s\s\s\s\s\s\s\sdeadlock\sthe\scalling\sthread.\nThis\sall\smeans\sthat\sdirection\sof\sthe\sresearch\sis\swrong.\sTcl_AsyncMark\smust\sbe\smutex\sfree\sor\smust\snot\sbe\sused\sin\ssignal\shandler.\n\n
J login eugene_cdn
J mimetype text/plain
J username eugene_cdn
K 2869384fffffffffffffffffffffffffffffffff
U eugene_cdn
Z c457f6f36d834a8ff80e9e89c0714dbb