Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

rtorrent seg fault #24132

Closed
cschilbe opened this issue Nov 9, 2013 · 38 comments
Closed

rtorrent seg fault #24132

cschilbe opened this issue Nov 9, 2013 · 38 comments

Comments

@cschilbe
Copy link

cschilbe commented Nov 9, 2013

$ brew install rtorrent
==> Installing rtorrent dependency: libsigc++
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.bz2

################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/libsigc++/2.2.10
==> make
==> make check
==> make install
� /usr/local/Cellar/libsigc++/2.2.10: 564 files, 10M, built in 29 seconds
==> Installing rtorrent dependency: libtorrent
==> Downloading http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/libtorrent-0.13.3.tar.gz
==> ./configure --prefix=/usr/local/Cellar/libtorrent/0.13.3 --with-kqueue --enable-ipv6
==> make
==> make install
� /usr/local/Cellar/libtorrent/0.13.3: 69 files, 1.4M, built in 36 seconds
==> Installing rtorrent
==> Downloading http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/rtorrent-0.9.3.tar.gz
==> ./configure --prefix=/usr/local/Cellar/rtorrent/0.9.3
==> make
==> make install
� /usr/local/Cellar/rtorrent/0.9.3: 7 files, 2.2M, built in 35 seconds

$ rtorrent
Caught Segmentation fault, dumping stack:
0 rtorrent 0x0000000104af64c1 _Z8do_panici + 233
1 rtorrent 0x0000000104b35891 _ZN13SignalHandler6caughtEi + 59
2 libsystem_c.dylib 0x00007fff8740f90a _sigtramp + 26
3 ??? 0x00007fff6472dde0 0x0 + 140734878637536
4 rtorrent 0x0000000104b36670 _ZN12ThreadWorkerC1Ev + 14
5 rtorrent 0x0000000104af2f88 main + 865
6 libdyld.dylib 0x00007fff8d2557e1 start + 0
7 ??? 0x0000000000000001 0x0 + 1
Abort trap: 6

$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: 7fc8cc0
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.8.5-x86_64
Xcode: 5.0.1
CLT: 5.0.1.0.1.1377666378
LLVM-GCC: N/A
Clang: 5.0 build 500
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

@adamv
Copy link
Contributor

adamv commented Nov 9, 2013

Does using gdb get you any more information?

@cschilbe
Copy link
Author

cschilbe commented Nov 9, 2013

Like this?
$ gdb rtorrent
GNU gdb (GDB) 7.6.1
Reading symbols from /usr/local/Cellar/rtorrent/0.9.3/bin/rtorrent...(no debugging symbols found)...done.

@cschilbe
Copy link
Author

Does this help?

Starting program: /usr/local/bin/rtorrent

BFD: /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(i386:x86-64): unknown load command 0x20
[New Thread 0x1903 of process 38177]

Program received signal SIGSEGV, Segmentation fault.
0x0000000100044d25 in ThreadBase::ThreadBase() ()

@jacknagel
Copy link
Contributor

First you should brew update and then reinstall this stuff, your Homebrew is ~4 months old.

@cschilbe
Copy link
Author

I just installed it today. brew update said everything was up to date. Just did another update and took me from 0.9.4 to 0.9.5:
$ brew --config
HOMEBREW_VERSION: 0.9.5

@cschilbe
Copy link
Author

Same issue after update

@cschilbe
Copy link
Author

macports install worked. Let me know if there are any other details I can gather.

@adamv
Copy link
Contributor

adamv commented Nov 10, 2013

Which macports version did you install, 0.9.2 or 0.9.3-devel?

@adamv
Copy link
Contributor

adamv commented Nov 10, 2013

We went to 0.9.3 in #19199 but the homepage doesn't list it as a stable version; perhaps we should revert.

@cschilbe
Copy link
Author

macports installed 0.9.2 but I also tried installing that one with homebrew and had the same seg faults.

@ghost
Copy link

ghost commented Dec 20, 2013

This still occurs. I may have found a way that seems to work pretty often. If you source bashrc and then run rtorrent it seems to work.

$ source ~/.bashrc
$ rtorrent

Maybe it can help narrow down the problem?

@astrashe
Copy link

I have the same issue. I don't know how to use gdb, but I'm willing to follow instructions if anyone wants to tell me what to do.

Here's my homebrew setup:

$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 5be3c17
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.9.1-x86_64
Xcode: 5.0.2
CLT: 5.0.1.0.1.1382131676
GCC-4.2: build 5666
Clang: 5.0 build 500
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /Users/alex/.rvm/rubies/ruby-2.1.0/bin/ruby
Alexs-Mac-mini:Downloads alex$

Here's what I get when rtorrent crashes:

$ rtorrent ubuntu-13.10-desktop-amd64.iso.torrent
Caught Segmentation fault, dumping stack:
0 rtorrent 0x000000010db7f071 _Z8do_panici + 233
1 rtorrent 0x000000010dbbe591 _ZN13SignalHandler6caughtEi + 59
2 libsystem_platform.dylib 0x00007fff8aa3c5aa _sigtramp + 26
3 libncurses.5.4.dylib 0x00007fff92e82718 ncurses_5_4VersionNumber + 219782344
4 rtorrent 0x000000010dbbf370 _ZN12ThreadWorkerC1Ev + 14
5 rtorrent 0x000000010db7bb38 main + 865
6 libdyld.dylib 0x00007fff90c895fd start + 1
7 ??? 0x0000000000000002 0x0 + 2
Abort trap: 6

@jonhermansen
Copy link
Contributor

Still seeing this on completely up-to-date system. I ran under lldb, as gdb wasn't available.

[jon@lappy ~]$ lldb rtorrent
Current executable set to 'rtorrent' (x86_64).
(lldb) r
Process 22472 launched: '/usr/local/bin/rtorrent' (x86_64)
Process 22472 stopped
* thread #1: tid = 0xd6fdc, 0x0000000100048aff rtorrent`ThreadBase::ThreadBase() + 121, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x0000000100048aff rtorrent`ThreadBase::ThreadBase() + 121
rtorrent`ThreadBase::ThreadBase() + 121:
-> 0x100048aff:  vmovaps %ymm0, 0x160(%rax)
   0x100048b07:  vmovaps %ymm0, 0x140(%rax)
   0x100048b0f:  vmovaps %ymm0, 0x120(%rax)
   0x100048b17:  vmovaps %ymm0, 0x100(%rax)
(lldb)

This bug is probably a dupe of #25219

@astrashe
Copy link

I finally got rtorrent to work by building gcc 4.9 and using that to build rtorrent.

@adamv adamv self-assigned this May 2, 2014
@adamv adamv added the clang label May 2, 2014
@adamv adamv removed their assignment May 12, 2014
@adamv
Copy link
Contributor

adamv commented May 21, 2014

Some movement upstream: rakshasa/libtorrent#47

@mistydemeo
Copy link
Member

The C++11 branch is still not stable, and the diff is quite large. Sounds like it'll move closer to stability after the next stable release (which hasn't happened yet).

@adamv
Copy link
Contributor

adamv commented May 21, 2014

I updated rtorrent and libtorrent in #29460 and am able to launch rtorrent without a segfault, though I'm not testing its functionality.

@adamv
Copy link
Contributor

adamv commented May 21, 2014

Anyone still having this issue with clang, please brew update and try these new versions. Will close this shortly if there is no response.

If there are still problems, willing to add fails_with :clang until upstream fixes the issue.

@adamv adamv self-assigned this May 21, 2014
@ghost
Copy link

ghost commented May 21, 2014

I seem to still get segfaults with libtorrent 0.13.4, rtorrent 0.9.4.

On May 21, 2014, at 12:33 PM, Adam Vandenberg notifications@github.com wrote:

Anyone still having this issue with clang, please brew update and try these new versions. Will close this shortly if there is no response.

If there are still problems, willing to add fails_with :clang until upstream fixes the issue.


Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented May 22, 2014

Now it's worse-- downloading torrents causes a segfault in addition to random segfaults on launch.

@bconway
Copy link
Contributor

bconway commented May 23, 2014

Was working great on Mountain Lion previously, updated today and segfault on start.

@ghost
Copy link

ghost commented May 23, 2014

I reverted to previous version, at least only segfaults sometimes on start.

On May 22, 2014, at 7:44 PM, Brian Conway notifications@github.com wrote:

Was working great on Mountain Lion previously, updated today and segfault on start.


Reply to this email directly or view it on GitHub.

@bconway
Copy link
Contributor

bconway commented May 23, 2014

Rebuilt with today's update (sans libsigc++) and still segfaults on start with Mountain Lion.

@astrashe
Copy link

I built rtorrent with homebrew and gcc 4.9 and it's been rock solid on Mavericks. Would it be possible to change the formula so that it uses another compiler by default?

I know that's a huge dependency to introduce, but it does work.

@adamv
Copy link
Contributor

adamv commented May 23, 2014

Adding fails_with :clang gives me:

Warning: rtorrent dependency libtorrent was built with a different C++ standard
library (libstdc++ from clang). This could cause problems at runtime.

Though if this works when built with GCC I'll push a change to add that.

adamv added a commit that referenced this issue May 23, 2014
@bconway
Copy link
Contributor

bconway commented May 23, 2014

Thanks. New build starts on Mountain Lion okay, but immediately segfaults when trying to load a magnet link.

Making the same change as the commit above to libtorrent yielded a (thus far) stable rtorrent on Mountain Lion.

@ainstushar
Copy link

@adamv So does it mean that compiling libtorrent with gcc fixes all of the issues? Can you tell us how to do that? (not really a developer). I have installed gcc but I am not sure how to tell libtorrent to use gcc. :(

@adamv
Copy link
Contributor

adamv commented May 25, 2014

@ainstushar if you brew update, then brew rm libtorrent rtorrent and reinstall, it will build in a way that @bconway reports as working so far.

@adamv adamv removed their assignment May 25, 2014
@ainstushar
Copy link

@adamv Perfect! It works exactly as it should. Thanks for pushing out updated formula for libtorrent.

@adamv
Copy link
Contributor

adamv commented May 25, 2014

Provisionally calling this fixed for now.

@adamv adamv closed this as completed May 25, 2014
@bconway
Copy link
Contributor

bconway commented May 29, 2014

All's working here, thanks.

@ainstushar
Copy link

Looks like this issue is back. Upon installing rtorrent 0.9.4 and libtorrent 0.13.4 (mavericks), it gives this warning:

Warning: rtorrent dependency libtorrent was built with a different C++ standard
library (libstdc++ from gcc-4.8). This could cause problems at runtime.

and upon running rtorrent, I get:

dyld: Symbol not found: __ZNSt3tr18__detail12__prime_listE
  Referenced from: /usr/local/lib/libtorrent.18.dylib
  Expected in: /usr/lib/libstdc++.6.dylib
 in /usr/local/lib/libtorrent.18.dylib
Trace/BPT trap: 5

Any tips on fixing this?

@bconway
Copy link
Contributor

bconway commented Aug 5, 2014

I ran into the same thing this week with upgrading to Mavericks. It'll fix itself if you do:

brew reinstall libtorrent --build-from-source

In this case, I think the issue is that the Mavericks bottle for libtorrent is bogus, but it's the default install.

@ainstushar
Copy link

Yep. Works great now. :)

@ghost
Copy link

ghost commented Aug 6, 2014

I can no longer install rtorrent. I am on Yosemite now. I get the error "couldn't understand kern.osversion `14.0.0'".

@zg
Copy link

zg commented Oct 5, 2014

I was having the same issue on Mavericks and went with what @bconway most recent post, and now rtorrent works.

Thank you!

@mrknmc
Copy link

mrknmc commented Oct 27, 2014

Just thought I'd add to this, the following combination of both suggestions here worked for me on Yosemite:

brew reinstall libtorrent --build-from-source --cc=gcc-4.9
brew install rtorrent --cc=gcc-4.9
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 8b14b3ca06a8f19339ea28d8c9365929083c54b5
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.10-x86_64
Xcode: 6.1
CLT: 6.1.0.0.1.1413057044
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
GCC-4.2: build 0
Clang: 6.0 build 600
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.1.3_1/bin/ruby

@workmanw
Copy link

I recently had this problem and the solution was a combination of things listed here.

First I had to do:

brew update
brew rm libtorrent rtorrent

Then:

brew reinstall libtorrent --build-from-source --cc=gcc-4.9
brew install rtorrent --cc=gcc-4.9

Simply doing the later without the former did not fix my problem. I don't know why, but it didn't. Anyways, just commenting in hopes that it might help someone else.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests