Ticket #926 (closed defect: worksforme)

Opened 5 years ago

Last modified 13 months ago

[gcc-4.2.0] rtorrent segfaults on start

Reported by: Peter Alfredsen <peter.alfredsen@gmail.com> Owned by: rakshasa
Priority: normal 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 Download (22.8 KB) - added by Peter Alfredsen <peter.alfredsen@gmail.com> 5 years ago.
output of "strace rtorrent"

Change History

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

output of "strace rtorrent"

  Changed 5 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 5 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 5 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 5 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 5 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 5 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 +++

  Changed 19 months ago by jessie

Well, thanks for sharing the code, I appreciate it very much!  http://www.modsaunas.com/Double-Bathroom-Vanities.html

  Changed 18 months ago by anonymous

Many people love to travel and they do it annually either by themselves or with company. If you're going, I suggest to do it with your friends to reduce the cost throughout the journey. swmming pool pump ,  http://www.esleepmasters.com/Pool_Pumps_and_Filters_s/2425.htm , NotAlink

  Changed 15 months ago by WhiteMelon

Having my own businee is what I want. Since I was akid I have a dream to have my own restaurant.  free business listings

  Changed 15 months ago by anonymous

On viewing a video on video search  http://www.tubehome.com I'm surprised to hear that the min and max operators were removed, as I didn't use them enough to know they were deprecated, but still find them useful. If anybody's wondering after reading the changes description, their replacements are std::min and std::max which you can get from <algorithm> and are implemented as templated inline const functions. Now all I'm waiting for is -wno-newline-at-eof or whatever they want to call it...

  Changed 13 months ago by anonymous

Hua 110107Going to an amusement classic short uggs park or ball game, watching a movie or television, are fun activities that help us relax, temporarily forget our problems and maybe even laugh. But they do not bring happiness, because their ugg bailey button boots positive effects end when the fun ends.  http://www.fitflopinuk.com/

Note: See TracTickets for help on using tickets.