Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtorrent: Caught Segmentation fault #1403

Open
perfect7gentleman opened this issue Feb 13, 2025 · 6 comments
Open

rtorrent: Caught Segmentation fault #1403

perfect7gentleman opened this issue Feb 13, 2025 · 6 comments

Comments

@perfect7gentleman
Copy link

 ~ $ rtorrent 
Caught Segmentation fault, dumping stack:
rtorrent(+0x4e683) [0x55a879a6c683]
/usr/lib64/libc.so.6(+0x3ea70) [0x7f319bb86a70]
/usr/lib64/libtorrent.so.23(+0x9ac38) [0x7f319c066c38]
/usr/lib64/libtorrent.so.23(+0x2b552) [0x7f319bff7552]
rtorrent(+0x54a15) [0x55a879a72a15]
rtorrent(+0x4f490) [0x55a879a6d490]
rtorrent(+0x49010) [0x55a879a67010]
/usr/lib64/libtorrent.so.23(_ZN7torrent11thread_base10event_loopEPS0_+0x10e) [0x7f319c03892e]
rtorrent(+0x459e6) [0x55a879a639e6]
/usr/lib64/libc.so.6(+0x25b07) [0x7f319bb6db07]
/usr/lib64/libc.so.6(__libc_start_main+0x85) [0x7f319bb6dbc5]
rtorrent(+0x47e51) [0x55a879a65e51]
Aborted
net-libs/libtorrent-9999-r1::pg_overlay was built with the following:
USE="ssl -debug"

net-p2p/rtorrent-9999-r1::pg_overlay was built with the following:
USE="xmlrpc -debug (-selinux) -test"
CFLAGS="-march=native -mtune=native -O3 -pipe -fdevirtualize-at-ltrans -fgraphite -fgraphite-identity -fipa-pta -flto=3 -flto-compression-level=19 -floop-nest-optimize -floop-parallelize-all -fomit-frame-pointer -fsched-pressure -ftree-vectorize -fuse-linker-plugin -fuse-ld=bfd -fno-asynchronous-unwind-tables -fno-fat-lto-objects -fno-plt -fno-semantic-interposition -fno-stack-protector -s -g0 -w"
@rakshasa
Copy link
Owner

Compile with --debug and run it under gdb/lldb and get a backtrace.

@perfect7gentleman
Copy link
Author

Reading symbols from rtorrent...
(gdb) run
Starting program: /usr/bin/rtorrent 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
[New Thread 0x7ffff68506c0 (LWP 4503)]
[Detaching after fork from child process 4504]
[New Thread 0x7ffff54eb6c0 (LWP 4506)]
[Detaching after fork from child process 4507]

Thread 1 "rtorrent main" received signal SIGSEGV, Segmentation fault.
torrent::DownloadWrapper::~DownloadWrapper (this=<optimized out>, this=<optimized out>) at download/download_wrapper.cc:59
warning: 59     download/download_wrapper.cc: No such file or directory
(gdb) bt
#0  torrent::DownloadWrapper::~DownloadWrapper (this=<optimized out>, this=<optimized out>) at download/download_wrapper.cc:59
#1  0x00007ffff7d84652 in std::default_delete<torrent::DownloadWrapper>::operator() (this=<optimized out>, __ptr=0x5555708f1300)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:87
#2  std::unique_ptr<torrent::DownloadWrapper, std::default_delete<torrent::DownloadWrapper> >::~unique_ptr (this=<optimized out>, this=<optimized out>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:399
#3  torrent::download_add (object=object@entry=0x5555708f3170) at torrent/torrent.cc:178
#4  0x00005555555a5b15 in core::DownloadList::create (this=<optimized out>, obj=0x5555708f3170, printLog=<optimized out>) at core/download_list.cc:126
#5  core::DownloadFactory::receive_success (this=this@entry=0x555555890130) at core/download_factory.cc:178
#6  0x00005555555a6ed0 in core::DownloadFactory::receive_loaded (this=0x555555890130) at core/download_factory.cc:163
#7  core::DownloadFactory::receive_load (this=0x555555890130) at core/download_factory.cc:154
#8  0x000055555559dfd0 in std::function<void()>::operator() (this=<optimized out>, this=<optimized out>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/std_function.h:591
#9  rak::priority_queue_perform (queue=0x5555556db7e0 <taskScheduler>, t=...) at ../rak/priority_queue_default.h:60
#10 client_perform () at /tmp/portage/net-p2p/rtorrent-9999-r1/work/rtorrent-9999/src/main.cc:181
#11 0x00007ffff7dc5d6e in std::function<void()>::operator() (this=<optimized out>, this=<optimized out>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/std_function.h:587
#12 torrent::thread_base::event_loop (thread=0x55555570cc90) at torrent/utils/thread_base.cc:110
#13 0x000055555559aa46 in main (argc=<optimized out>, argv=<optimized out>) at /tmp/portage/net-p2p/rtorrent-9999-r1/work/rtorrent-9999/src/main.cc:496

@allixx
Copy link

allixx commented Feb 15, 2025

@perfect7gentleman
Copy link
Author

Nope, CPU is old and doesn't support AVX.

@allixx
Copy link

allixx commented Feb 15, 2025

Have you tried building without mtune=native?

@perfect7gentleman
Copy link
Author

perfect7gentleman commented Feb 15, 2025

Nope, but 0.15.1 works fine with that option.

CFLAGS="-march=native -mtune=native -O3 -pipe -fdevirtualize-at-ltrans -fgraphite -fgraphite-identity -fipa-pta -flto=3 -flto-compression-level=19 -floop-nest-optimize -floop-parallelize-all -fomit-frame-pointer -fsched-pressure -ftree-vectorize -fuse-linker-plugin -fuse-ld=bfd -fno-asynchronous-unwind-tables -fno-fat-lto-objects -fno-plt -fno-semantic-interposition -fno-stack-protector -s -g0 -w"
net-libs/libtorrent-0.15.1::pg_overlay was built with the following:
USE="ssl -debug"

net-p2p/rtorrent-0.15.1::pg_overlay was built with the following:
USE="xmlrpc -debug (-selinux) -test"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants