transmission-daemon crashing on ARM linux

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: transmission-daemon crashing on ARM linux

Post by rb07 »

grzegorzdubicki wrote:I am trying that, thanks for the tip. I'll let know if it helped.

PS I've got libevent 1.4.13.
I just changed to 1.4.13 and it doesn't have the bug, you don't need to disable EPOLL.

That means libevent has nothing to do with the problem in this thread, just as we thought.
tiprya
Posts: 7
Joined: Thu Nov 06, 2008 11:11 pm

Re: transmission-daemon crashing on ARM linux

Post by tiprya »

How would I go about regressing version or upgrading to a development version?

Would I uninstall via ipkg and then install using these instructions:
http://mybookworld.wikidot.com/forum/t- ... pendancies
grzegorzdubicki
Posts: 10
Joined: Sun Jan 31, 2010 3:20 pm

Re: transmission-daemon crashing on ARM linux

Post by grzegorzdubicki »

rb07 wrote:
grzegorzdubicki wrote:I am trying that, thanks for the tip. I'll let know if it helped.

PS I've got libevent 1.4.13.
I just changed to 1.4.13 and it doesn't have the bug, you don't need to disable EPOLL.

That means libevent has nothing to do with the problem in this thread, just as we thought.
I have tried doing all that disabling libevent features yesterday evening and all of them failed with Transmission crashing just minutes later. So looks like you are right about it not being libevent's fault.
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: transmission-daemon crashing on ARM linux

Post by Jordan »

Is there any way to get a gdb backtrace, or a valgrind log, to see where the double-free error is taking place? I'd be happy to fix this but need more information to do so.
grzegorzdubicki
Posts: 10
Joined: Sun Jan 31, 2010 3:20 pm

Re: transmission-daemon crashing on ARM linux

Post by grzegorzdubicki »

Jordan wrote:Is there any way to get a gdb backtrace, or a valgrind log, to see where the double-free error is taking place?
Roger, I am doing that. I'll let you know about the results when I am done.
grzegorzdubicki
Posts: 10
Joined: Sun Jan 31, 2010 3:20 pm

Re: transmission-daemon crashing on ARM linux

Post by grzegorzdubicki »

Ok, I've got this.

I stared Transmission normally.

Then I attached gdb to it:

Code: Select all

# ps aux|grep trans
 8001 transmis   7648 S   transmission-daemon -g /usr/local/var/lib/transmission-daemon
 8052 root        840 S   grep trans
# gdb transmission-daemon 8001


dlopen failed on 'libthread_db.so.1' - libthread_db.so.1: cannot open shared object file: No such file or irectory
GDB will not be able to debug pthreads.

GNU gdb 6.8
Copyright (C) 2008 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 "arm-none-linux-gnueabi"...
Attaching to program: /usr/local/bin/transmission-daemon, process 8001
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libcurl.so.4...done.
Loaded symbols for /lib/libcurl.so.4
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libssl.so.0.9.8...done.
Loaded symbols for /lib/libssl.so.0.9.8
Reading symbols from /lib/libcrypto.so.0.9.8...done.
Loaded symbols for /lib/libcrypto.so.0.9.8
Reading symbols from /lib/ld-linux.so.3...done.
Loaded symbols for /lib/ld-linux.so.3
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
0x40212ff4 in nanosleep () from /lib/libc.so.6

After a few hours Transmission stopped responding (web interface did not load and tranmission-remote-dotnet could not connect to it). (I couldn't check if Transmission process was running because I haven't had PTY issue resolved then yet...)

So I tried:

Code: Select all

(gdb) backtrace
#0  0x40212ff4 in nanosleep () from /lib/libc.so.6
Cannot access memory at address 0x40212fb0
(gdb) backtrace full
#0  0x40212ff4 in nanosleep () from /lib/libc.so.6
No symbol table info available.
When I tried to quit gdb it said that ..Transmission was running?!:

Code: Select all

