Bug#864995: rtorrent: Crashes when dht and peer exchange is enabled

2019-03-29 Thread Oleg Kostyuchenko
Thanks a lot for your analysis Ɓukasz,

I confirm that force-enabling byte alignment on ARM fixes the issue.

This particular rtorrent crash affects my armhf machine (Banana Pro board) 
since the day I replaced Bananian with Armbian stretch. I reckon this issue as 
pretty severe as it basically prevents usage of rtorrent with DHT enabled on 
ARM workstations (which is a common case for torrent seedboxes).

Now, after the fix, I'm having rtorrent flawlessly running for already several 
hours. Before the fix, it was crashing with this "tracker insertion" error 
within 4-6 minutes after start.

Any chance to promote the fix to the upstream?

Included is the patch for debian/rules which adds --enable-aligned if target 
arch is ARM.

Oleg
diff -Nru libtorrent-0.13.6/debian/rules libtorrent-0.13.6/debian/rules
--- libtorrent-0.13.6/debian/rules	2016-12-22 06:32:11.0 +
+++ libtorrent-0.13.6/debian/rules	2019-03-29 22:34:15.0 +
@@ -21,6 +21,12 @@
 override_dh_auto_test:
 endif
 
+# Force byte alignment on ARM.
+# Closes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864995.
+ifeq ($(DEB_TARGET_ARCH_CPU), arm)
+CONFOPTS += --enable-aligned
+endif
+
 %:
 	dh $@ --with autoreconf --parallel
 


Bug#864995: rtorrent: Crashes when dht and peer exchange is enabled

2017-06-18 Thread Alexey Raschenkov
Package: rtorrent
Version: 0.9.6-2+b1
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
Started rtorrent normally with dht = auto and peer_exchange = yes, rtorrend 
crashed in 10 minutes.
Whem I set in .rtorrent.rc dht = disable and peer_exchange = no, rtorrent 
stopped crashing.

Log:

1497778674 N rtorrent main: Starting thread.
1497778674 N worker_rtorrent: Starting thread.
1497779641 C Caught internal_error: 'DhtRouter::get_tracker did not actually 
insert tracker.'.
---DUMP---
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(_ZN7torrent14internal_error10initializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x133)
 [0xb6d95e84]
/usr/bin/rtorrent(_ZN7torrent14internal_errorC1EPKc+0x75) [0x7f61458a]
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(+0x5f430) [0xb6dd3430]
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(+0x6287c) [0xb6dd687c]
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(+0x64e36) [0xb6dd8e36]
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(+0x66f06) [0xb6ddaf06]
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(_ZN7torrent9PollEPoll7performEv+0x109)
 [0xb6da287a]
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(_ZN7torrent9PollEPoll7do_pollExi+0x51)
 [0xb6da28f6]
/usr/lib/arm-linux-gnueabihf/libtorrent.so.19(_ZN7torrent11thread_base10event_loopEPS0_+0x129)
 [0xb6dc8596]
/usr/bin/rtorrent(main+0x2ac5) [0x7f5ec842]
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x9d) [0xb6a4b4aa]

---END---



-- System Information:
Debian Release: 9.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 4.9.0-3-armmp-lpae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages rtorrent depends on:
ii  libc6  2.24-11
ii  libcurl3   7.52.1-5
ii  libgcc11:6.3.0-18
ii  libncursesw5   6.0+20161126-1
ii  libstdc++6 6.3.0-18
ii  libtinfo5  6.0+20161126-1
ii  libtorrent19   0.13.6-1.1
ii  libxmlrpc-core-c3  1.33.14-4

rtorrent recommends no packages.

Versions of packages rtorrent suggests:
ii  screen  4.5.0-6

-- no debconf information