You are not logged in.

#1 2019-02-24 19:28:42

pants
Member
From: Rome, Italy
Registered: 2010-05-25
Posts: 44
Website

[SOLVED] rtorrent routinely segfaults

I'm having trouble with the officially packaged rtorrent/libtorrent, which recently began routinely segfaulting after several hours of operation. I'm running linux-hardened and the latest versions of all concerned software (I've run pacman -Syu). Not sure if this is a packaging/dynamic linking problem or a problem for upstream, though neither rtorrent nor libtorrent were upgraded recently. libcurl appears in the stack trace, which was updated several times in the last month and I suspect may be the culprit.

For clarity, the 'physexec' command that appears in the shell paste is a wrapper for running the supplied command in a specific network namespace and shouldn't be relevant.

shell:

pants@WOPR ~ (git)-[master] % physexec rtorrent
[sudo] password for pants: 
Caught Segmentation fault, dumping stack:
rtorrent(+0x37a4e) [0x55f3066ba4e]
/usr/lib/libpthread.so.0(+0x123c0) [0x60925e9ee3c0]
/usr/lib/libcurl.so.4(+0x3683d) [0x60925ed9883d]
/usr/lib/libcurl.so.4(curl_multi_socket_action+0x25) [0x60925ed98b25]
rtorrent(+0x1254db) [0x55f307594db]
/usr/lib/libtorrent.so.20(_ZN7torrent9PollEPoll7performEv+0xca) [0x60925ea7f66a]
/usr/lib/libtorrent.so.20(_ZN7torrent9PollEPoll7do_pollEli+0x91) [0x60925ea7f7a1]
/usr/lib/libtorrent.so.20(_ZN7torrent11thread_base10event_loopEPS0_+0x118) [0x60925eaba3d8]
rtorrent(+0x36a15) [0x55f3066aa15]
/usr/lib/libc.so.6(__libc_start_main+0xf3) [0x60925e693223]
rtorrent(+0x372fe) [0x55f3066b2fe]
  20.97s user 13.95s system 0% cpu 1:31:31.15 total
pants@WOPR ~ (git)-[master] % pacman -Q rtorrent
rtorrent 0.9.7-2
pants@WOPR ~ (git)-[master] % pacman -Q libtorrent
libtorrent 0.13.7-1
pants@WOPR ~ (git)-[master] % uname -a
Linux WOPR 4.20.10.a-1-hardened #1 SMP PREEMPT Fri Feb 15 22:51:06 CET 2019 x86_64 GNU/Linux
pants@WOPR ~/doc/research/fracture/data (git)-[master] % cat /var/log/pacman.log | grep curl | tail
[2018-10-30 07:25] [ALPM] upgraded flickcurl (1.26-5 -> 1.26-6)
[2018-11-05 07:24] [ALPM] upgraded curl (7.61.1-3 -> 7.62.0-1)
[2018-12-14 10:38] [ALPM] upgraded curl (7.62.0-1 -> 7.63.0-1)
[2018-12-22 12:19] [ALPM] upgraded curl (7.63.0-1 -> 7.63.0-2)
[2019-01-15 10:09] [ALPM] upgraded curl (7.63.0-2 -> 7.63.0-4)
[2019-02-07 23:09] [ALPM] upgraded curl (7.63.0-4 -> 7.64.0-1)
[2019-02-12 23:52] [ALPM] upgraded curl (7.64.0-1 -> 7.64.0-3)
[2019-02-16 15:35] [ALPM] upgraded curl (7.64.0-3 -> 7.64.0-4)
[2019-02-19 10:11] [ALPM] upgraded curl (7.64.0-4 -> 7.64.0-7)
[2019-02-20 17:52] [ALPM] upgraded curl (7.64.0-7 -> 7.64.0-9)

journalctl:

Feb 24 13:48:19 WOPR audit[10917]: ANOM_ABEND auid=1000 uid=1000 gid=100 ses=1 pid=10917 comm=72746F7272656E74206D61696E exe="/usr/bin/rtorrent" sig=6 res=1
Feb 24 13:48:19 WOPR kernel: audit: type=1701 audit(1551034099.553:101): auid=1000 uid=1000 gid=100 ses=1 pid=10917 comm=72746F7272656E74206D61696E exe="/usr/bin/rtorrent" sig=6 res=1
Feb 24 13:48:19 WOPR systemd[1]: Started Process Core Dump (PID 19469/UID 0).
Feb 24 13:48:19 WOPR kernel: audit: type=1130 audit(1551034099.563:102): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-19469-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 24 13:48:19 WOPR audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-19469-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 24 13:48:22 WOPR systemd-coredump[19470]: Failed to get ACL: Operation not supported
Feb 24 13:48:22 WOPR audit[10916]: ANOM_ABEND auid=1000 uid=0 gid=100 ses=1 pid=10916 comm="sudo" exe="/usr/bin/sudo" sig=6 res=1
Feb 24 13:48:22 WOPR sudo[10916]: pam_unix(sudo:session): session closed for user pants
Feb 24 13:48:22 WOPR sudo[10916]: pam_env(sudo:setcred): pam_putenv: delete non-existent entry; SSH_AGENT_PID
Feb 24 13:48:22 WOPR kernel: audit: type=1701 audit(1551034102.004:103): auid=1000 uid=0 gid=100 ses=1 pid=10916 comm="sudo" exe="/usr/bin/sudo" sig=6 res=1
Feb 24 13:48:22 WOPR sudo[10613]: pam_unix(sudo:session): session closed for user root
Feb 24 13:48:22 WOPR audit[10613]: ANOM_ABEND auid=1000 uid=0 gid=0 ses=1 pid=10613 comm="sudo" exe="/usr/bin/sudo" sig=6 res=1
Feb 24 13:48:22 WOPR kernel: audit: type=1701 audit(1551034102.024:104): auid=1000 uid=0 gid=0 ses=1 pid=10613 comm="sudo" exe="/usr/bin/sudo" sig=6 res=1
Feb 24 13:48:50 WOPR systemd-coredump[19470]: Process 10917 (rtorrent main) of user 1000 dumped core.
                                              
                                              Stack trace of thread 10917:
                                              #0  0x000060925e6a6d7f raise (libc.so.6)
                                              #1  0x000060925e691672 abort (libc.so.6)
                                              #2  0x0000055f3064f026 n/a (rtorrent)
                                              #3  0x000060925e9ee3c0 __restore_rt (libpthread.so.0)
                                              #4  0x000060925ed9883d n/a (libcurl.so.4)
                                              #5  0x000060925ed98b25 curl_multi_socket_action (libcurl.so.4)
                                              #6  0x0000055f307594db n/a (rtorrent)
                                              #7  0x000060925ea7f66a _ZN7torrent9PollEPoll7performEv (libtorrent.so.20)
                                              #8  0x000060925ea7f7a1 _ZN7torrent9PollEPoll7do_pollEli (libtorrent.so.20)
                                              #9  0x000060925eaba3d8 _ZN7torrent11thread_base10event_loopEPS0_ (libtorrent.so.20)

                                              #10 0x0000055f3066aa15 n/a (rtorrent)
                                              #11 0x000060925e693223 __libc_start_main (libc.so.6)
                                              #12 0x0000055f3066b2fe n/a (rtorrent)
                                              
                                              Stack trace of thread 10918:
                                              #0  0x000060925e76ae57 epoll_wait (libc.so.6)
                                              #1  0x000060925ea7f596 _ZN7torrent9PollEPoll4pollEi (libtorrent.so.20)
                                              #2  0x000060925ea7f763 _ZN7torrent9PollEPoll7do_pollEli (libtorrent.so.20)
                                              #3  0x000060925eaba3d8 _ZN7torrent11thread_base10event_loopEPS0_ (libtorrent.so.20)
                                              #4  0x000060925e9e3a9d start_thread (libpthread.so.0)
                                              #5  0x000060925e76ab23 __clone (libc.so.6)
                                              
                                              Stack trace of thread 11235:
                                              #0  0x000060925e76ae57 epoll_wait (libc.so.6)
                                              #1  0x000060925ea7f596 _ZN7torrent9PollEPoll4pollEi (libtorrent.so.20)
                                              #2  0x000060925ea7f763 _ZN7torrent9PollEPoll7do_pollEli (libtorrent.so.20)
                                              #3  0x000060925eaba3d8 _ZN7torrent11thread_base10event_loopEPS0_ (libtorrent.so.20)
                                              #4  0x000060925e9e3a9d start_thread (libpthread.so.0)
                                              #5  0x000060925e76ab23 __clone (libc.so.6)
Feb 24 13:48:51 WOPR systemd[1]: systemd-coredump@1-19469-0.service: Succeeded.
Feb 24 13:48:51 WOPR kernel: audit: type=1131 audit(1551034131.094:105): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-19469-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 24 13:48:51 WOPR audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@1-19469-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

end of rtorrent.log:

1551034099 I handshake_manager->xx.xx.xx.xx: Adding incoming connection: fd:218.
1551034099 I handshake_manager->xx.xx.xx.xx: Received error: message:6 unencrypted connection rejected.
1551034099 I handshake_manager->xx.xx.xx.xx: Handshake success.
1551034099 I handshake_manager->xx.xx.xx.xx: Adding incoming connection: fd:218.
1551034099 I handshake_manager->xx.xx.xx.xx: Received error: message:6 unencrypted connection rejected.
1551034099 I handshake_manager->xx.xx.xx.xx: Adding incoming connection: fd:218.
1551034099 I handshake_manager->xx.xx.xx.xx: Received error: message:6 unencrypted connection rejected.
1551034099 I 652F4827C8381C4AC5AC19A4D61C523AC1A0C4FD->tracker_list: received 0 peers (url:http://site.com/announce)
1551034099 I handshake_manager->xx.xx.xx.xx: Received error: message:7 network error.
1551034099 C Caught signal: 'Segmentation fault.
---DUMP---
Caught Segmentation fault, dumping stack:
rtorrent(+0x37a4e) [0x55f3066ba4e]
/usr/lib/libpthread.so.0(+0x123c0) [0x60925e9ee3c0]
/usr/lib/libcurl.so.4(+0x3683d) [0x60925ed9883d]
/usr/lib/libcurl.so.4(curl_multi_socket_action+0x25) [0x60925ed98b25]
rtorrent(+0x1254db) [0x55f307594db]
/usr/lib/libtorrent.so.20(_ZN7torrent9PollEPoll7performEv+0xca) [0x60925ea7f66a]
/usr/lib/libtorrent.so.20(_ZN7torrent9PollEPoll7do_pollEli+0x91) [0x60925ea7f7a1]
/usr/lib/libtorrent.so.20(_ZN7torrent11thread_base10event_loopEPS0_+0x118) [0x60925eaba3d8]
rtorrent(+0x36a15) [0x55f3066aa15]
/usr/lib/libc.so.6(__libc_start_main+0xf3) [0x60925e693223]
rtorrent(+0x372fe) [0x55f3066b2fe]

---END---

physexec (for completeness):

physexec() { sudo -E ip netns exec physical sudo -E -u \#$(id -u) -g \#$(id -g) "$@"; }

Last edited by pants (2019-02-27 12:03:38)

Offline

#2 2019-02-27 12:03:13

pants
Member
From: Rome, Italy
Registered: 2010-05-25
Posts: 44
Website

Re: [SOLVED] rtorrent routinely segfaults

This appears to have resolved itself upon some combination of rebooting, renewed pacman -Syu-ing, and reinstalling curl. Solved?

Offline

Board footer

Powered by FluxBB