(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /usr/local/bin/transmission-daemon, process 8001
Quitting: ptrace: No such process.
What does that mean?

I think I have a debug (not-stripped) version of Transmission binary:

Code: Select all

# file `which transmission-daemon`
/usr/local/bin/transmission-daemon: symbolic link to `/volume1/@appstore/transmission/usr/local/bin/transmission-daemon'
# file /volume1/@appstore/transmission/usr/local/bin/transmission-daemon
/volume1/@appstore/transmission/usr/local/bin/transmission-daemon: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
I can't find any core dumps from Transmission. (Where to look? I checked at /tmp , /root, home of 'transmission' user, Transmission binary dir..)

There is no valgrind ipkg package. Maybe I'll do something with strace which I installed later. But I would really appreciate some tips what to do next.
grzegorzdubicki
Posts: 10
Joined: Sun Jan 31, 2010 3:20 pm

Re: transmission-daemon crashing on ARM linux

Post by grzegorzdubicki »

I tried strace and here's what I got:

Code: Select all

execve("/usr/local/bin/transmission-daemon", ["transmission-daemon", "-g", "/usr/local/var/lib/transmission-"...], [/* 9 vars */]) = 0
brk(0)                                  = 0xd0000
uname({sys="Linux", node="Serwer", ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001d000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l/fast-mult", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls/v5l", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls/fast-mult", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/tls/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/tls", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/v5l/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/v5l/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/v5l/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/v5l/fast-mult", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/v5l/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/v5l/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/v5l/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/v5l", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/fast-mult", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/usr/local/arm-none-linux-gnueabi/lib/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/arm-none-linux-gnueabi/lib", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(5)                                = 0
open("/lib/tls/v5l/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v5l/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/tls/v5l/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v5l/fast-mult", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/tls/v5l/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v5l/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/tls/v5l/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/v5l", 0xbeb862d8)      = -1 ENOENT (No such file or directory)
open("/lib/tls/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/tls/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/fast-mult", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/tls/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/half", 0xbeb862d8)     = -1 ENOENT (No such file or directory)
open("/lib/tls/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls", 0xbeb862d8)          = -1 ENOENT (No such file or directory)
open("/lib/v5l/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/v5l/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/v5l/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/v5l/fast-mult", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/v5l/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/v5l/half", 0xbeb862d8)     = -1 ENOENT (No such file or directory)
open("/lib/v5l/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/v5l", 0xbeb862d8)          = -1 ENOENT (No such file or directory)
open("/lib/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/fast-mult/half", 0xbeb862d8) = -1 ENOENT (No such file or directory)
open("/lib/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/fast-mult", 0xbeb862d8)    = -1 ENOENT (No such file or directory)
open("/lib/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/half", 0xbeb862d8)         = -1 ENOENT (No such file or directory)
open("/lib/libresolv.so.2", O_RDONLY)   = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\240\37\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=64232, ...}) = 0
mmap2(NULL, 104452, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x40026000
mprotect(0x40035000, 28672, PROT_NONE)  = 0
mmap2(0x4003c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xe) = 0x4003c000
mmap2(0x4003e000, 6148, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4003e000
close(5)                                = 0
open("/lib/libcurl.so.4", O_RDONLY)     = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\\x\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=268588, ...}) = 0
mmap2(NULL, 299304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x40040000
mprotect(0x40081000, 28672, PROT_NONE)  = 0
mmap2(0x40088000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x40) = 0x40088000
mmap2(0x40089000, 296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40089000
close(5)                                = 0
open("/lib/librt.so.1", O_RDONLY)       = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`\26\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=28288, ...}) = 0
mmap2(NULL, 57824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x4008a000
mprotect(0x40090000, 28672, PROT_NONE)  = 0
mmap2(0x40097000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x5) = 0x40097000
close(5)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0342\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=693352, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001e000
mmap2(NULL, 712856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x40099000
mprotect(0x4013f000, 28672, PROT_NONE)  = 0
mmap2(0x40146000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xa5) = 0x40146000
close(5)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h\"\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=49432, ...}) = 0
mmap2(NULL, 79004, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x40148000
mprotect(0x40154000, 28672, PROT_NONE)  = 0
mmap2(0x4015b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0xb) = 0x4015b000
close(5)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\340B\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=95428, ...}) = 0
mmap2(NULL, 127480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x4015c000
mprotect(0x40171000, 28672, PROT_NONE)  = 0
mmap2(0x40178000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x14) = 0x40178000
mmap2(0x4017a000, 4600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4017a000
close(5)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\340J\1\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=1249460, ...}) = 0
mmap2(NULL, 1237404, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x4017c000
mprotect(0x4029e000, 28672, PROT_NONE)  = 0
mmap2(0x402a5000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x121) = 0x402a5000
mmap2(0x402a8000, 8604, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402a8000
close(5)                                = 0
open("/lib/libssl.so.0.9.8", O_RDONLY)  = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0|\252\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=236396, ...}) = 0
mmap2(NULL, 267124, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x402ab000
mprotect(0x402e2000, 32768, PROT_NONE)  = 0
mmap2(0x402ea000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x37) = 0x402ea000
close(5)                                = 0
open("/lib/libcrypto.so.0.9.8", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0$A\3\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=1216056, ...}) = 0
mmap2(NULL, 1245860, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x402ed000
mprotect(0x40403000, 32768, PROT_NONE)  = 0
mmap2(0x4040b000, 69632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x116) = 0x4040b000
mmap2(0x4041c000, 4772, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4041c000
close(5)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0H\t\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=10344, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001f000
mmap2(NULL, 41116, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x4041e000
mprotect(0x40420000, 28672, PROT_NONE)  = 0
mmap2(0x40427000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x1) = 0x40427000
close(5)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40020000
set_tls(0x4001fda0, 0x400256f4, 0x40020478, 0x40025058, 0x40) = 0
mprotect(0x40427000, 4096, PROT_READ)   = 0
mprotect(0x402a5000, 4096, PROT_READ)   = 0
mprotect(0x40178000, 4096, PROT_READ)   = 0
mprotect(0x40146000, 4096, PROT_READ)   = 0
mprotect(0x40097000, 4096, PROT_READ)   = 0
mprotect(0x4003c000, 4096, PROT_READ)   = 0
set_tid_address(0x4001f948)             = 8340
set_robust_list(0x4001f950, 0xc)        = 0
rt_sigaction(SIGRTMIN, {0x4015fea0, [], SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x4015fd78, [], SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
rt_sigaction(SIGINT, {0xb164, [INT], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0xb164, [TERM], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0xb164, [HUP], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0
brk(0)                                  = 0xd0000
brk(0xf1000)                            = 0xf1000
stat64("/root/.config/user-dirs.dirs", 0xbeb86a38) = -1 ENOENT (No such file or directory)
stat64("/usr/local/var/lib/transmission-daemon/settings.json", {st_mode=S_IFREG|0644, st_size=1795, ...}) = 0
open("/usr/local/var/lib/transmission-daemon/settings.json", O_RDONLY|O_LARGEFILE) = 5
fadvise64_64(5, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
read(5, "{\n    \"alt-speed-down\": 9999, \n "..., 1795) = 1795
fadvise64_64(5, 0, 0, POSIX_FADV_DONTNEED) = 0
close(5)                                = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x4001f948) = 8341
exit_group(0)                           = ? 
Is that helpful?
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: transmission-daemon crashing on ARM linux

Post by Jordan »

You see the question is, what is Transmission doing right before the crash occurs. That's what gdb typically is good for. Ideally we would be able to run the daemon until you hit that "double free" error message and then get a backtrace.

spaceman_spiff: that crash message says that the core was dumped; did a corefile get generated that you can attach to gdb for a postmortem (via "% gdb transmisssion-daemon corefile")? If not, does the Synology DS210j support the ulimit command to tell the environment that it's okay to generate corefiles?
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: transmission-daemon crashing on ARM linux

Post by Jordan »

spaceman_spiff wrote:Okay.. This doesn't look too helpful but here we go:

*** glibc detected *** /opt/bin/transmission-daemon: free(): invalid next size (fast): 0x001f4198 ***

Program received signal SIGABRT, Aborted.
0x4032b4cc in raise () from /lib/libc.so.6

#0 0x4032b4cc in raise () from /lib/libc.so.6
#1 0x4032cc9c in abort () from /lib/libc.so.6
Backtrace stopped: frame did not save the PC


---
I'll try again and see what happens..
http://gcc.gnu.org/ml/gcc/2008-08/msg00062.html has an interesting (though not, apparently, useful) thread on why this happens on ARM linux.

spaceman_spiff: it's possible that you've got a stripped aka optimized version of Transmission that's causing your backtrace to be less than useful. Is it possible to get an unstripped version (sometimes referred to as "with debugging symbols" or "unoptimized" or "unstripped" or "debug version") or to build one yourself? At least two things would seem to be important on ARM: (1) making sure the debugging symbols are compiled in with -g or --ggdb at compile time (2) not using the -fomit-frame-pointer when compiling.
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: transmission-daemon crashing on ARM linux

Post by Jordan »

grzegorzdubicki wrote:I tried strace and here's what I got:

Code: Select all

stat64("/root/.config/user-dirs.dirs", 0xbeb86a38) = -1 ENOENT (No such file or directory)
stat64("/usr/local/var/lib/transmission-daemon/settings.json", {st_mode=S_IFREG|0644, st_size=1795, ...}) = 0
open("/usr/local/var/lib/transmission-daemon/settings.json", O_RDONLY|O_LARGEFILE) = 5
fadvise64_64(5, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
read(5, "{\n    \"alt-speed-down\": 9999, \n "..., 1795) = 1795
fadvise64_64(5, 0, 0, POSIX_FADV_DONTNEED) = 0
close(5)                                = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x4001f948) = 8341
exit_group(0)                           = ? 
Is that helpful?
Hm, it's a start. About all it says is that Transmission crashed after loading settings.json, but before touching any other files. But that could be a wide interval... if we can't figure out how to get gdb to play nice with these devices, we may have to resort to custom builds that put in tracer statements to find where the crash is occurring. But that will be an iterative, suboptimal process, so it's definitely "Plan B" ;)
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: transmission-daemon crashing on ARM linux

Post by Jordan »

One thing that might help without any changes to the code or to gdb -- try running the daemon this way in bash: "TR_DEBUG_FD=2 ./transmission-daemon -f ... 2>runlog" and make sure you have plenty of disk space. This will dump reams of debugging information into the "runlog" file. Most of that information will be irrelevant in this context, but by pasting the last few pages (or mailing it to me, if you prefer) it might give us an easy way of seeing more-or-less where the crash is happening. It's a long shot, but it's also quick and easy to try.
grzegorzdubicki
Posts: 10
Joined: Sun Jan 31, 2010 3:20 pm

Re: transmission-daemon crashing on ARM linux

Post by grzegorzdubicki »

Jordan wrote:One thing that might help without any changes to the code or to gdb -- try running the daemon this way in bash: "TR_DEBUG_FD=2 ./transmission-daemon -f ... 2>runlog" and make sure you have plenty of disk space. This will dump reams of debugging information into the "runlog" file. Most of that information will be irrelevant in this context, but by pasting the last few pages (or mailing it to me, if you prefer) it might give us an easy way of seeing more-or-less where the crash is happening. It's a long shot, but it's also quick and easy to try.
Thanks, I've tried that. Check the (not too helpful I'm afraid) results in my response at your Trac.
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: transmission-daemon crashing on ARM linux

Post by Jordan »

This bug seems to be affecting a lot of people who are all motiviated to help find and fix the cause. Is there nobody who's able to successfully run gdb on one of these platforms and get a meaningful backtrace? Right now we're shooting blindly in the dark...
ZeusII
Posts: 12
Joined: Wed Jan 30, 2008 3:28 pm

Re: transmission-daemon crashing on ARM linux

Post by ZeusII »

I'm having the same problem on my Synology. Mine it's PowerPC powered. Happens since 1.80.

can you give detailed instructions on how to generate this backtrace?
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: transmission-daemon crashing on ARM linux

Post by rb07 »

ZeusII wrote:can you give detailed instructions on how to generate this backtrace?
If you don't know what a backtrace is you probably won't be able to generate one.

To get a "meaningful backtrace" the first thing you need is to build transmission with debug enabled. The same goes for all the libraries used by transmission if you want all the detail; but this is not absolutely necessary (perhaps transmission can work around somebody's else bug). It doesn't necessarily means you need to rebuild everything, gdb (the debugger) can use separate debug information which can be generated using tools in binutils and the original compiled code (before stripping).

If you install transmission from a package, one option would be to ask the package provider either to provide a debug version, or to provide the corresponding debug files.

After that, you just run the program until it crashes and analyze the core file using gdb: backtrace is a command in gdb which, in this case, shows you where it crashed exactly and why, with a detailed function call history, data values, and such.
Post Reply