[AOLSERVER] AOLserver crashes with TLS

21 views
Skip to first unread message

Wolfgang Winkler

unread,
Oct 4, 2012, 4:42:31 AM10/4/12
to aolserv...@lists.sourceforge.net
Hi!

I've narrowed down my problem and it's definitely a problem with TLS.

I've setup a openvz server with debian 6.0 and installed:

aolserver 4.5 from CVS Head
./configure --prefix=/usr/local/aolserver_4.5.1
--with-tcl=/usr/local/lib/ --enable-threads

tls from CVS Head (1.6.3)
./configure --enable-64bit --enable-threads && make && make install

tcl 8.5.12
./configure --enable-threads --enable-64bit && make && make install

I then took base.tcl and added this section:

ns_section "ns/server/server1/tcl"
ns_param autoclose "on"
ns_param debug "false"
ns_param library "/web/tmp/tcl"


In /web/tmp/tcl I dropped only one file with one line:

package require tls

I start aolserver with:

gdb --args ./bin/nsd -ft base.tcl -u nsadmin

Sometimes it crashes right after startup, but it always crashes after a
few minutes, when I hammer the server with

siege -c 20 -b http://myserver/

The backtrace is always the same (this is from a build with debugging
symbols enabled):

#0 0x00007ffff76ec29e in TclpAlloc (reqSize=40) at
/root/sourcen/tcl8.5.12/unix/../generic/tclThreadAlloc.c:337
#1 0x00007ffff7621179 in Tcl_Alloc (size=40) at
/root/sourcen/tcl8.5.12/unix/../generic/tclCkalloc.c:1054
#2 0x00007ffff7693a89 in AllocStringEntry (tablePtr=0x7fffd84e4580,
keyPtr=0x7ffff2f17128) at
/root/sourcen/tcl8.5.12/unix/../generic/tclHash.c:852
#3 0x00007ffff76932aa in CreateHashEntry (tablePtr=0x7fffd84e4580,
key=0x7ffff2f17128 "ciphers", newPtr=0x7ffff136e8fc) at
/root/sourcen/tcl8.5.12/unix/../generic/tclHash.c:361
#4 0x00007ffff7616f69 in Tcl_CreateObjCommand (interp=0x7fffd19c8340,
cmdName=0x7ffff2f17123 "tls::ciphers", proc=0x7ffff2f14300
<CiphersObjCmd>, clientData=0x0, deleteProc=0)
at /root/sourcen/tcl8.5.12/unix/../generic/tclBasic.c:2024
#5 0x00007ffff2f12727 in Tls_Init () from
/usr/local/lib/tls1.6.3/libtls1.6.3.so
#6 0x00007ffff76b97d6 in Tcl_LoadObjCmd (dummy=0x0,
interp=0x7fffd19c8340, objc=3, objv=0x7fffee9ea960) at
/root/sourcen/tcl8.5.12/unix/../generic/tclLoad.c:436
#7 0x00007ffff761928f in TclEvalObjvInternal (interp=0x7fffd19c8340,
objc=3, objv=0x7fffee9ea960, command=0x7fffd4f114d0 "::tcl::_load
/usr/local/lib/tls1.6.3/libtls1.6.3.so Tls", length=55, flags=0)
at /root/sourcen/tcl8.5.12/unix/../generic/tclBasic.c:3706
#8 0x00007ffff761a66a in TclEvalEx (interp=0x7fffd19c8340,
script=0x7fffd4f114d0 "::tcl::_load
/usr/local/lib/tls1.6.3/libtls1.6.3.so Tls", numBytes=55, flags=262144,
line=1, clNextOuter=0x0,
outerScript=0x7fffd4f114d0 "::tcl::_load
/usr/local/lib/tls1.6.3/libtls1.6.3.so Tls") at
/root/sourcen/tcl8.5.12/unix/../generic/tclBasic.c:4405
#9 0x00007ffff7619ac8 in Tcl_EvalEx (interp=0x7fffd19c8340,
script=0x7fffd4f114d0 "::tcl::_load
/usr/local/lib/tls1.6.3/libtls1.6.3.so Tls", numBytes=55, flags=262144)
at /root/sourcen/tcl8.5.12/unix/../generic/tclBasic.c:4062


This are the lines from the backtrace:

tclThreadAlloc.c:337:
cachePtr->buckets[bucket].firstPtr = blockPtr->nextBlock;

tclCkalloc.c:1054
result = TclpAlloc(size);

tclHash.c:852
hPtr = (Tcl_HashEntry *) ckalloc(sizeof(Tcl_HashEntry) + allocsize
- sizeof(hPtr->key));

If someone wants to try it one the test server I can easily provide an
ssh login.

Wolfgang

--
digital concepts OG
Software & Design
Landstrasse 68 / 5. Stock
A - 4020 Linz

Büro: +43 732 99711772
Mobil: +43 699 19971172


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
aolserver-talk mailing list
aolserv...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk

Jeff Rogers

unread,
Oct 4, 2012, 2:06:42 PM10/4/12
to Wolfgang Winkler, aolserv...@lists.sourceforge.net
Wolfgang Winkler wrote:
> Hi!
>
> I've narrowed down my problem and it's definitely a problem with TLS.

I can get a crash with just tcl/threads/tls, so I would say that the
problem is not with aolserver.

sample code:

package require Thread
for {set x 0} {$x < 1000000} {incr x} {
thread::create {
package require tls
}
}

-J
Reply all
Reply to author
Forward
0 new messages