On Sat, Dec 14, 2013 at 11:42:42AM +0100, Peter Palfrader wrote:
> > > > For the complete command line output, including a backtrace (the debug
> > > > symbols seem to be missing even though I've installed tor-dbg?), see the
> > > > attached log.
> > > 
> > > How did you try to produce the backtrace?
> > 
> > I'm not trying, it just happens every time :).
> 
> No, the crashes happen.  The bt doesn't just magically appear, does it?  :)
> 

Hm, right, usually not. But it's not me trying to produce the
backtrace :). I'm not invoking gdb or some fancy, custom LD_PRELOAD
stuff if that's what you mean. Maybe it's a new feature of libc or
something like that?

But now that you are mentioning it, that probably explains the
missing function names. I'm attaching an additional backtrace,
this time created via gdb.

And here's the output of an ldd:
$ ldd /usr/sbin/tor
        linux-vdso.so.1 (0x00007fff7a5fe000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9abbe7a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9abbb7c000)
        libevent-2.0.so.5 => /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5 
(0x00007f9abb934000)
        libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 
(0x00007f9abb6d5000)
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 
(0x00007f9abb2e2000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9abb0d9000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9abaed5000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9abab29000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 
(0x00007f9aba90c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9abc44c000)

(and running "sudo /usr/sbin/tor --defaults-torrc ..." yields the
same crash, so all the tor binaries invoked so far should have
been /usr/sbin/tor as it should be, so messed up PATH variables
can't be the issue either)

Cheers, Linus
$ sudo gdb --args tor --defaults-torrc 
/usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc-fg
GNU gdb (GDB) 7.6.1 (Debian 7.6.1-1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/tor...Reading symbols from 
/usr/lib/debug/usr/sbin/tor...(no debugging symbols found)...done.
(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/sbin/tor --defaults-torrc 
/usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc-fg
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Dec 14 12:18:01.184 [notice] Tor v0.2.3.25 (git-3fed5eb096d2d187) running on 
Linux.
Dec 14 12:18:01.184 [notice] Tor can't help you if you use it wrong! Learn how 
to be safe at https://www.torproject.org/download/download#warning
Dec 14 12:18:01.184 [notice] Read configuration file 
"/usr/share/tor/tor-service-defaults-torrc".
Dec 14 12:18:01.185 [notice] Read configuration file "/etc/tor/torrc-fg".
Dec 14 12:18:01.196 [notice] We were compiled with headers from version 
2.0.19-stable of Libevent, but we're using a Libevent library that says it's 
version 2.0.21-stable.
Dec 14 12:18:01.196 [notice] Initialized libevent version 2.0.21-stable using 
method epoll (with changelist). Good.
Dec 14 12:18:01.196 [notice] Opening Socks listener on 127.0.0.1:9050
Dec 14 12:18:01.402 [notice] Opening Control listener on /var/run/tor/control
*** Error in `/usr/sbin/tor': free(): invalid pointer: 0x00007ffff577d32b ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7aa16)[0x7ffff68eea16]
/lib/x86_64-linux-gnu/libc.so.6(+0x7b793)[0x7ffff68ef793]
/usr/sbin/tor(+0x178d2)[0x55555556b8d2]
/usr/sbin/tor(+0x5ff7c)[0x5555555b3f7c]
/usr/sbin/tor(+0x188c5)[0x55555556c8c5]
/usr/sbin/tor(+0x18b11)[0x55555556cb11]
/usr/sbin/tor(+0x18c8f)[0x55555556cc8f]
/usr/sbin/tor(+0x19082)[0x55555556d082]
/usr/sbin/tor(+0x1e9ae)[0x5555555729ae]
/usr/sbin/tor(+0x15809)[0x555555569809]
/usr/sbin/tor(+0x1706e)[0x55555556b06e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7ffff6895995]
/usr/sbin/tor(+0x119fd)[0x5555555659fd]
======= Memory map: ========
555555554000-5555556cb000 r-xp 00000000 fe:18 302841                     
/usr/sbin/tor
5555558ca000-5555558cd000 r--p 00176000 fe:18 302841                     
/usr/sbin/tor
5555558cd000-5555558d3000 rw-p 00179000 fe:18 302841                     
/usr/sbin/tor
5555558d3000-5555560aa000 rw-p 00000000 00:00 0                          [heap]
7ffff545a000-7ffff546f000 r-xp 00000000 fe:18 647880                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff546f000-7ffff566f000 ---p 00015000 fe:18 647880                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff566f000-7ffff5670000 rw-p 00015000 fe:18 647880                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff5670000-7ffff5b1e000 r--p 00000000 fe:16 921098                     
/var/lib/tor/cached-microdescs
7ffff5b1e000-7ffff5d1f000 rw-p 00000000 00:00 0
7ffff5e20000-7ffff5e2c000 r-xp 00000000 fe:18 647974                     
/lib/x86_64-linux-gnu/libnss_files-2.17.so
7ffff5e2c000-7ffff602b000 ---p 0000c000 fe:18 647974                     
/lib/x86_64-linux-gnu/libnss_files-2.17.so
7ffff602b000-7ffff602c000 r--p 0000b000 fe:18 647974                     
/lib/x86_64-linux-gnu/libnss_files-2.17.so
7ffff602c000-7ffff602d000 rw-p 0000c000 fe:18 647974                     
/lib/x86_64-linux-gnu/libnss_files-2.17.so
7ffff602d000-7ffff6037000 r-xp 00000000 fe:18 647976                     
/lib/x86_64-linux-gnu/libnss_nis-2.17.so
7ffff6037000-7ffff6236000 ---p 0000a000 fe:18 647976                     
/lib/x86_64-linux-gnu/libnss_nis-2.17.so
7ffff6236000-7ffff6237000 r--p 00009000 fe:18 647976                     
/lib/x86_64-linux-gnu/libnss_nis-2.17.so
7ffff6237000-7ffff6238000 rw-p 0000a000 fe:18 647976                     
/lib/x86_64-linux-gnu/libnss_nis-2.17.so
7ffff6238000-7ffff624d000 r-xp 00000000 fe:18 647970                     
/lib/x86_64-linux-gnu/libnsl-2.17.so
7ffff624d000-7ffff644c000 ---p 00015000 fe:18 647970                     
/lib/x86_64-linux-gnu/libnsl-2.17.so
7ffff644c000-7ffff644d000 r--p 00014000 fe:18 647970                     
/lib/x86_64-linux-gnu/libnsl-2.17.so
7ffff644d000-7ffff644e000 rw-p 00015000 fe:18 647970                     
/lib/x86_64-linux-gnu/libnsl-2.17.so
7ffff644e000-7ffff6450000 rw-p 00000000 00:00 0
7ffff6450000-7ffff6457000 r-xp 00000000 fe:18 647971                     
/lib/x86_64-linux-gnu/libnss_compat-2.17.so
7ffff6457000-7ffff6656000 ---p 00007000 fe:18 647971                     
/lib/x86_64-linux-gnu/libnss_compat-2.17.so
7ffff6656000-7ffff6657000 r--p 00006000 fe:18 647971                     
/lib/x86_64-linux-gnu/libnss_compat-2.17.so
7ffff6657000-7ffff6658000 rw-p 00007000 fe:18 647971                     
/lib/x86_64-linux-gnu/libnss_compat-2.17.so
7ffff6658000-7ffff666f000 r-xp 00000000 fe:18 647726                     
/lib/x86_64-linux-gnu/libpthread-2.17.so
7ffff666f000-7ffff686e000 ---p 00017000 fe:18 647726                     
/lib/x86_64-linux-gnu/libpthread-2.17.so
7ffff686e000-7ffff686f000 r--p 00016000 fe:18 647726                     
/lib/x86_64-linux-gnu/libpthread-2.17.so
7ffff686f000-7ffff6870000 rw-p 00017000 fe:18 647726                     
/lib/x86_64-linux-gnu/libpthread-2.17.so
7ffff6870000-7ffff6874000 rw-p 00000000 00:00 0
7ffff6874000-7ffff6a17000 r-xp 00000000 fe:18 647963                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff6a17000-7ffff6c16000 ---p 001a3000 fe:18 647963                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff6c16000-7ffff6c1a000 r--p 001a2000 fe:18 647963                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff6c1a000-7ffff6c1c000 rw-p 001a6000 fe:18 647963                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff6c1c000-7ffff6c20000 rw-p 00000000 00:00 0
7ffff6c20000-7ffff6c23000 r-xp 00000000 fe:18 647966                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff6c23000-7ffff6e22000 ---p 00003000 fe:18 647966                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff6e22000-7ffff6e23000 r--p 00002000 fe:18 647966                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff6e23000-7ffff6e24000 rw-p 00003000 fe:18 647966                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff6e24000-7ffff6e2b000 r-xp 00000000 fe:18 647982                     
/lib/x86_64-linux-gnu/librt-2.17.so
7ffff6e2b000-7ffff702a000 ---p 00007000 fe:18 647982                     
/lib/x86_64-linux-gnu/librt-2.17.so
7ffff702a000-7ffff702b000 r--p 00006000 fe:18 647982                     
/lib/x86_64-linux-gnu/librt-2.17.so
7ffff702b000-7ffff702c000 rw-p 00007000 fe:18 647982                     
/lib/x86_64-linux-gnu/librt-2.17.so
7ffff702c000-7ffff71f2000 r-xp 00000000 fe:18 421532                     
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff71f2000-7ffff73f1000 ---p 001c6000 fe:18 421532                     
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff73f1000-7ffff740c000 r--p 001c5000 fe:18 421532                     
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff740c000-7ffff741b000 rw-p 001e0000 fe:18 421532                     
/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff741b000-7ffff741f000 rw-p 00000000 00:00 0
7ffff741f000-7ffff7474000 r-xp 00000000 fe:18 421555                     
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff7474000-7ffff7674000 ---p 00055000 fe:18 421555                     
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff7674000-7ffff7677000 r--p 00055000 fe:18 421555                     
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff7677000-7ffff767e000 rw-p 00058000 fe:18 421555                     
/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff767e000-7ffff76c3000 r-xp 00000000 fe:18 424365                     
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
7ffff76c3000-7ffff78c2000 ---p 00045000 fe:18 424365                     
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
7ffff78c2000-7ffff78c4000 r--p 00044000 fe:18 424365                     
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
7ffff78c4000-7ffff78c5000 rw-p 00046000 fe:18 424365                     
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5.1.9
7ffff78c5000-7ffff79c1000 r-xp 00000000 fe:18 647967                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff79c1000-7ffff7bc1000 ---p 000fc000 fe:18 647967                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff7bc1000-7ffff7bc2000 r--p 000fc000 fe:18 647967                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff7bc2000-7ffff7bc3000 rw-p 000fd000 fe:18 647967                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff7bc3000-7ffff7bda000 r-xp 00000000 fe:18 647852                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff7bda000-7ffff7dd9000 ---p 00017000 fe:18 647852                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff7dd9000-7ffff7dda000 r--p 00016000 fe:18 647852                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff7dda000-7ffff7ddb000 rw-p 00017000 fe:18 647852                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff7ddb000-7ffff7dfc000 r-xp 00000000 fe:18 647854                     
/lib/x86_64-linux-gnu/ld-2.17.so
7ffff7fbb000-7ffff7fc1000 rw-p 00000000 00:00 0
7ffff7ff7000-7ffff7ffa000 rw-p 00000000 00:00 0
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00021000 fe:18 647854                     
/lib/x86_64-linux-gnu/ld-2.17.so
7ffff7ffd000-7ffff7fff000 rw-p 00022000 fe:18 647854                     
/lib/x86_64-linux-gnu/ld-2.17.so
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff68a91d5 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff68a91d5 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff68ac388 in __GI_abort () at abort.c:90
#2  0x00007ffff68e47bb in __libc_message (do_abort=do_abort@entry=2,
    fmt=fmt@entry=0x7ffff69e1368 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
#3  0x00007ffff68eea16 in malloc_printerr (action=3, str=0x7ffff69dd30a 
"free(): invalid pointer",
    ptr=<optimized out>) at malloc.c:4923
#4  0x00007ffff68ef793 in _int_free (av=<optimized out>, p=0x7ffff577d31b, 
have_lock=0) at malloc.c:3779
#5  0x000055555556b8d2 in microdesc_free ()
#6  0x00005555555b3f7c in microdescs_parse_from_string ()
#7  0x000055555556c8c5 in microdescs_add_to_cache ()
#8  0x000055555556cb11 in microdesc_cache_reload ()
#9  0x000055555556cc8f in get_microdesc_cache ()
#10 0x000055555556d082 in update_microdescs_from_networkstatus ()
#11 0x00005555555729ae in router_reload_consensus_networkstatus ()
#12 0x0000555555569809 in do_main_loop ()
#13 0x000055555556b06e in tor_main ()
#14 0x00007ffff6895995 in __libc_start_main (main=0x5555555659a0 <main>, 
argc=5, ubp_av=0x7fffffffe638,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
stack_end=0x7fffffffe628)
    at libc-start.c:276
#15 0x00005555555659fd in _start ()
(gdb)

Reply via email to