Opened 11 years ago

Closed 11 years ago

#3812 closed Bug (invalid)

Solaris 10 U9 x86 Segmentation Fault

Reported by: oh_noes Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.12
Severity: Normal Keywords: Solaris
Cc:

Description

I've manually built Transmission [Daemon] 2.12 with the following steps:

http://sunfreeware.com/indexintel10.html
Install the following packages from SUNFreeware for Solaris 10 x86
>> libidn
>> libssh2
>> openssl-1.0.0c
>> zlib
>> libiconv
>> libint
>> libnet
>> libevent

$ cd transmission-2.12

$ export LIBCURL_CFLAGS="-I/usr/local/include"
$ export LIBCURL_LIBS="-L/usr/local/lib"
$ export LD_LIBRARY_PATH="/usr/local/lib"

$ ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" LIBCURL_CFLAGS="-I/usr/include/curl" LIBCURL_LIBS="-L/usr/lib -lc -lcurl -lgss -lidn -lsldap -lldap -lsocket -lnsl -lz -lssl -lcrypto" --prefix=/usr/local/transmission --enable-daemon --enable-cli --disable-nls --disable-gtk  --with-zlib="/usr/local" --with-zlib-includes="/usr/local"
$ make
$ sudo make install

Now, when I try to start transmission-daemon I get the following Segmentation Fault 5-10 seconds after starting it. Interestingly, when I first started it without any torrents - it started and run without a problem. Upon adding the first torrent it died (Segmentation Fault). Now, when I try to start it I get this:

-bash-3.00$ export LD_LIBRARY_PATH=/usr/local/ssl/lib
-bash-3.00$ /usr/local/transmission/bin/transmission-daemon --config-dir /export/home/transmission/info --log-debug --foreground
[22:54:33.213] Transmission 2.12 (11412) started (session.c:622)
[22:54:33.214] Couldn't read "/export/home/transmission/info/stats.json": No such file or directory (utils.c:506)
[22:54:33.214] Couldn't read "/export/home/transmission/info/stats.benc": No such file or directory (utils.c:506)
[22:54:33.214] Cache Maximum cache size set to 2.00 MiB (128 blocks) (cache.c:253)
[22:54:33.214] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:789)
[22:54:33.214] RPC Server Adding address to whitelist: 172.16.50.* (rpc-server.c:789)
[22:54:33.214] RPC Server Serving RPC and Web requests on port 9091 (rpc-server.c:962)
[22:54:33.214] RPC Server Whitelist enabled (rpc-server.c:966)
[22:54:33.214] Bound socket 9 to port 61233 on 0.0.0.0 (net.c:415)
[22:54:33.214] Bound socket 10 to port 61233 on :: (net.c:415)
[22:54:33.214] Port Forwarding Stopped (port-forwarding.c:184)
[22:54:33.214] setrlimit( RLIMIT_NOFILE, 1024 ) (fdlimit.c:854)
[22:54:33.214] socket limit is 512 (fdlimit.c:862)
[22:54:33.214] DHT Initializing DHT (tr-dht.c:336)
[22:54:33.214] Couldn't read "/export/home/transmission/info/dht.dat": No such file or directory (utils.c:506)
[22:54:33.214] DHT Generating new id (tr-dht.c:384)
[22:54:33.214] DHT DHT initialized (tr-dht.c:411)
[22:54:33.214] port_getn: Error 0 (trevent.c:221)
[22:54:33.214] Using settings from "/export/home/transmission/info" (daemon.c:483)
[22:54:33.214] Writing 2257 bytes to temporary file "/export/home/transmission/info/settings.json.tmp.W_a4UG" (bencode.c:1670)
[22:54:33.214] Renaming "/export/home/transmission/info/settings.json.tmp.W_a4UG" as "/export/home/transmission/info/settings.json" (bencode.c:1682)
[22:54:33.214] Saved "/export/home/transmission/info/settings.json" (bencode.c:1686)
[22:54:33.214] TORRENT1 Read resume file "/export/home/transmission/info/resume/TORRENT1.3f6baef2ed6138e0.resume" (resume.c:607)
[22:54:33.214] TORRENT1 Loaded 35 IPv4 peers from resume file (resume.c:143)
[22:54:33.214] TORRENT1 Resume file found 1 files marked for download (resume.c:211)
[22:54:33.214] Loaded 2 torrents (session.c:1814)
[22:54:33.214] port_getn: No such file or directory (trevent.c:221)
[22:54:33.214] SO_SNDBUF size is 49152 (fdlimit.c:676)
[22:54:33.214] SO_RCVBUF size is 49152 (fdlimit.c:678)
[22:54:33.214] port_getn: No such file or directory (trevent.c:221)
[22:54:33.214] port_getn: No such file or directory (trevent.c:221)
[22:54:33.214] port_getn: No such file or directory (trevent.c:221)
Segmentation Fault (core dumped)

ZFS File System. -bash-3.00$ cat /etc/release

Oracle Solaris 10 9/10 s10x_u9wos_14a X86

Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.

Assembled 11 August 2010

-bash-3.00$ uname -a SunOS solaris 5.10 Generic_142910-17 i86pc i386 i86pc

Any ideas?

Change History (14)

comment:1 Changed 11 years ago by charles

Do you have a copy of gdb installed on your system s.t. you can get a backtrace of the crash? Also, do you need a gdb walkthrough?

comment:2 Changed 11 years ago by oh_noes

I will install gdb.

Can you please provide documented instructions for obtaining prefered/correct gdb debug output?

comment:3 Changed 11 years ago by charles

% gdb transmission-2.12/gtk/transmission-gtk
(gdb) handle SIGPIPE nostop noprint nopass
(gdb) run
... run transmission until it crashes ...
(gdb) thread apply all bt
... and what gdb prints here is "the good stuff" :)
(gdb) quit

comment:4 Changed 11 years ago by oh_noes

GDB output below.

-bash-3.00$ /usr/local/bin/gdb "/usr/local/transmission/bin/transmission-daemon"
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 "i386-pc-solaris2.10"...
(gdb) run "--config-dir" "/export/home/transmission/info" "--log-debug" "--foreground"
Starting program: /usr/local/transmission/bin/transmission-daemon "--config-dir" "/export/home/transmission/info" "--log-debug" "--foreground"
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
[18:16:53.227] Transmission 2.12 (11412) started (session.c:622)
[18:16:53.227] Couldn't read "/export/home/transmission/info/stats.json": No such file or directory (utils.c:506)
[18:16:53.227] Couldn't read "/export/home/transmission/info/stats.benc": No such file or directory (utils.c:506)
[18:16:53.227] Cache Maximum cache size set to 2.00 MiB (128 blocks) (cache.c:253)
[18:16:53.227] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:789)
[18:16:53.227] RPC Server Adding address to whitelist: 172.16.50.* (rpc-server.c:789)
[18:16:53.227] RPC Server Serving RPC and Web requests on port 9091 (rpc-server.c:962)
[18:16:53.227] RPC Server Whitelist enabled (rpc-server.c:966)
[18:16:53.227] Bound socket 12 to port 61233 on 0.0.0.0 (net.c:415)
[18:16:53.227] Bound socket 13 to port 61233 on :: (net.c:415)
[18:16:53.227] Port Forwarding Stopped (port-forwarding.c:184)
[18:16:53.227] setrlimit( RLIMIT_NOFILE, 1024 ) (fdlimit.c:854)
[18:16:53.227] socket limit is 512 (fdlimit.c:862)
[18:16:53.227] DHT Initializing DHT (tr-dht.c:336)
[18:16:53.227] Couldn't read "/export/home/transmission/info/dht.dat": No such file or directory (utils.c:506)
[18:16:53.228] DHT Generating new id (tr-dht.c:384)
[18:16:53.228] DHT DHT initialized (tr-dht.c:411)
[18:16:53.228] Using settings from "/export/home/transmission/info" (daemon.c:483)
[18:16:53.228] Writing 2257 bytes to temporary file "/export/home/transmission/info/settings.json.tmp.bxaiw5" (bencode.c:1670)
[18:16:53.228] Renaming "/export/home/transmission/info/settings.json.tmp.bxaiw5" as "/export/home/transmission/info/settings.json" (bencode.c:1682)
[18:16:53.228] Saved "/export/home/transmission/info/settings.json" (bencode.c:1686)
[18:16:53.228] TORRENT1 Read resume file "/export/home/transmission/info/resume/TORRENT1.3f6baef2ed6138e0.resume" (resume.c:607)
[18:16:53.228] TORRENT1 Loaded 35 IPv4 peers from resume file (resume.c:143)
[18:16:53.228] TORRENT1 Resume file found 1 files marked for download (resume.c:211)
[18:16:53.228] Loaded 2 torrents (session.c:1814)
[18:16:53.228] port_getn: No such file or directory (trevent.c:221)
[18:16:53.228] SO_SNDBUF size is 49152 (fdlimit.c:676)
[18:16:53.228] SO_RCVBUF size is 49152 (fdlimit.c:678)
[18:16:53.228] port_getn: No such file or directory (trevent.c:221)
[18:16:53.228] port_getn: No such file or directory (trevent.c:221)
[18:16:53.228] port_getn: No such file or directory (trevent.c:221)
[18:16:54.228] port_getn: No such file or directory (trevent.c:221)
[18:16:54.228] port_getn: No such file or directory (trevent.c:221)
[18:16:54.228] port_getn: No such file or directory (trevent.c:221)
[18:16:54.228] TORRENT1 Got 40 peers from tracker (torrent.c:491)
[18:16:54.228] port_getn: No such file or directory (trevent.c:221)

Program received signal SIGPIPE, Broken pipe.
[Switching to LWP 2]
0xfed6b8e5 in _write () from /lib/libc.so.1
(gdb) 

comment:5 Changed 11 years ago by oh_noes

And now "the good stuff"

Program received signal SIGPIPE, Broken pipe.
[Switching to LWP 2]
0xfed6b8e5 in _write () from /lib/libc.so.1
(gdb) 
(gdb) 
(gdb) 
(gdb) thread apply all bt

Thread 4 (LWP 4):
#0  0xfed6a215 in ___nanosleep () from /lib/libc.so.1
#1  0xfed5bc72 in __nanosleep () from /lib/libc.so.1
#2  0xfeef2b67 in nanosleep () from /lib/librt.so.1
#3  0x08072844 in tr_wait_msec (msec=663) at utils.c:838
#4  0x0806ecfb in nap (roughly_sec=199) at tr-dht.c:96
#5  0x0806fd21 in dht_bootstrap (closure=0x80bad20) at tr-dht.c:238
#6  0x08064563 in ThreadFunc (_t=0x81e0848) at platform.c:110
#7  0xfed67b30 in _thr_setup () from /lib/libc.so.1
#8  0xfed67e20 in L3_doit () from /lib/libc.so.1
#9  0xfe581200 in ?? ()
#10 0x00000000 in ?? ()

Thread 3 (LWP 3):
#0  0xfed6af15 in __pollsys () from /lib/libc.so.1
#1  0xfed5cd46 in _pollsys () from /lib/libc.so.1
#2  0xfed143be in pselect () from /lib/libc.so.1
#3  0xfed146b4 in select () from /lib/libc.so.1
#4  0x08074c95 in tr_webThreadFunc (vsession=0x80bbdf8) at web.c:258
#5  0x08064563 in ThreadFunc (_t=0x80bb710) at platform.c:110
#6  0xfed67b30 in _thr_setup () from /lib/libc.so.1
#7  0xfed67e20 in L3_doit () from /lib/libc.so.1
#8  0xfe580a00 in ?? ()
#9  0x00000000 in ?? ()

Thread 2 (LWP 2):
#0  0xfed6b8e5 in _write () from /lib/libc.so.1
#1  0xfed5b85a in write () from /lib/libc.so.1
#2  0x080631b3 in tr_evbuffer_write (io=0x820caa8, fd=33, howmuch=0) at peer-io.c:285
#3  0x080643c9 in tr_peerIoFlush (io=0x820caa8, dir=TR_CLIENT_TO_PEER, limit=1024) at peer-io.c:966
#4  0x08078c4e in phaseOne (peerArray=0x20, dir=TR_CLIENT_TO_PEER) at bandwidth.c:218
#5  0x08078d8a in tr_bandwidthAllocate (b=0x20, dir=TR_CLIENT_TO_PEER, period_msec=500) at bandwidth.c:275
#6  0x0808175b in bandwidthPulse (foo=-1, bar=1, vmgr=0x80b98b0) at peer-mgr.c:3241
#7  0xfef8592a in event_base_loop () from /usr/local/lib/libevent-1.4.so.2
#8  0xfef85be9 in event_loop () from /usr/local/lib/libevent-1.4.so.2
#9  0xfef85c0e in event_dispatch () from /usr/local/lib/libevent-1.4.so.2
#10 0x080717c1 in libeventThreadFunc (veh=0x80c1008) at trevent.c:244
#11 0x08064563 in ThreadFunc (_t=0x80bb6f8) at platform.c:110
#12 0xfed67b30 in _thr_setup () from /lib/libc.so.1
#13 0xfed67e20 in L3_doit () from /lib/libc.so.1
#14 0xfe580200 in ?? ()
#15 0x00000000 in ?? ()

Thread 1 (LWP 1):
#0  0xfed6a215 in ___nanosleep () from /lib/libc.so.1
#1  0xfed5bc72 in __nanosleep () from /lib/libc.so.1
#2  0xfeef2b67 in nanosleep () from /lib/librt.so.1
#3  0x08072844 in tr_wait_msec (msec=0) at utils.c:838
#4  0x0805ca0a in main (argc=134978752, argv=0x8047cd0) at daemon.c:537
#0  0xfed6b8e5 in _write () from /lib/libc.so.1
(gdb) 

Thread 4 (LWP 4):
#0  0xfed6a215 in ___nanosleep () from /lib/libc.so.1
#1  0xfed5bc72 in __nanosleep () from /lib/libc.so.1
#2  0xfeef2b67 in nanosleep () from /lib/librt.so.1
#3  0x08072844 in tr_wait_msec (msec=663) at utils.c:838
#4  0x0806ecfb in nap (roughly_sec=199) at tr-dht.c:96
#5  0x0806fd21 in dht_bootstrap (closure=0x80bad20) at tr-dht.c:238
#6  0x08064563 in ThreadFunc (_t=0x81e0848) at platform.c:110
#7  0xfed67b30 in _thr_setup () from /lib/libc.so.1
#8  0xfed67e20 in L3_doit () from /lib/libc.so.1
#9  0xfe581200 in ?? ()
#10 0x00000000 in ?? ()

Thread 3 (LWP 3):
#0  0xfed6af15 in __pollsys () from /lib/libc.so.1
#1  0xfed5cd46 in _pollsys () from /lib/libc.so.1
#2  0xfed143be in pselect () from /lib/libc.so.1
#3  0xfed146b4 in select () from /lib/libc.so.1
#4  0x08074c95 in tr_webThreadFunc (vsession=0x80bbdf8) at web.c:258
#5  0x08064563 in ThreadFunc (_t=0x80bb710) at platform.c:110
#6  0xfed67b30 in _thr_setup () from /lib/libc.so.1
#7  0xfed67e20 in L3_doit () from /lib/libc.so.1
#8  0xfe580a00 in ?? ()
#9  0x00000000 in ?? ()

Thread 2 (LWP 2):
#0  0xfed6b8e5 in _write () from /lib/libc.so.1
#1  0xfed5b85a in write () from /lib/libc.so.1
#2  0x080631b3 in tr_evbuffer_write (io=0x820caa8, fd=33, howmuch=0) at peer-io.c:285
#3  0x080643c9 in tr_peerIoFlush (io=0x820caa8, dir=TR_CLIENT_TO_PEER, limit=1024) at peer-io.c:966
#4  0x08078c4e in phaseOne (peerArray=0x20, dir=TR_CLIENT_TO_PEER) at bandwidth.c:218
#5  0x08078d8a in tr_bandwidthAllocate (b=0x20, dir=TR_CLIENT_TO_PEER, period_msec=500) at bandwidth.c:275
#6  0x0808175b in bandwidthPulse (foo=-1, bar=1, vmgr=0x80b98b0) at peer-mgr.c:3241
#7  0xfef8592a in event_base_loop () from /usr/local/lib/libevent-1.4.so.2
#8  0xfef85be9 in event_loop () from /usr/local/lib/libevent-1.4.so.2
#9  0xfef85c0e in event_dispatch () from /usr/local/lib/libevent-1.4.so.2
#10 0x080717c1 in libeventThreadFunc (veh=0x80c1008) at trevent.c:244
#11 0x08064563 in ThreadFunc (_t=0x80bb6f8) at platform.c:110
#12 0xfed67b30 in _thr_setup () from /lib/libc.so.1
#13 0xfed67e20 in L3_doit () from /lib/libc.so.1
#14 0xfe580200 in ?? ()
#15 0x00000000 in ?? ()

Thread 1 (LWP 1):
#0  0xfed6a215 in ___nanosleep () from /lib/libc.so.1
#1  0xfed5bc72 in __nanosleep () from /lib/libc.so.1
#2  0xfeef2b67 in nanosleep () from /lib/librt.so.1
#3  0x08072844 in tr_wait_msec (msec=0) at utils.c:838
#4  0x0805ca0a in main (argc=134978752, argv=0x8047cd0) at daemon.c:537
#0  0xfed6b8e5 in _write () from /lib/libc.so.1
(gdb) 

comment:6 Changed 11 years ago by charles

Thank you, but it needs to be run again with the "handle SIGPIPE" step listed above. Would that be possible?

comment:7 Changed 11 years ago by oh_noes

My apologies. Output below with handle SIGPIPE.

-bash-3.00$ export LD_LIBRARY_PATH=/usr/local/ssl/lib
-bash-3.00$ /usr/local/bin/gdb "/usr/local/transmission/bin/transmission-daemon"
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 "i386-pc-solaris2.10"...
(gdb) handle SIGPIPE nostop noprint nopass
Signal        Stop      Print   Pass to program Description
SIGPIPE       No        No      No              Broken pipe
(gdb) run "--config-dir" "/export/home/transmission/info" "--log-debug" "--foreground"
Starting program: /usr/local/transmission/bin/transmission-daemon "--config-dir" "/export/home/transmission/info" "--log-debug" "--foreground"
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
[08:19:18.501] Transmission 2.12 (11412) started (session.c:622)
[08:19:18.501] Couldn't read "/export/home/transmission/info/stats.json": No such file or directory (utils.c:506)
[08:19:18.501] Couldn't read "/export/home/transmission/info/stats.benc": No such file or directory (utils.c:506)
[08:19:18.501] Cache Maximum cache size set to 2.00 MiB (128 blocks) (cache.c:253)
[08:19:18.501] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:789)
[08:19:18.501] RPC Server Adding address to whitelist: 172.16.50.* (rpc-server.c:789)
[08:19:18.501] RPC Server Serving RPC and Web requests on port 9091 (rpc-server.c:962)
[08:19:18.501] RPC Server Whitelist enabled (rpc-server.c:966)
[08:19:18.501] Bound socket 12 to port 61233 on 0.0.0.0 (net.c:415)
[08:19:18.501] Bound socket 13 to port 61233 on :: (net.c:415)
[08:19:18.501] Port Forwarding Stopped (port-forwarding.c:184)
[08:19:18.502] setrlimit( RLIMIT_NOFILE, 1024 ) (fdlimit.c:854)
[08:19:18.502] socket limit is 512 (fdlimit.c:862)
[08:19:18.502] DHT Initializing DHT (tr-dht.c:336)
[08:19:18.502] Couldn't read "/export/home/transmission/info/dht.dat": No such file or directory (utils.c:506)
[08:19:18.502] DHT Generating new id (tr-dht.c:384)
[08:19:18.502] DHT DHT initialized (tr-dht.c:411)
[08:19:18.502] port_getn: Error 0 (trevent.c:221)
[08:19:18.502] Using settings from "/export/home/transmission/info" (daemon.c:483)
[08:19:18.502] Writing 2257 bytes to temporary file "/export/home/transmission/info/settings.json.tmp.2Ga4na" (bencode.c:1670)
[08:19:18.502] Renaming "/export/home/transmission/info/settings.json.tmp.2Ga4na" as "/export/home/transmission/info/settings.json" (bencode.c:1682)
[08:19:18.502] Saved "/export/home/transmission/info/settings.json" (bencode.c:1686)
[08:19:18.502] TORRENT2 Read resume file "/export/home/transmission/info/resume/TORRENT2.dd6953b594815ba8.resume" (resume.c:607)
[08:19:18.502] TORRENT2 Resume file found 1 files marked for download (resume.c:211)
[08:19:18.502] TORRENT1 Read resume file "/export/home/transmission/info/resume/TORRENT1.3f6baef2ed6138e0.resume" (resume.c:607)
[08:19:18.502] TORRENT1 Loaded 35 IPv4 peers from resume file (resume.c:143)
[08:19:18.502] TORRENT1 Resume file found 1 files marked for download (resume.c:211)
[08:19:18.502] Loaded 2 torrents (session.c:1814)
[08:19:18.502] port_getn: No such file or directory (trevent.c:221)
[08:19:18.502] SO_SNDBUF size is 49152 (fdlimit.c:676)
[08:19:18.502] SO_RCVBUF size is 49152 (fdlimit.c:678)
[08:19:18.502] port_getn: No such file or directory (trevent.c:221)
[08:19:18.502] port_getn: No such file or directory (trevent.c:221)
[08:19:18.502] port_getn: No such file or directory (trevent.c:221)

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 2]
tr_compareAddresses (a=0x5c, b=0x81e4914) at net.c:219
219         if( a->type != b->type )
(gdb) thread apply all bt

