Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
qbittorrent inexplicably crashing
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Mon Jan 24, 2022 4:25 am    Post subject: qbittorrent inexplicably crashing Reply with quote

Hi folks,

I am trying to run qbittorrent without crashing. It used to work fine then (maybe because of an upgrade?) it started segmentation faulting. The stable version 4.3.8 was crashing with an error:

Code:
Caught signal: SIGSEGV
Stack trace:
  /usr/lib64/libtorrent-rasterbar.so.2.0 : ()+0x129393  [0x7fd426711393]
  /usr/lib64/libtorrent-rasterbar.so.2.0 : ()+0x15047a  [0x7fd42673847a]
  /usr/lib64/libtorrent-rasterbar.so.2.0 : ()+0x1510c6  [0x7fd4267390c6]
  /usr/lib64/libtorrent-rasterbar.so.2.0 : ()+0xe200f  [0x7fd4266ca00f]
  /usr/lib64/libtorrent-rasterbar.so.2.0 : ()+0x243e31  [0x7fd42682be31]
  /usr/lib64/libtorrent-rasterbar.so.2.0 : ()+0x240f2e  [0x7fd426828f2e]
  /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/libstdc++.so.6 : ()+0xd5f24  [0x7fd424de5f24]
  /lib64/libpthread.so.0 : ()+0x7d16  [0x7fd42630fd16]
  /lib64/libc.so.6 : clone()+0x3f  [0x7fd424af6c4f]
Segmentation fault


I tried different combinations of re-building libtorrent-rasterbar and also qbittorrent itself (even 'emerge -e qbittorrent') with varying degrees of success but ultimately nothing fixed it. I then upgraded to the unstable 4.3.9 and the stability (ironic) is better but it still did crash (twice so far). The error in this version just says "Segmentation Fault" with no other message.

I should point out that I also get a warning when starting up:

Code:
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile


But I don't think that's causing the segfault. Any ideas?

dq
Back to top
View user's profile Send private message
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Mon Jan 31, 2022 8:25 pm    Post subject: Reply with quote

just to confirm, have you tried
Code:
CFLAGS="-O2 -pipe -march=native" emerge qbittorrent libtorrent-rasterbar
most times I had segfaults it came from "over-optimized binaries which crash into segfaults much faster than regular ones" which were artfully crafted by myself. Sometimes programs and libraries did tend to be quite sensitive to LTO.
Which CFLAGS/CXXFLAGS are you using?
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Wed Feb 02, 2022 3:44 pm    Post subject: Reply with quote

Those are the CFLAGS/CXXFLAGS I'm using for my entire gentoo build. Should I try something else more conservative?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Wed Feb 02, 2022 4:29 pm    Post subject: Reply with quote

Those are generally considered to be conservative already. Please rebuild the affected packages with debug symbols, reproduce the crash, and inspect the resulting core file. We want a backtrace, and possibly register context.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Sat Feb 05, 2022 4:09 am    Post subject: Reply with quote

I rebuilt it with debug this time. The error messages I received entailed this:

Code:
Saving resume data is requested for torrent <torrent name>


And it repeated for every torrent. Unfortunately the scrollback in the shell window was not unlimited so I could only see 5000 lines of the same error message. I've changed it to unlimited this time.

But does this provide a clue to anything?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Sat Feb 05, 2022 4:36 am    Post subject: Reply with quote

That does not read like an error message to me.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Sat Feb 05, 2022 9:53 am    Post subject: Reply with quote

USE=debug does not add debug symbols and is not advised to enable for reproducing crashes for backtraces.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Sat Feb 05, 2022 2:24 pm    Post subject: Reply with quote

Sorry, I guess I don't now how to do this. Is this what you're referring to?

https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Sat Feb 05, 2022 5:01 pm    Post subject: Reply with quote

Yes.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Mon Feb 07, 2022 4:36 am    Post subject: Reply with quote

Alright, I think I did what I needed to do although, I must say, the QA article wasn't the easiest to parse. I added -ggdb to the make.conf COMMON_FLAGS and added 'splitdebug' into the FEATURES. Then I rebuilt portage.

Do I need to rebuild world or can I just rebuild qbittorrent?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Mon Feb 07, 2022 5:01 pm    Post subject: Reply with quote

You did not need to rebuild Portage. You need to rebuild packages which contain shared objects that are present in the stacktrace. Going with the non-symbolic stack trace shown earlier in the thread, that would mean at least the package which provides libtorrent-rasterbar.so.2.0. Since it has several frames in a row, and they are all on the near side, rebuilding that will likely be sufficient, without touching other packages.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Wed Feb 16, 2022 3:34 pm    Post subject: Reply with quote

So I finally got a crash (it has been more stable lately for some reason). The output of the backtrace (if I did it correctly) is located here.

Does it reveal any clues?

Thanks!

dq
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Wed Feb 16, 2022 4:20 pm    Post subject: Reply with quote

For someone familiar with this program, maybe. I am not familiar with this program, though. None of the shown addresses look obviously wrong, so my first guess would be a use-after-free.

Your output looks like I would expect from following the instructions correctly. I think now you need to find someone who knows enough to interpret what you have caught.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Wed Feb 16, 2022 8:12 pm    Post subject: Reply with quote

I didn't know what "Use-After-Free" was but I looked it up. Are you saying that you think maybe someone's trying to hack into my system using this exploit?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Wed Feb 16, 2022 8:24 pm    Post subject: Reply with quote

don quixada wrote:
I didn't know what "Use-After-Free" was but I looked it up. Are you saying that you think maybe someone's trying to hack into my system using this exploit?


He means it's possibly a programming problem, ie the code itself.

What version of boost and libtorrent-rasterbar do you have, and which version of qt?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Wed Feb 16, 2022 8:46 pm    Post subject: Reply with quote

net-libs/libtorrent-rasterbar-2.0.5

Code:
# qmake --version
QMake version 3.1
Using Qt version 5.15.2 in /usr/lib64
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Wed Feb 16, 2022 10:32 pm    Post subject: Reply with quote

Although use-after-free is used in some exploits, it can also occur accidentally in a buggy program that nobody is intentionally trying to break. A use-after-free does not imply that anyone is out to get you.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Tue Feb 22, 2022 3:59 am    Post subject: Reply with quote

Should I post a bug report? A gentoo-specific bug or a qbittorrent bug?
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Sun Apr 17, 2022 3:48 pm    Post subject: Reply with quote

This rasterbar issue is driving me crazy! Is there nothing that can be done?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21595

PostPosted: Sun Apr 17, 2022 4:19 pm    Post subject: Reply with quote

It seems no one in this thread has further advice for you. Filing a bug report would be the next step.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Mon Apr 18, 2022 3:37 am    Post subject: Reply with quote

Happy to. To where should I submit the report. Do you think this is a Gentoo issue or a KDE issue or something else?
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Fri May 13, 2022 6:09 pm    Post subject: Reply with quote

Hi folks,

So I created a bug report here. But the maintainer is having trouble parsing it as he says he cannot find the Seg Fault. I'm just outputting the core dump from gdb. Am I not getting the correct info from gdb? I followed the instructions to the letter to get verbose, multi-threaded info.

Any suggestions would be appreciated. Thank you.

dq
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Tue Jul 26, 2022 9:06 pm    Post subject: Reply with quote

Ok so I had a temporary work-around when I installed deluge, it installed libtorrent-rasterbar-1.2.15 in another slot (see the bug report). When it did that, suddenly the problems with qbittorrent crashing went away!

Unfortunately, after an extensive python overhaul upgrade to 3.10, I lost this library and can't seem to get it back.

Is there a way to force a downgrade of libtorrent-rasterbar-2.0.6 to libtorrent-rasterbar-1.2.15?

Before you ask, I already masked the 2.0.6 version and it seems that there aren't versions anymore available in the repo... and the unstable 2.0.7 exhibits the exact same crashing behavior.
Back to top
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 472
Location: Brisbane, Australia

PostPosted: Wed Jul 27, 2022 10:38 am    Post subject: Reply with quote

Try net-p2p/transmission. Does not use rasterbar.
_________________
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 790

PostPosted: Wed Jul 27, 2022 3:42 pm    Post subject: Reply with quote

I'd prefer not to switch to another client. This would be a significant effort. If I can use the old library that would be best.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum