Skip to content
Tcl Source Code Artifact [afa3baad7e]
Login

Artifact [afa3baad7e]

Artifact afa3baad7ef43028bc1cd30e1b020668b64ec3b5:

Ticket change [afa3baad7e] - Ticket [3613497fffffffff|3613497fff] <i>tclThreadAlloc crashes under heavy load</i> status still Open with 6 other changes by msofer on 2014-11-13 15:28:12.
D 2014-11-13T15:28:12.188
J assignee msofer
J closer nobody
J comment Wolfgang\sWinkler\s<[email protected]>\sexperienced\scrashes\sfrom\sNaviServer\sunder\sheavy\sload.\sIn\stheir\ssetup\sthey\sstart\snaviserver\swith\s60\sconnection\sthreads\s(plus\sa\sview\sbackground\sthreads),\swhere\severy\sthread\scontains\sa\stcl\sinterp.\sThe\sbacktrace\sbelow\sshows\sthat\sat\sthe\stime\sof\sthe\scrash,\stwo\sthreads\sare\swithin\sGetBlocks()\sand\sone\sthread\sis\swithin\sMoveObjs()\sin\stclThreadAlloc.c,\swhile\sthe\sthread\saccessing\spreviously\smalloced\smemory\scrashes\s(he\sis\susing\stcl\s8.5.12).\s\r\n\r\nThe\sproblem\scould\sbe\sprevented\sby\sreplacing\sTcl's\s"zippy"\smalloc\sby\sa\ssystem\smalloc\s(see\sattached\spatch,\scompile\swith\s-DSYSTEM_MALLOC).\sWe\shave\sin\sour\senvironment\sexperiences\sin\sthe\spast\sseveral\scrashes\sin\sthreadAlloc\sas\swell,\sbut\sin\sthe\spast\si\swas\snot\sable\sreproduce\sthe\scrash\sreliably,\snor\s\sto\sattribute\sthe\sproblem\scleary\sto\sthreadAlloc.\sWe\sswitched\son\sour\sproduction\ssystem\sin\sSeptember\sto\sSYSTEM_MALLOC\s+\sTCMalloc,\sand\shave\snot\sexperienced\scrashes\sanymore\s(but\swe\sswitched\sat\sthe\ssame\stime\sas\swell\sthe\sarchitecture,\sfrom\sPOWER\sto\sx86_64,\sso\si\scould\snot\sexclude\sa\ssubtle\sconcurrency\sproblem\sin\sgcc\son\sPOWER).\sWolfgang\shas\sa\ssetup\swhere\she\scan\sreproduce\sthe\scrash,\swith\sSYSTEM_MALLOC,\shis\ssystem\sis\srunning\sstable.\r\n\r\nAlthough\sthe\spatch\s(against\s8.5.14)\sis\sno\sgeneral\sfix,\si\swould\srecommend\sto\sadd\sthe\sSYSTEM_MALLOC\spart\sto\sthe\sTcl\ssources,\ssince\sthis\sallows\sto\stry\sout\sdifferent\sallocators\smore\seasily\sand\sto\suse\stools\slike\svalgrind\sfor\smemory\sdebugging.\r\n\r\n\r\n(gdb)\sbt\r\n#0\s\s0x00007f3c6fd371b5\sin\s*__GI_raise\s(sig=<value\soptimized\sout>)\sat\s../nptl/sysdeps/unix/sysv/linux/raise.c:64\r\n#1\s\s0x00007f3c6fd39fc0\sin\s*__GI_abort\s()\sat\sabort.c:92\r\n#2\s\s0x00007f3c70f0592a\sin\sPanic\s()\sfrom\s/usr/local/naviserver/lib/libnsd.so\r\n#3\s\s0x00007f3c705ea143\sin\sTcl_PanicVA\s(format=0x7f3c70f3ce6d\s"received\sfatal\ssignal\s%d",\sargList=0x7f3c68daf660)\sat\s/root/sourcen/tcl8.5.12/unix/../generic/tclPanic.c:91\r\n#4\s\s0x00007f3c705ea2f7\sin\sTcl_Panic\s(format=0x7f3c70f3ce6d\s"received\sfatal\ssignal\s%d")\sat\s/root/sourcen/tcl8.5.12/unix/../generic/tclPanic.c:130\r\n#5\s\s<signal\shandler\scalled>\r\n#6\s\s0x00007f3c6fd84788\sin\s*__GI___strcasecmp\s(s1=0x7f3c70f385e7\s"connsperthread",\ss2=0x2020090a7b207d5d\s<Address\s0x2020090a7b207d5d\sout\sof\sbounds>)\sat\sstrcasecmp.c:65\r\n#7\s\s0x00007f3c70f11156\sin\sNs_SetFindCmp\s()\sfrom\s/usr/local/naviserver/lib/libnsd.so\r\n#8\s\s0x00007f3c70ef39df\sin\sConfigGet\s()\sfrom\s/usr/local/naviserver/lib/libnsd.so\r\n#9\s\s0x00007f3c70ef410d\sin\sNs_ConfigIntRange\s()\sfrom\s/usr/local/naviserver/lib/libnsd.so\r\n#10\s0x00007f3c70f0a18f\sin\sNsConnThread\s()\sfrom\s/usr/local/naviserver/lib/libnsd.so\r\n#11\s0x00007f3c7087067e\sin\sNsThreadMain\s()\sfrom\s/usr/local/naviserver/lib/libnsthread.so\r\n#12\s0x00007f3c70871029\sin\sThreadMain\s()\sfrom\s/usr/local/naviserver/lib/libnsthread.so\r\n#13\s0x00007f3c6f8eb8ca\sin\sstart_thread\s(arg=<value\soptimized\sout>)\sat\spthread_create.c:300\r\n#14\s0x00007f3c6fdd492d\sin\sclone\s()\sat\s../sysdeps/unix/sysv/linux/x86_64/clone.S:112\r\n#15\s0x0000000000000000\sin\s??\s()\r\n(gdb)\sinfo\sthreads\r\n\s\s12\sThread\s32642\s\spthread_cond_wait@@GLIBC_2.3.2\s()\sat\s../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162\r\n\s\s11\sThread\s32641\s\spthread_cond_wait@@GLIBC_2.3.2\s()\sat\s../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162\r\n\s\s10\sThread\s32647\s\spthread_cond_wait@@GLIBC_2.3.2\s()\sat\s../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162\r\n\s\s9\sThread\s32639\s\sclone\s()\sat\s../sysdeps/unix/sysv/linux/x86_64/clone.S:84\r\n\s\s8\sThread\s32654\s\s__lll_lock_wait\s()\sat\s../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136\r\n\s\s7\sThread\s32657\s\sGetBlocks\s(cachePtr=0x4a76610,\sbucket=2)\sat\s/root/sourcen/tcl8.5.12/unix/../generic/tclThreadAlloc.c:919\r\n\s\s6\sThread\s32658\s\s__lll_lock_wait\s()\sat\s../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136\r\n\s\s5\sThread\s32640\s\s0x00007f3c6fdce1a3\sin\sselect\s()\sat\s../sysdeps/unix/syscall-template.S:82\r\n\s\s4\sThread\s32656\s\s__lll_lock_wait\s()\sat\s../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136\r\n\s\s3\sThread\s32655\s\sGetBlocks\s(cachePtr=0x4602510,\sbucket=1)\sat\s/root/sourcen/tcl8.5.12/unix/../generic/tclThreadAlloc.c:919\r\n\s\s2\sThread\s32653\s\s0x00007f3c7060ccc4\sin\sMoveObjs\s(fromPtr=0x7f3c7086b360,\stoPtr=0x4601f30,\snumMove=776)\sat\s/root/sourcen/tcl8.5.12/unix/../generic/tclThreadAlloc.c:706\r\n*\s1\sThread\s32652\s\s0x00007f3c6fd371b5\sin\s*__GI_raise\s(sig=<value\soptimized\sout>)\sat\s../nptl/sysdeps/unix/sysv/linux/raise.c:64
J login msofer
J mimetype text/plain
J severity Minor
K 3613497fffffffffffffffffffffffffffffffff
U msofer
Z 4b82263fd74c5f5e5dc1e19cf13f42e4