Thread 4 (LWP 4):
#0  0xfed6a215 in ___nanosleep () from /lib/libc.so.1
#1  0xfed5bc72 in __nanosleep () from /lib/libc.so.1
#2  0xfeef2b67 in nanosleep () from /lib/librt.so.1
#3  0x08072844 in tr_wait_msec (msec=365) at utils.c:838
#4  0x0806ecfb in nap (roughly_sec=199) at tr-dht.c:96
#5  0x0806fd21 in dht_bootstrap (closure=0x80bad98) at tr-dht.c:238
#6  0x08064563 in ThreadFunc (_t=0x81dcf20) at platform.c:110
#7  0xfed67b30 in _thr_setup () from /lib/libc.so.1
#8  0xfed67e20 in L3_doit () from /lib/libc.so.1
#9  0xfe581200 in ?? ()
#10 0x00000000 in ?? ()

Thread 3 (LWP 3):
#0  0xfed6af15 in __pollsys () from /lib/libc.so.1
#1  0xfed5cd46 in _pollsys () from /lib/libc.so.1
#2  0xfed143be in pselect () from /lib/libc.so.1
#3  0xfed146b4 in select () from /lib/libc.so.1
#4  0x08074c95 in tr_webThreadFunc (vsession=0x80bbdf8) at web.c:258
#5  0x08064563 in ThreadFunc (_t=0x80bb710) at platform.c:110
#6  0xfed67b30 in _thr_setup () from /lib/libc.so.1
#7  0xfed67e20 in L3_doit () from /lib/libc.so.1
#8  0xfe580a00 in ?? ()
#9  0x00000000 in ?? ()

Thread 2 (LWP 2):
#0  tr_compareAddresses (a=0x5c, b=0x81e4914) at net.c:219
#1  0x08064fbe in tr_ptrArrayLowerBound (t=0x81e2e90, ptr=0x81e4914, compare=0x807d6c8 <handshakeCompareToAddr>, exact_match=0xfe68edf3 "") at ptrarray.c:140
#2  0x08065054 in tr_ptrArrayFindSorted (t=0x81e2e90, ptr=0x81e4914, compare=0x807d6c8 <handshakeCompareToAddr>) at ptrarray.c:197
#3  0x0807d7d1 in peerIsInUse (ct=0x81e2e90, atom=0x5c) at peer-mgr.c:292
#4  0x08081fcd in bandwidthPulse (foo=-1, bar=1, vmgr=0x80b98b0) at peer-mgr.c:3402
#5  0xfef8592a in event_base_loop () from /usr/local/lib/libevent-1.4.so.2
#6  0xfef85be9 in event_loop () from /usr/local/lib/libevent-1.4.so.2
#7  0xfef85c0e in event_dispatch () from /usr/local/lib/libevent-1.4.so.2
#8  0x080717c1 in libeventThreadFunc (veh=0x80c1008) at trevent.c:244
#9  0x08064563 in ThreadFunc (_t=0x80bb6f8) at platform.c:110
#10 0xfed67b30 in _thr_setup () from /lib/libc.so.1
#11 0xfed67e20 in L3_doit () from /lib/libc.so.1
#12 0xfe580200 in ?? ()
#13 0x00000000 in ?? ()

Thread 1 (LWP 1):
#0  0xfed6a215 in ___nanosleep () from /lib/libc.so.1
#1  0xfed5bc72 in __nanosleep () from /lib/libc.so.1
#2  0xfeef2b67 in nanosleep () from /lib/librt.so.1
#3  0x08072844 in tr_wait_msec (msec=0) at utils.c:838
#4  0x0805ca0a in main (argc=134977832, argv=0x8047cd0) at daemon.c:537
219         if( a->type != b->type )

comment:8 Changed 11 years ago by oh_noes

Hi BT team,

Is any additional information information required to help resolve this ticket?

Thanks for the great work.

Version 0, edited 11 years ago by oh_noes (next)

comment:9 Changed 11 years ago by oh_noes

I have some interesting info to add.

Been spending a while trying to get this work.

Two points:

The below error I was getting are now gone with an updated libevent (was 1.4.13, now 1.4.14b):

[22:54:33.214] port_getn: No such file or directory (trevent.c:221)
[22:54:33.214] port_getn: No such file or directory (trevent.c:221)
[22:54:33.214] port_getn: No such file or directory (trevent.c:221)

However, I am still getting the Segmentation Fault. This is the interesting bit:

With a single torrent added:

  • Blocked Firewall + Paused Torrent = Doesn't crash
  • Blocked Firewall + Started Torrent = Doesn't crash
  • Open Firewall + Paused Torrent = Doesn't crash
  • Open Firewall + Started Torrent = Crashes

This Segmentation is linked to IP ports/net connectivity somewhere.

Is there anything else I can do to help? Debug and GDB below.

Starting transmission-daemon with a single torrent Paused + Firewall allow all connectivity

$ /usr/local/transmission/bin/transmission-daemon --config-dir /export/home/transmission/info --log-debug --foreground 
[17:21:04.430] Blocklist "level1.bin" updated with 224916 entries (blocklist.c:373)
[17:21:04.430] Blocklist "level1.bin" contains 224916 entries (blocklist.c:114)
[17:21:04.430] Found 1 blocklists in "/export/home/transmission/info/blocklists" (session.c:2078)
[17:21:04.430] Found 1 new blocklists in "/export/home/transmission/info/blocklists" (session.c:2080)
[17:21:04.430] Transmission 2.13 (11501) started (session.c:624)
[17:21:04.430] Couldn't read "/export/home/transmission/info/stats.json": No such file or directory (utils.c:506)
[17:21:04.430] Couldn't read "/export/home/transmission/info/stats.benc": No such file or directory (utils.c:506)
[17:21:04.430] Cache Maximum cache size set to 2.00 MiB (128 blocks) (cache.c:253)
[17:21:04.430] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:789)
[17:21:04.430] RPC Server Adding address to whitelist: 172.16.50.* (rpc-server.c:789)
[17:21:04.431] RPC Server Serving RPC and Web requests on port 9091 (rpc-server.c:962)
[17:21:04.431] RPC Server Whitelist enabled (rpc-server.c:966)
[17:21:04.431] Bound socket 10 to port 61233 on 0.0.0.0 (net.c:415)
[17:21:04.431] Bound socket 11 to port 61233 on :: (net.c:415)
[17:21:04.431] Port Forwarding Stopped (port-forwarding.c:184)
[17:21:04.431] setrlimit( RLIMIT_NOFILE, 1024 ) (fdlimit.c:854)
[17:21:04.431] socket limit is 512 (fdlimit.c:862)
[17:21:04.431] Using settings from "/export/home/transmission/info" (daemon.c:483)
[17:21:04.431] Saved "/export/home/transmission/info/settings.json" (bencode.c:1683)
[17:21:04.431] ubuntu-10.10-desktop-amd64.iso Read resume file "/export/home/transmission/info/resume/ubuntu-10.10-desktop-amd64.iso.4af6fb7cbfb8771f.resume" (resume.c:604)
[17:21:04.431] Blocklist "level1.bin" contains 224916 entries (blocklist.c:114)
[17:21:04.431] ubuntu-10.10-desktop-amd64.iso Loaded 50 IPv4 peers from resume file (resume.c:143)
[17:21:04.431] ubuntu-10.10-desktop-amd64.iso Resume file found 1 files marked for download (resume.c:211)
[17:21:04.431] Loaded 1 torrents (session.c:1816)

##
## Waiting 5 minutes to prove it doesn't crash with paused + firewall blocked.
##

[17:27:06.814] SO_SNDBUF size is 49152 (fdlimit.c:676)
[17:27:06.814] SO_RCVBUF size is 49152 (fdlimit.c:678)
Segmentation Fault (core dumped)

Starting transmission-daemon with a single torrent Paused + Firewall blocking all connectivity

$ /usr/local/transmission/bin/transmission-daemon --config-dir /export/home/transmission/info --log-debug --foreground 
[17:29:04.363] Blocklist "level1.bin" updated with 224916 entries (blocklist.c:373)
[17:29:04.363] Blocklist "level1.bin" contains 224916 entries (blocklist.c:114)
[17:29:04.363] Found 1 blocklists in "/export/home/transmission/info/blocklists" (session.c:2078)
[17:29:04.363] Found 1 new blocklists in "/export/home/transmission/info/blocklists" (session.c:2080)
[17:29:04.363] Transmission 2.13 (11501) started (session.c:624)
[17:29:04.363] Couldn't read "/export/home/transmission/info/stats.json": No such file or directory (utils.c:506)
[17:29:04.363] Couldn't read "/export/home/transmission/info/stats.benc": No such file or directory (utils.c:506)
[17:29:04.363] Cache Maximum cache size set to 2.00 MiB (128 blocks) (cache.c:253)
[17:29:04.364] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:789)
[17:29:04.364] RPC Server Adding address to whitelist: 172.16.50.* (rpc-server.c:789)
[17:29:04.364] RPC Server Serving RPC and Web requests on port 9091 (rpc-server.c:962)
[17:29:04.364] RPC Server Whitelist enabled (rpc-server.c:966)
[17:29:04.364] Bound socket 10 to port 61233 on 0.0.0.0 (net.c:415)
[17:29:04.364] Bound socket 11 to port 61233 on :: (net.c:415)
[17:29:04.364] Port Forwarding Stopped (port-forwarding.c:184)
[17:29:04.364] setrlimit( RLIMIT_NOFILE, 1024 ) (fdlimit.c:854)
[17:29:04.364] socket limit is 512 (fdlimit.c:862)
[17:29:04.364] Using settings from "/export/home/transmission/info" (daemon.c:483)
[17:29:04.364] Saved "/export/home/transmission/info/settings.json" (bencode.c:1683)
[17:29:04.364] ubuntu-10.10-desktop-amd64.iso Read resume file "/export/home/transmission/info/resume/ubuntu-10.10-desktop-amd64.iso.4af6fb7cbfb8771f.resume" (resume.c:604)
[17:29:04.364] Blocklist "level1.bin" contains 224916 entries (blocklist.c:114)
[17:29:04.364] ubuntu-10.10-desktop-amd64.iso Loaded 50 IPv4 peers from resume file (resume.c:143)
[17:29:04.364] ubuntu-10.10-desktop-amd64.iso Resume file found 1 files marked for download (resume.c:211)
[17:29:04.364] Loaded 1 torrents (session.c:1816)

##
## Waiting 2 minutes, then Started Torrent here (Firewall still blocked)
## 
[17:31:27.366] SO_SNDBUF size is 49152 (fdlimit.c:676)
[17:31:27.366] SO_RCVBUF size is 49152 (fdlimit.c:678)
##
## Allowing Firewall connectivity now
## 
[17:35:03.369] Saved "/export/home/transmission/info/resume/ubuntu-10.10-desktop-amd64.iso.4af6fb7cbfb8771f.resume" (bencode.c:1683)
Segmentation Fault (core dumped)

GDB - Starting with Firewall BLOCK, then immediately 'Starting' torrent

-bash-3.00$ gdb /usr/local/transmission/bin/transmission-daemon 
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 "i386-pc-solaris2.10"...
(gdb) handle SIGPIPE nostop noprint nopass
Signal        Stop      Print   Pass to program Description
SIGPIPE       No        No      No              Broken pipe
(gdb) run "--config-dir" "/export/home/transmission/info" "--log-debug" "--foreground"
Starting program: /usr/local/transmission/bin/transmission-daemon "--config-dir" "/export/home/transmission/info" "--log-debug" "--foreground"
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
[New LWP 1]
[New LWP 2]
[New LWP 3]
[19:11:42.264] Blocklist "level1.bin" updated with 224916 entries (blocklist.c:373)
[19:11:42.264] Blocklist "level1.bin" contains 224916 entries (blocklist.c:114)
[19:11:42.264] Found 1 blocklists in "/export/home/transmission/info/blocklists" (session.c:2078)
[19:11:42.264] Found 1 new blocklists in "/export/home/transmission/info/blocklists" (session.c:2080)
[19:11:42.264] Transmission 2.13 (11501) started (session.c:624)
[19:11:42.264] Couldn't read "/export/home/transmission/info/stats.json": No such file or directory (utils.c:506)
[19:11:42.265] Couldn't read "/export/home/transmission/info/stats.benc": No such file or directory (utils.c:506)
[19:11:42.265] Cache Maximum cache size set to 2.00 MiB (128 blocks) (cache.c:253)
[19:11:42.265] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:789)
[19:11:42.265] RPC Server Adding address to whitelist: 172.16.50.* (rpc-server.c:789)
[19:11:42.265] RPC Server Serving RPC and Web requests on port 9091 (rpc-server.c:962)
[19:11:42.265] RPC Server Whitelist enabled (rpc-server.c:966)
[19:11:42.265] Bound socket 13 to port 61233 on 0.0.0.0 (net.c:415)
[19:11:42.265] Bound socket 14 to port 61233 on :: (net.c:415)
[19:11:42.265] Port Forwarding Stopped (port-forwarding.c:184)
[19:11:42.265] setrlimit( RLIMIT_NOFILE, 1024 ) (fdlimit.c:854)
[19:11:42.265] socket limit is 512 (fdlimit.c:862)
[19:11:42.265] Using settings from "/export/home/transmission/info" (daemon.c:483)
[19:11:42.265] Saved "/export/home/transmission/info/settings.json" (bencode.c:1683)
[19:11:42.265] ubuntu-10.10-desktop-amd64.iso Read resume file "/export/home/transmission/info/resume/ubuntu-10.10-desktop-amd64.iso.4af6fb7cbfb8771f.resume" (resume.c:604)
[19:11:42.265] Blocklist "level1.bin" contains 224916 entries (blocklist.c:114)
[19:11:42.265] ubuntu-10.10-desktop-amd64.iso Loaded 50 IPv4 peers from resume file (resume.c:143)
[19:11:42.265] ubuntu-10.10-desktop-amd64.iso Resume file found 1 files marked for download (resume.c:211)
[19:11:42.265] Loaded 1 torrents (session.c:1816)
[19:11:42.265] SO_SNDBUF size is 49152 (fdlimit.c:676)
[19:11:42.265] SO_RCVBUF size is 49152 (fdlimit.c:678)
[19:12:04.265] ubuntu-10.10-desktop-amd64.iso Pausing (torrent.c:1638)
[19:12:04.266] Saved "/export/home/transmission/info/resume/ubuntu-10.10-desktop-amd64.iso.4af6fb7cbfb8771f.resume" (bencode.c:1683)

##
## Allowing Firewall connectivity here
##

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 2]
0x08066b24 in tr_peerIoSetEncryption (io=0xed, encryptionMode=2) at peer-io.c:768
768         io->encryptionMode = encryptionMode;
(gdb) 
(gdb) 
(gdb) thread apply all bt

Thread 3 (LWP 3):
#0  0xfed9af15 in __pollsys () from /lib/libc.so.1
#1  0xfed8cd46 in _pollsys () from /lib/libc.so.1
#2  0xfed443be in pselect () from /lib/libc.so.1
#3  0xfed446b4 in select () from /lib/libc.so.1
#4  0x0807c00c in tr_select (nfds=24, r_fd_set=0xfe4b5ef0, w_fd_set=0xfe4b5e70, c_fd_set=0xfe4b5df0, t=0xfe4b5f78) at web.c:258
#5  0x0807c2a4 in tr_webThreadFunc (vsession=0x80ced48) at web.c:331
#6  0x08067317 in ThreadFunc (_t=0x80ce688) at platform.c:110
#7  0xfed97b30 in _thr_setup () from /lib/libc.so.1
#8  0xfed97e20 in L3_doit () from /lib/libc.so.1
#9  0xfe670a00 in ?? ()
#10 0x00000000 in ?? ()

Thread 2 (LWP 2):
#0  0x08066b24 in tr_peerIoSetEncryption (io=0xed, encryptionMode=2) at peer-io.c:768
#1  0x0809b04d in readHandshake (handshake=0x821a008, inbuf=0x80ccae8) at handshake.c:636
#2  0x0809c190 in canRead (io=0x821a520, arg=0x821a008, piece=0xfe77ec84) at handshake.c:1046
#3  0x080658a0 in canReadWrapper (io=0x821a520) at peer-io.c:147
#4  0x08065bcc in event_read_cb (fd=39, event=2, vio=0x821a520) at peer-io.c:246
#5  0xfef85661 in event_base_loop (base=0x80cf1d0, flags=0) at event.c:395
#6  0xfef8594f in event_loop (flags=0) at event.c:471
#7  0xfef8596e in event_dispatch () at event.c:409
#8  0x08077d6f in libeventThreadFunc (veh=0x80d4008) at trevent.c:244
#9  0x08067317 in ThreadFunc (_t=0x80ce640) at platform.c:110
#10 0xfed97b30 in _thr_setup () from /lib/libc.so.1
#11 0xfed97e20 in L3_doit () from /lib/libc.so.1
#12 0xfe670200 in ?? ()
#13 0x00000000 in ?? ()

Thread 1 (LWP 1):
#0  0xfed9a215 in ___nanosleep () from /lib/libc.so.1
#1  0xfed8bc72 in __nanosleep () from /lib/libc.so.1
#2  0xfebe2b67 in nanosleep () from /lib/librt.so.1
#3  0x080793da in tr_wait_msec (msec=1000) at utils.c:869
#4  0x0805d711 in main (argc=5, argv=0x8047ca0) at daemon.c:537
0x08066b24      768         io->encryptionMode = encryptionMode;

comment:10 Changed 11 years ago by oh_noes

Found the crashing problem!

0x08066b24      768         io->encryptionMode = encryptionMode;

Led me to something encryption related. I had encryption=1 (default). Setting this encryption=0 fixed the problem.

Looking at ldd:

# ldd /usr/local/transmission/bin/transmission-daemon 
        libevent-1.4.so.2 =>     /usr/local/libevent/lib/libevent-1.4.so.2
        libresolv.so.2 =>        /lib/libresolv.so.2
        libcurl.so.4 =>  /usr/local/lib/libcurl.so.4
        libidn.so.11 =>  /usr/local/lib/libidn.so.11
        libintl.so.8 =>  /usr/local/lib/libintl.so.8
        libsec.so.1 =>   /lib/libsec.so.1
        libc.so.1 =>     /lib/libc.so.1
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        librt.so.1 =>    /lib/librt.so.1
        libssh2.so.1 =>  /usr/local/lib/libssh2.so.1
        libssl.so.1.0.0 =>       /usr/local/ssl/lib/libssl.so.1.0.0
        libcrypto.so.1.0.0 =>    /usr/local/ssl/lib/libcrypto.so.1.0.0
        libdl.so.1 =>    /lib/libdl.so.1
        libz.so =>       /usr/local/lib/libz.so
        libnsl.so.1 =>   /lib/libnsl.so.1
        libsocket.so.1 =>        /lib/libsocket.so.1
        libm.so.2 =>     /lib/libm.so.2
        libpthread.so.1 =>       /lib/libpthread.so.1
        libgcc_s.so.1 =>         /lib/libgcc_s.so.1
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libavl.so.1 =>   /lib/libavl.so.1
        libaio.so.1 =>   /lib/libaio.so.1
        libmd.so.1 =>    /lib/libmd.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libscf.so.1 =>   /lib/libscf.so.1
        libdoor.so.1 =>  /lib/libdoor.so.1
        libuutil.so.1 =>         /lib/libuutil.so.1
        libgen.so.1 =>   /lib/libgen.so.1

Any thoughts on why this setup is making encryption segfault?

comment:11 Changed 11 years ago by jordan

Is this problem still having in 2.20 beta 1?

comment:12 Changed 11 years ago by jordan

oh_noes: ping

comment:13 Changed 11 years ago by jordan

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

comment:14 Changed 11 years ago by jordan

  • Resolution set to invalid
  • Status changed from new to closed

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. Thanks again!

Note: See TracTickets for help on using tickets.