Opened 8 years ago

Closed 8 years ago

#5143 closed Bug (fixed)

transmission-daemon crashes with "Bus error" on SPARC sun4u

Reported by: KillerDAN Owned by:
Priority: Normal Milestone: None Set
Component: Daemon Version: 2.22+
Severity: Major Keywords: Bus error
Cc:

Description

While running Debian SPARC stable/ squeeze tried upgrading transmission for testing, 2.53 and experimental, 2.73.

At both time transmission would crash with "Bus error".

Upgraded full distribution to testing/ wheezy/ sid and current version 2.53 is crashing with "Bus error".

By crashing please understand always it runs. It is reproducible.

Did some "googling" before opening this ticket and earlier found a reference on a Debian related forum/ blog to a memory management issue. Can't seem to find it now.

gdb "dump" from previous info found on trac:

root@sunblade:~# gdb transmission-daemon GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 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 "sparc-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/transmission-daemon...(no debugging symbols found)...done.

(gdb) r -f --config-dir /var/lib/transmission-daemon/info

Starting program: /usr/bin/transmission-daemon -f --config-dir /var/lib/transmission-daemon/info [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/sparc-linux-gnu/libthread_db.so.1". [New Thread 0xf769bb70 (LWP 5966)] [New Thread 0xf6e9bb70 (LWP 5967)] [New Thread 0xf669bb70 (LWP 5968)] [22:34:21.400] Transmission 2.52 (13304) started (session.c:718) [22:34:21.401] Cache Maximum cache size set to 0.00 KiB (0 blocks) (cache.c:249) [22:34:21.401] RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:803) [22:34:21.401] RPC Server Adding address to whitelist: (rpc-server.c:803) [22:34:21.401] RPC Server Adding address to whitelist: 192.168.1.* (rpc-server.c:803) [22:34:21.401] RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:997) [22:34:21.401] RPC Server Whitelist enabled (rpc-server.c:1001) [22:34:21.401] RPC Server Password required (rpc-server.c:1004) [22:34:21.401] Bound socket 14 to port 51413 on 0.0.0.0 (net.c:371) [22:34:21.401] Bound socket 15 to port 51413 on :: (net.c:371) [22:34:21.401] DHT Initializing DHT (tr-dht.c:276) [22:34:21.401] DHT Reusing old id (tr-dht.c:305) [22:34:21.401] DHT DHT initialized (tr-dht.c:330) [22:34:21.401] LPD Initialising Local Peer Discovery (tr-lpd.c:283) [22:34:21.401] DHT Bootstrapping from 78 IPv4 nodes (tr-dht.c:153) [22:34:21.401] LPD Local Peer Discovery initialised (tr-lpd.c:354) [22:34:21.401] Using settings from "/var/lib/transmission-daemon/info" (daemon.c:488) [22:34:21.401] Saved "/etc/transmission-daemon/settings.json" (bencode.c:1731) [22:34:21.401] transmission-daemon requiring authentication (daemon.c:508) (...) [22:34:21.424] Loaded 24 torrents (session.c:1937) [22:34:21.424] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:72) [22:34:21.424] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:72) [22:34:21.424] Port Forwarding (UPnP) upnpDiscover failed (errno 0 - Success) (upnp.c:104) (...) [22:34:21.424] Port Forwarding (UPnP) Port forwarding successful! (upnp.c:282) [22:34:21.424] Port Forwarding State changed from "Not forwarded" to "Forwarded" (port-forwarding.c:93) (...)

Program received signal SIGBUS, Bus error. [Switching to Thread 0xf769bb70 (LWP 5966)] 0x70058ec4 in ?? () (gdb) thread apply all bt

Thread 4 (Thread 0xf669bb70 (LWP 5968)): #0 0xf7ce4194 in nanosleep () from /lib/sparc-linux-gnu/libpthread.so.0 #1 0x70024468 in ?? () #2 0x70024468 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0xf6e9bb70 (LWP 5967)): #0 0xf7c3aef8 in select () from /lib/sparc-linux-gnu/libc.so.6 #1 0x700279a0 in ?? () #2 0x700279a0 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0xf769bb70 (LWP 5966)): #0 0x70058ec4 in ?? () #1 0xf7b8f9a0 in random_r () from /lib/sparc-linux-gnu/libc.so.6 #2 0x700597ec in ?? () #3 0x700597ec in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xf7fed930 (LWP 5965)): #0 0xf7ce4194 in nanosleep () from /lib/sparc-linux-gnu/libpthread.so.0 #1 0x70024468 in ?? () #2 0x70024468 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) quit A debugging session is active.

Inferior 1 [process 5965] will be killed.

Quit anyway? (y or n) y

Change History (12)

comment:1 Changed 8 years ago by KillerDAN

Decided to compile from original sources; Same result: Bus error.

Dump with debug symbols:

Starting program: /usr/local/bin/transmission-daemon -f --config-dir /var/lib/transmission-daemon/info
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/sparc-linux-gnu/libthread_db.so.1".
[New Thread 0xf755fb70 (LWP 9457)]
[New Thread 0xf6ba3b70 (LWP 9458)]
[New Thread 0xf63a3b70 (LWP 9459)]

Program received signal SIGBUS, Bus error.
[Switching to Thread 0xf755fb70 (LWP 9457)]
send_to_addr (send_to_proc=0x2a1a0 <tr_utpSendTo>, send_to_userdata=0x780f8, p=0xf755dee1 "1", len=20, addr=...) at utp.cpp:818
818             SOCKADDR_STORAGE to = addr.get_sockaddr_storage(&tolen);
(gdb) thread apply all bt

Thread 4 (Thread 0xf63a3b70 (LWP 9459)):
#0  0xf7ba8194 in nanosleep () from /lib/sparc-linux-gnu/libpthread.so.0
#1  0x0002b834 in tr_wait_msec (msec=<optimized out>) at utils.c:862
#2  0x00028630 in dht_bootstrap (closure=0x7f3b0) at tr-dht.c:189
#3  0x0001cd0c in ThreadFunc (_t=0x7f3c8) at platform.c:118
#4  0xf7b9e71c in start_thread () from /lib/sparc-linux-gnu/libpthread.so.0
#5  0xf7b06abc in ?? () from /lib/sparc-linux-gnu/libc.so.6
#6  0xf7b06abc in ?? () from /lib/sparc-linux-gnu/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0xf6ba3b70 (LWP 9458)):
#0  0xf7afeef8 in select () from /lib/sparc-linux-gnu/libc.so.6
#1  0x0002e220 in tr_select (t=0xf6ba3248, c_fd_set=0xf6ba31c0, w_fd_set=0xf6ba3140, r_fd_set=0xf6ba30c0, nfds=<optimized out>)
    at web.c:307
#2  tr_webThreadFunc (vsession=0x780f8) at web.c:397
#3  0x0001cd0c in ThreadFunc (_t=0x7b288) at platform.c:118
#4  0xf7b9e71c in start_thread () from /lib/sparc-linux-gnu/libpthread.so.0
#5  0xf7b06abc in ?? () from /lib/sparc-linux-gnu/libc.so.6
#6  0xf7b06abc in ?? () from /lib/sparc-linux-gnu/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0xf755fb70 (LWP 9457)):
#0  send_to_addr (send_to_proc=0x2a1a0 <tr_utpSendTo>, send_to_userdata=0x780f8, p=0xf755dee1 "1", len=20, addr=...) at utp.cpp:818
#1  0x00055a6c in UTPSocket::send_rst (send_to_proc=0x2a1a0 <tr_utpSendTo>, send_to_userdata=0x780f8, addr=..., 
    conn_id_send=<optimized out>, ack_nr=<optimized out>, seq_nr=31287, version=1 '\001') at utp.cpp:1004
#2  0x00058c58 in UTP_IsIncomingUTP (incoming_proc=<optimized out>, send_to_proc=0x2a1a0 <tr_utpSendTo>, send_to_userdata=0x780f8, 
    buffer=<optimized out>, len=<optimized out>, to=<optimized out>, tolen=16) at utp.cpp:2619
#3  0x0002a288 in tr_utpPacket (buf=0xf755e0c8 "!\002:k\271埫\177\377\377\377", buflen=30, from=0xf755f0cc, fromlen=16, 
    ss=0x780f8) at tr-utp.c:179
#4  0x00029890 in event_callback (s=17, type=2, sv=0x780f8) at tr-udp.c:225
#5  0xf7f4c554 in event_base_loop () from /usr/lib/sparc-linux-gnu/libevent-2.0.so.5
#6  0x0002a9d0 in libeventThreadFunc (veh=0x7b370) at trevent.c:248
#7  0x0001cd0c in ThreadFunc (_t=0x7b3c0) at platform.c:118
#8  0xf7b9e71c in start_thread () from /lib/sparc-linux-gnu/libpthread.so.0
#9  0xf7b06abc in ?? () from /lib/sparc-linux-gnu/libc.so.6
#10 0xf7b06abc in ?? () from /lib/sparc-linux-gnu/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xf7f3e6e0 (LWP 9454)):
#0  0xf7ba8194 in nanosleep () from /lib/sparc-linux-gnu/libpthread.so.0
#1  0x0002b834 in tr_wait_msec (msec=<optimized out>) at utils.c:862
#2  0x000144e8 in main (argc=<optimized out>, argv=<optimized out>) at daemon.c:577

comment:2 Changed 8 years ago by KillerDAN

I am not much of a coder so started doing what I can.

Going backwards...

v2.42

Crashes, same error.

comment:3 Changed 8 years ago by x190

Probably same issue as #5002.

comment:4 Changed 8 years ago by KillerDAN

Gone back compiling from sources...

v2.33 crashes

v2.22 IS RUNNING !

So my question is, what changed from v2.22 onwards ?

comment:5 Changed 8 years ago by x190

µTP. For a workaround, disable it in your settings.json file.

https://trac.transmissionbt.com/wiki/EditConfigFiles

utp-enabled: Boolean (default = true) Enable Micro Transport Protocol (µTP)

Last edited 8 years ago by x190 (previous) (diff)

comment:6 follow-up: Changed 8 years ago by KillerDAN

Right to the point.

Tried configuring both 2.33 and 2.73 with --disable-utp but both fail making all in libtransmission.

Build both with --enable-utp and utp-enabled: false in setting.json.

BOTH RUN !

Gone back to debian stock experimental binaries, 2.73, and is running with utp-enabled: false.

Next steps: How can I help ?

comment:7 in reply to: ↑ 6 Changed 8 years ago by rb07

Replying to KillerDAN:

Next steps: How can I help ?

Report the problem to the libutp project: https://github.com/bittorrent/libutp/issues

You can use this thread as a reference, so you don't have to repeat everything. Technically the problem is an alignment problem with SPARC processors.

comment:8 Changed 8 years ago by x190

Alignment issues should already be fixed ( https://trac.transmissionbt.com/ticket/5128#comment:3 ) and #5002 addresses selack issue. Maybe you should wait for a build that incorporates both fixes before reporting.

Last edited 8 years ago by x190 (previous) (diff)

comment:9 Changed 8 years ago by KillerDAN

Applied fixes discussed on #5002 and #5128 and I am back to 2.73 running with utp enabled.

comment:10 Changed 8 years ago by KillerDAN

  • Priority changed from Highest to Normal
  • Severity changed from Blocker to Major
  • Version changed from 2.52+ to 2.22+

comment:11 follow-up: Changed 8 years ago by livings124

KillerDAN: if I am understanding you correctly, should this be closed as a duplicate of the tickets you stated?

comment:13 in reply to: ↑ 11 Changed 8 years ago by KillerDAN

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

Replying to livings124:

KillerDAN: if I am understanding you correctly, should this be closed as a duplicate of the tickets you stated?

I would not say duplicate but it can be closed as being solved by the two mentioned fixes.

Note: See TracTickets for help on using tickets.