tot dumps core

Dag-Erling Smørgrav des at linpro.no
Wed Jul 12 18:37:28 CEST 2006


I wanted to test the virtual host support, but the current top-of-tree
just crashes when the first request comes in:

> des at dma ~varnish/varnish-cache% cat varnish.sh
> #!/bin/sh
> 
> base=$(dirname $(realpath $0))
> 
> exec $base/bin/varnishd/varnishd \
>         -b localhost:80 \
>         -p 8080 \
>         -s file,${base}/storage \
>         -w 1
> des at dma ~varnish/varnish-cache% ./varnish.sh
> file /home/des/projects/varnish/trunk/varnish-cache/storage size 8388608 bytes (16384 fs-blocks, 2048 pages)
> start child pid 67665
> Child said <Child starts>
> Child said <Loaded "/tmp/vcl.Wjvq6wyc" as "boot">
> Child said <managed to mmap 8388608 bytes of 8388608>
> Child said <Ready>
> sig_chld(20, 8, 0)
> pid = 67665 status = 0x8b
> Child died :-(
> des at dma ~varnish/varnish-cache% ./gvarnish.sh
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-marcel-freebsd"...
> Core was generated by `lt-varnishd'.
> Program terminated with signal 11, Segmentation fault.
> Error while mapping shared library sections:
> /tmp/vcl.Wjvq6wyc: No such file or directory.
> Reading symbols from /home/des/projects/varnish/trunk/varnish-cache/lib/libvarnish/.libs/libvarnish.so.0...done.
> Loaded symbols for /home/des/projects/varnish/trunk/varnish-cache/lib/libvarnish/.libs/libvarnish.so.0
> Reading symbols from /home/des/projects/varnish/trunk/varnish-cache/lib/libvcl/.libs/libvcl.so.0...done.
> Loaded symbols for /home/des/projects/varnish/trunk/varnish-cache/lib/libvcl/.libs/libvcl.so.0
> Reading symbols from /home/des/projects/varnish/trunk/varnish-cache/contrib/libevent/.libs/libevent-1.2.so.1...done.
> Loaded symbols for /home/des/projects/varnish/trunk/varnish-cache/contrib/libevent/.libs/libevent-1.2.so.1
> Reading symbols from /lib/libpthread.so.2...done.
> Loaded symbols for /lib/libpthread.so.2
> Reading symbols from /lib/libmd.so.3...done.
> Loaded symbols for /lib/libmd.so.3
> Reading symbols from /lib/libc.so.7...done.
> Loaded symbols for /lib/libc.so.7
> Error while reading shared library symbols:
> /tmp/vcl.Wjvq6wyc: No such file or directory.
> Reading symbols from /libexec/ld-elf.so.1...done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0  0x0000000800989e9c in kse_thr_interrupt () at kse_thr_interrupt.S:2
> 2       RSYSCALL(kse_thr_interrupt)
> [New Thread 0x801051c00 (sleeping)]
> [New Thread 0x801051800 (sleeping)]
> [New Thread 0x801051400 (runnable)]
> [New Thread 0x801051000 (runnable)]
> [New Thread 0x801050c00 (runnable)]
> [New Thread 0x801050800 (LWP 100088)]
> [New Thread 0x801050400 (runnable)]
> [New LWP 100092]
> Current language:  auto; currently asm
> (gdb) i thr
> * 8 LWP 100092  0x0000000800989e9c in kse_thr_interrupt ()
>     at kse_thr_interrupt.S:2
>   7 Thread 0x801050400 (runnable)  0x0000000800c8628c in __syscall ()
>     at __syscall.S:2
>   6 Thread 0x801050800 (LWP 100088)  0x0000000800989e5c in kse_release ()
>     at kse_release.S:2
>   5 Thread 0x801050c00 (runnable)  0x0000000800c6b86c in kevent ()
>     at kevent.S:2
>   4 Thread 0x801051000 (runnable)  hcl_lookup (key1=0x801132385 "/",
>     key2=0x801132397 "www.des.no", nobj=0x800be6c70) at hash_classic.c:151
>   3 Thread 0x801051400 (runnable)  0x0000000800c6b86c in kevent ()
>     at kevent.S:2
>   2 Thread 0x801051800 (sleeping)  _thr_sched_switch_unlocked (
>     curthread=0x801051800) at pthread_md.h:226
>   1 Thread 0x801051c00 (sleeping)  _thr_sched_switch_unlocked (
>     curthread=0x801051c00) at pthread_md.h:226
> (gdb) thr 4
> [Switching to thread 4 (Thread 0x801051000 (runnable))]#0  hcl_lookup (
>     key1=0x801132385 "/", key2=0x801132397 "www.des.no", nobj=0x800be6c70)
>     at hash_classic.c:151
> 151             nobj->hashpriv = he2;
> Current language:  auto; currently c
> (gdb) where
> #0  hcl_lookup (key1=0x801132385 "/", key2=0x801132397 "www.des.no",
>     nobj=0x800be6c70) at hash_classic.c:151
> #1  0x0000000000407972 in HSH_Lookup (w=0x7fffff7fcf30, h=0x801132178)
>     at cache_hash.c:71
> #2  0x000000000040614d in cnt_lookup (w=0x80106426b, sp=0x801132000)
>     at cache_center.c:294
> #3  0x0000000000406607 in CNT_Session (w=0x7fffff7fcf30, sp=0x801132000)
>     at steps.h:7
> #4  0x000000000040980c in wrk_thread (priv=0x7fffffffe6f4) at cache_pool.c:66
> #5  0x000000080097a6d9 in thread_start (curthread=0x80106426b,
>     start_routine=0x8011323a2, arg=0x80106426b)
>     at /usr/src/lib/libpthread/thread/thr_create.c:344
> #6  0x0000000800be6c94 in makectx_wrapper (ucp=0x800548870, func=0xb031c7f9,
>     args=0x801064260) at /usr/src/lib/libc/amd64/gen/makecontext.c:100
> #7  0x0000000000000000 in ?? ()
> #8  0x0000000801051000 in ?? ()
> #9  0x00000000004096b0 in child_main ()
> #10 0x00007fffffffe6f4 in ?? ()
> #11 0x0000000000000000 in ?? ()
> #12 0x0000000000000000 in ?? ()
> #13 0x0000000000000000 in ?? ()
> Cannot access memory at address 0x7fffff7fd000
> (gdb) up 0
> #0  hcl_lookup (key1=0x801132385 "/", key2=0x801132397 "www.des.no",
>     nobj=0x800be6c70) at hash_classic.c:151
> 151             nobj->hashpriv = he2;
> (gdb) l
> 146             he2->mtx = u2;
> 147             he2->key1 = strdup(key1);
> 148             assert(he2->key1 != NULL);
> 149             he2->key2 = strdup(key2);
> 150             assert(he2->key2 != NULL);
> 151             nobj->hashpriv = he2;
> 152             if (he != NULL)
> 153                     TAILQ_INSERT_BEFORE(he, he2, list);
> 154             else
> 155                     TAILQ_INSERT_TAIL(&hcl_head[u1], he2, list);
> (gdb) p nobj
> $1 = (struct objhead *) 0x800be6c70
> (gdb) p *nobj
> $2 = {hashpriv = 0x48f28949fb894853, mtx = 0x8b48184a8b48d089, objects = {
>     tqh_first = 0x8b4c08708b481052, tqh_last = 0x8b4820408b4c2848}}

The request I sent was:

> HEAD / HTTP/1.1
> Host: www.des.no
> Connection: close
> 

Here's the complete log from start to crash:

> 01  25    0 Debug        [Starting 1 worker threads]
> 20  16    0 WorkThread   <1 born permanent>
> 04  15   21 SessionOpen  <10.0.0.12 65110>
> 1a   9   21 XID          <176853298>
> 01  10   21 Debug        [State RECV]
> 0e   4   21 Request      <HEAD>
> 12   1   21 URL          </>
> 13   8   21 Protocol     <HTTP/1.1>
> 14  16   21 Header       <Host: www.des.no>
> 14  17   21 Header       <Connection: close>
> 17   4   21 VCL_call     <recv>
> 18   5   21 VCL_trace    <1 1.1>
> 18   5   21 VCL_trace    <2 1.1>
> 18   5   21 VCL_trace    <3 1.1>
> 18   5   21 VCL_trace    <5 1.1>
> 18   5   21 VCL_trace    <6 1.1>
> 18   5   21 VCL_trace    <8 1.1>
> 18   5   21 VCL_trace    <9 1.1>
> 18   6   21 VCL_trace    <10 1.1>
> 18   6   21 VCL_trace    <12 1.1>
> 19   6   21 VCL_return   <lookup>
> 01  12   21 Debug        [State LOOKUP]

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no



More information about the varnish-dev mailing list