You are not logged in.

#1 2012-04-09 15:05:31

Vlavv
Member
Registered: 2012-04-09
Posts: 9

rtorrent - segmentation fault on startup

Hi,

Some weeks ago, my server went through some weird problems (/dev/pts wasn't mouting anymore, but maybe that's totally unrelated). Now everything works fine, except that rtorrent now always crashes on startup. I tried emptying my session/ folder, downgrading ncurses to 5.7-4, installing the rtorrent-unstable version from AUR, then recompiling it with this patch, nothing worked. When I start rtorrent, the interface shows for like two seconds, then it crashes with the following:

Caught Segmentation fault, dumping stack:
0 rtorrent() [0x4141a9]
1 rtorrent() [0x44f9cd]
2 /lib/libc.so.6(+0x34cb0) [0x7fddb21b9cb0]
3 /usr/lib/libcrypto.so.1.0.0(BN_num_bits+0) [0x7fddb1787070]
4 /usr/lib/libtorrent.so.14(+0xd44cd) [0x7fddb36434cd]
5 /usr/lib/libtorrent.so.14(+0xb7d48) [0x7fddb3626d48]
6 /usr/lib/libtorrent.so.14(+0xb92aa) [0x7fddb36282aa]
7 /usr/lib/libtorrent.so.14(_ZN7torrent9PollEPoll7performEv+0xf5) [0x7fddb35b2c55]
8 /usr/lib/libtorrent.so.14(_ZN7torrent9PollEPoll7do_pollEli+0x62) [0x7fddb35b2ce2]
9 /usr/lib/libtorrent.so.14(_ZN7torrent11thread_base10event_loopEPS0_+0x96) [0x7fddb35e8fb6]
10 rtorrent() [0x4136f3]
11 /lib/libc.so.6(__libc_start_main+0xf5) [0x7fddb21a6455]
12 rtorrent() [0x413ce5]
Abandon

I tried reinstalling all related packages, including openssl since the stacktrace mentions libcrypto. Still nothing. Can anyone help me on this, please? wink

Thank you.

- Vlavv.

Last edited by Vlavv (2012-04-09 15:33:55)

Offline

#2 2012-04-09 15:11:54

Thanoulis
Member
From: Lamia, Greece
Registered: 2009-05-03
Posts: 33
Website

Re: rtorrent - segmentation fault on startup

Not a clue...everything works fine here, on 64bit:

linux 3.3.1-1
rtorrent 0.8.9-2
libtorrent 0.12.9-1
curl 7.25.0-1
xmlrpc-c 1:1.29.2-1

All the above packages are from official repositories, unpatched.


-- Beware of he who would deny you access to information, for in his heart he dreams himself your master.

Offline

#3 2012-04-09 15:13:59

Vlavv
Member
Registered: 2012-04-09
Posts: 9

Re: rtorrent - segmentation fault on startup

Same versions here, also unpatched, on a 64 bits VM. It worked fine not so long ago. I'll try to get more info with some debug tools...

Thanks.

Offline

#4 2012-04-09 17:17:34

Vlavv
Member
Registered: 2012-04-09
Posts: 9

Re: rtorrent - segmentation fault on startup

Everything I could get from gdb is the following, it looks like the repository version of rtorrent is not compiled with debug symbols. I'll try again later with the AUR version with debug symbols.

#0  0x00007ffff565a070 in BN_num_bits () from /usr/lib/libcrypto.so.1.0.0
No symbol table info available.
#1  0x00007ffff74f087d in ?? () from /usr/lib/libtorrent.so.14
No symbol table info available.
#2  0x00007ffff74d49c8 in ?? () from /usr/lib/libtorrent.so.14
No symbol table info available.
#3  0x00007ffff74d5e0f in ?? () from /usr/lib/libtorrent.so.14
No symbol table info available.
#4  0x00007ffff74786b4 in torrent::PollEPoll::perform() ()
   from /usr/lib/libtorrent.so.14
No symbol table info available.
#5  0x00000000004b067c in ?? ()
No symbol table info available.
#6  0x0000000000410f1a in ?? ()
No symbol table info available.
#7  0x00007ffff6295455 in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#8  0x0000000000411555 in ?? ()
No symbol table info available.
#9  0x00007fffffffe618 in ?? ()
No symbol table info available.
#10 0x0000000000000000 in ?? ()
No symbol table info available.

- Vlavv.

Offline

#5 2012-04-09 17:34:25

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: rtorrent - segmentation fault on startup

You should report this problem to the developer.

To get debug symbols you can use the abs PKGBUILD and add those yourself.

On the other hand, try an AUR version, such as rtorrent-color, and see if it too crashes.

Offline

#6 2012-04-09 18:32:47

Vlavv
Member
Registered: 2012-04-09
Posts: 9

Re: rtorrent - segmentation fault on startup

Indeed. The reason I reported this here instead of the rtorrent bugtracker is that I'm pretty sure the problem comes from my system, not the rtorrent package. I'll try again with the AUR package and the debug info.

Cheers.

Offline

#7 2012-04-09 19:46:51

Vlavv
Member
Registered: 2012-04-09
Posts: 9

Re: rtorrent - segmentation fault on startup

I couldn't get more info from gdb, but I tracked the problem down to 3 specific torrents (on the 23 I had), which crash rtorrent every time they're read. My problem can be considered fixed, I'll test those torrents on other machines and post if I find anything interesting. Thanks for the advices.

Cheers.

Offline

#8 2012-04-12 17:37:03

pyroscope
Member
Registered: 2011-03-11
Posts: 33
Website

Re: rtorrent - segmentation fault on startup

Interesting. If you post the "lstor --raw" output of one of them, this might shed some light on the cause (with anything sensitive x-ed out).

=> http://code.google.com/p/pyroscope/wiki … ools#lstor

Offline

#9 2012-04-12 18:28:31

Vlavv
Member
Registered: 2012-04-09
Posts: 9

Re: rtorrent - segmentation fault on startup

Hi,
Thanks for the advice. My problem may be more complex than what I said in my last post, since even after removing the 3 (seemingly) faulty torrents, I still get crashes at least once a day.
Anyway, I tried using your tool (installing it from AUR), but I'm getting the following error:

  File "/usr/bin/lstor", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2711, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 690, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pyrobase>=0.2

I wish I could check if my file system (simfs) isn't somewhat corrupted, but I found no relevant tools. The back-story is, OVH brutally shut my server down some weeks ago after they detected a hack attempt. They later realized it was a mistake, and quickly brought it back. I've been having those problems since then. Maybe it's just the fact it rebooted after months of updates that screwed something up, I don't really know.
Cheers.

Offline

#10 2012-05-02 11:35:39

Vlavv
Member
Registered: 2012-04-09
Posts: 9

Re: rtorrent - segmentation fault on startup

Hey,

Good news, I think I figured it out. I had a clear hint yesterday when I tried to use the scp command and got a "PRNG not seeded" error. After some research I noticed that my /dev/urandom looked very weird, and my /dev/random didn't exist at all. I deleted the former, and recreated both with the following commands:

mknod /dev/random c 1 8
mknod /dev/urandom c 1 9

Now rtorrent has been running flawlessly for almost a day, even after re-including the torrents that made me constantly crash. I guess that libcrypto was sometimes requesting random numbers, and getting something unexpected, hence the seg fault.

Thanks for the answers. Cheers,

Vlavv.

Last edited by Vlavv (2012-05-02 11:36:42)

Offline

#11 2013-06-21 15:35:49

kosme
Member
Registered: 2013-06-21
Posts: 1

Re: rtorrent - segmentation fault on startup

Had same problem. Solved it deleting the contents of the session folder. All the torrents were re-hashed and the problem disappeared. Just make sure to have all the .torrent files or the magnet links for your torrents since you will need them to re-add the torrents to rtorrent.

THIS WILL DESTROY ALL THE RATIO STATISTICS AND RESET THEM TO ZERO.

Offline

#12 2013-06-21 16:57:01

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: rtorrent - segmentation fault on startup

kosme, this thread is more than a year old. Highly unlikely that the OP is still looking for answers. Also, us being rolling release and all that, things change quite frequently and what you are seeing might not be related. That is why we have a policy against necrobumping threads.


https://wiki.archlinux.org/index.php/Fo … Bumping.22


Closing...


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB