Ticket #926 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

[gcc-4.2.0] rtorrent segfaults on start

Reported by: Peter Alfredsen <peter.alfredsen@gmail.com> Owned by: rakshasa
Priority: normal Milestone:
Component: rtorrent Version:
Severity: normal Keywords: gcc-4.2.0 segfault
Cc:

Description

Having recompiled my system with the new gcc-4.2.0 and glibc-2.6, I tried to run rtorrent. It segfaults: pa@loki ~/session $ rtorrent Caught Segmentation fault, dumping stack: 0 rtorrent [0x8058ff1] 1 rtorrent [0x806d6d9] 2 [0xffffe420] 3 [0x82e938e] 4 rtorrent [0x805877d] 5 /lib/libc.so.6(libc_start_main+0xe0) [0xb7a159d0] 6 rtorrent(_ZN7torrent18set_max_open_filesEj+0x89) [0x8051b01]

GDB backtrace: #0 0x082e938e in ?? () #1 0x082e67f8 in ?? () #2 0x080d559e in ?? () #3 0x08311868 in ?? () #4 0x000001b4 in ?? () #5 0x0805877d in main (argc=1, argv=0xbfb2dbd4) at ../rak/functional_fun.h:94 #6 0xb79a79d0 in libc_start_main (main=0x8058010 <main>, argc=1, ubp_av=0xbfb2dbd4, init=0x80d3f90 <libc_csu_init>,

fini=0x80d3f80 <libc_csu_fini>, rtld_fini=0xb7ef5150 <_dl_fini>, stack_end=0xbfb2dbcc) at libc-start.c:229

#7 0x08051b01 in _start ()

Attachments

rtorrent.strace (22.8 KB) - added by Peter Alfredsen <peter.alfredsen@gmail.com> 3 years ago.
output of "strace rtorrent"

Change History

Changed 3 years ago by Peter Alfredsen <peter.alfredsen@gmail.com>

output of "strace rtorrent"

  Changed 3 years ago by Peter Alfredsen <peter.alfredsen@gmail.com>

It may be related to this gcc-4.2.0 regression:
[4.2 regression] miscompilation of sigc++-2.0 based code with -fstrict-aliasing
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30252

  Changed 3 years ago by Peter Alfredsen <peter.alfredsen@gmail.com>

I just recompiled libtorrent/rtorrent with gcc-4.1.2 and it works fine. I think it's safe to say this is a gcc-4.2.0 issue.

  Changed 3 years ago by Peter Alfredsen <peter.alfredsen@gmail.com>

D'oh... Version: rtorrent 0.7.4 libtorrent 0.11.4 Gentoo Linux

follow-up: ↓ 5   Changed 3 years ago by rakshasa

  • status changed from new to closed
  • resolution set to worksforme

I think I'm going to close this as a problem with gcc-4.2.0. If you find a set of compile flags that gets it to work, I'll add it to the wiki. Else, there's not much I can do unless some fiddling with rtorrent's code fixes this problem.

in reply to: ↑ 4   Changed 3 years ago by anonymous

(informational:
There's bug on b.g.o about this:  https://bugs.gentoo.org/show_bug.cgi?id=179554)

Replying to rakshasa:

I think I'm going to close this as a problem with gcc-4.2.0. If you find a set of compile flags that gets it to work, I'll add it to the wiki. Else, there's not much I can do unless some fiddling with rtorrent's code fixes this problem.

Compiling with -fno-strict-aliasing fixed the problem.

  Changed 3 years ago by solstice

i got an "illegal instruction" error when compiling without -fno-strict-aliasing. I was not a segfault.

end of strace output is: [...] open("/home/solstice/.rtorrent/watch/*.torrent", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) --- SIGILL (Illegal instruction) @ 0 (0) --- +++ killed by SIGILL +++

Add/Change #926 ([gcc-4.2.0] rtorrent segfaults on start)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.