Bug 32173

Summary: qbittorrent crash
Product: Mageia Reporter: Mészáros Csaba <csablak>
Component: RPM PackagesAssignee: Stig-Ørjan Smelror <smelror>
Status: NEW --- QA Contact:
Severity: critical    
Priority: Normal CC: csablak, davidwhodgins, fri
Version: 8   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: qbittorrent-4.5.3-1.mga8 CVE:
Status comment:
Attachments: segfault txt

Description Mészáros Csaba 2023-08-13 10:26:51 CEST
Unfortunately, I don't even know since which update, but qBittorrent doesn't work, but crashes with a segfault. :(

*************************************************************
Please file a bug report at http://bug.qbittorrent.org and provide the following information:

qBittorrent version: v4.5.3

Caught signal: SIGSEGV
```
 0# getStacktrace[abi:cxx11]() in qbittorrent
 1# 0x0000000000564541 in qbittorrent
 2# 0x00007FD52AB05510 in /lib64/libc.so.6
 3# BitTorrent::TorrentImpl::refreshTrackerEntries() const in qbittorrent
 4# non-virtual thunk to BitTorrent::TorrentImpl::trackers() const in qbittorrent
 5# TrackerFiltersList::handleTrackerEntriesUpdated(QHash<BitTorrent::Torrent*, QSet<QString> > const&) in qbittorrent
 6# 0x00007FD52B2B2A24 in /lib64/libQt5Core.so.5
 7# BitTorrent::Session::trackerEntriesUpdated(QHash<BitTorrent::Torrent*, QSet<QString> > const&) in qbittorrent
 8# BitTorrent::SessionImpl::processTrackerStatuses() in qbittorrent
 9# BitTorrent::SessionImpl::readAlerts() in qbittorrent
10# QObject::event(QEvent*) in /lib64/libQt5Core.so.5
11# QApplicationPrivate::notify_helper(QObject*, QEvent*) in /lib64/libQt5Widgets.so.5
12# QCoreApplication::notifyInternal2(QObject*, QEvent*) in /lib64/libQt5Core.so.5
13# QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) in /lib64/libQt5Core.so.5
14# 0x00007FD52B2D30F3 in /lib64/libQt5Core.so.5
15# g_main_context_dispatch in /lib64/libglib-2.0.so.0
16# 0x00007FD529FAED48 in /lib64/libglib-2.0.so.0
17# g_main_context_iteration in /lib64/libglib-2.0.so.0
18# QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) in /lib64/libQt5Core.so.5
19# QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) in /lib64/libQt5Core.so.5
20# QCoreApplication::exec() in /lib64/libQt5Core.so.5
21# Application::exec(QStringList const&) in qbittorrent
22# main in qbittorrent
23# __libc_start_main in /lib64/libc.so.6
24# _start in qbittorrent
```

Szegmentálási hiba (core készült)
Mészáros Csaba 2023-08-13 10:27:05 CEST

CC: (none) => csablak

Comment 1 Dave Hodgins 2023-08-13 19:51:13 CEST
I can't recreate the problem. qbittorrent runs ok on my x86_64 system,
currently running kde plasma.

$ ll /lib64/libQt5Core*
lrwxrwxrwx 1 root root      20 May 22 09:56 /lib64/libQt5Core.so.5 -> libQt5Core.so.5.15.2*
lrwxrwxrwx 1 root root      20 May 22 09:56 /lib64/libQt5Core.so.5.15 -> libQt5Core.so.5.15.2*
-rwxr-xr-x 1 root root 5815464 May 22 10:08 /lib64/libQt5Core.so.5.15.2*

$ ll /lib64/libglib-*
lrwxrwxrwx 1 root root      16 May 11 08:08 /lib64/libglib-2.0.so -> libglib-2.0.so.0*
lrwxrwxrwx 1 root root      23 May 11 08:08 /lib64/libglib-2.0.so.0 -> libglib-2.0.so.0.6600.8*
-rwxr-xr-x 1 root root 1250880 May 11 08:11 /lib64/libglib-2.0.so.0.6600.8*

$ ll /lib64/libc.*
-rw-r--r-- 1 root root 253 Nov 25  2022 /lib64/libc.so
lrwxrwxrwx 1 root root  12 Nov 25  2022 /lib64/libc.so.6 -> libc-2.32.so*

CC: (none) => davidwhodgins

Comment 2 Lewis Smith 2023-08-13 22:02:45 CEST
Mageia 8, Xfce, not with latest updates, but I installed:
 qbittorrent-4.5.3-1.mga8   (which is the up-to-date version)

$ qbittorrent
 It strated with its warning about being a sharing application, dismissing that displayed its correct GUI. Closing that left it in Systry; closing that returned to the command prompt with no error from the application:
$

So here, it does not crash. 
I have just applied the pending M8 updates, without a re-boot; qbittorrent still works OK.
I will only add to this if qbittorrent's behaviour changes after a re-boot.

CC: (none) => lewyssmith
Ever confirmed: 1 => 0
Status: NEW => UNCONFIRMED

Comment 3 Mészáros Csaba 2023-08-14 20:23:17 CEST
Well. Let's see then.

$ ll /lib64/libQt5Core*
lrwxrwxrwx 1 root root      20 máj   22 15:56 /lib64/libQt5Core.so.5 -> libQt5Core.so.5.15.2*
lrwxrwxrwx 1 root root      20 máj   22 15:56 /lib64/libQt5Core.so.5.15 -> libQt5Core.so.5.15.2*
-rwxr-xr-x 1 root root 5815464 máj   22 16:08 /lib64/libQt5Core.so.5.15.2*

$ ll /lib64/libglib-*
lrwxrwxrwx 1 root root      16 máj   11 14:08 /lib64/libglib-2.0.so -> libglib-2.0.so.0*
lrwxrwxrwx 1 root root      23 máj   11 14:08 /lib64/libglib-2.0.so.0 -> libglib-2.0.so.0.6600.8*
-rwxr-xr-x 1 root root 1250880 máj   11 14:11 /lib64/libglib-2.0.so.0.6600.8*

$ ll /lib64/libc.*
-rw-r--r-- 1 root root 253 nov   25  2022 /lib64/libc.so
lrwxrwxrwx 1 root root  12 nov   25  2022 /lib64/libc.so.6 -> libc-2.32.so*

This seems to be the same as yours.

As long as I start it smoothly, there is no problem. I set the paths, port, exit, reboot and no problem.
It is as soon as I add a torrent or more. Sometimes he throws himself at the first one, but sometimes only at the second one.

I searched but couldn't find Mageia 8 torrent on the official site. That's why I took it from here:
https://fosstorrents.com/distributions/mageia/#downloads

If I delete everything
.config/qBittorrent
.local/share/data/qBittorrent
.local/share/qBittorrent

And now use the default settings and manually add a previously downloaded torrent file, then it works. If I give it more it still works.
Now I exit and delete everything again and restart, then set my own final alternative paths and port.
I start it and it works. Now, use a file manager to drop a torrent file into the directory monitored by qBittorrent.
And he flew away.
Now I don't change anything and reboot. It is working and has started downloading. OK, let's throw in another torrent file. He took off again.
Reboot and it can't handle it. Do not starts. He fouled immediately.

Will the alternative paths not work for him? The only thing that is interesting is that it detects the paths because it loaded the torrent, but immediately failed.
Now I start over and give him a paths that is in English and does not have a Hungarian accent. I leave the port.
He flies away. Maybe have paths problems? I have been using this paths for years and have had no problems with it.

Alternative paths settings here:

from /$HOME/.config/qBittorrent/qBittorrent.conf 
[BitTorrent]
Session\DefaultSavePath=/mnt/egyebek/Downloads/qbTorrents/full
Session\FinishedTorrentExportDirectory=/mnt/egyebek/Downloads/qbTorrents/save
Session\Port=54478
Session\QueueingSystemEnabled=false
Session\TempPath=/mnt/egyebek/Downloads/qbTorrents/temp
Session\TempPathEnabled=true
Session\TorrentExportDirectory=/mnt/egyebek/Downloads/qbTorrents/loaded

[Preferences]
Downloads\ScanDirsLastPath=/mnt/egyebek/Downloads/qbTorrents
Comment 4 Dave Hodgins 2023-08-14 21:31:33 CEST
Assigning to the registered maintainer.

One question from the above. How is /mnt/egyebek mounted? fstab? Also are you
using autologin to start the desktop environment?

I'm just wondering if /mnt/egyebek/Downloads/qbTorrents might not always
become available soon enough during the boot/login.

Assignee: bugsquad => matteo.pasotti

Comment 5 Mészáros Csaba 2023-08-15 19:20:05 CEST
There is a system SDD and a data HDD.

from fstab:

# Entry for Crucial SSD /dev/sda5 : Mageia 8
UUID=blabla-b6d3-4682-8a92-3d02cc973cb2 / ext4 defaults,noatime 0 1

# Entry for Toshiba HDD /dev/sdc7 : Egyebek
UUID=blabla-3d5d-42da-a817-18d501f0b031 /mnt/egyebek ext4 defaults,relatime 0 2

No autologin. I always enter the password.
The desktop wallpaper is loaded from the HDD. If there was a problem, I wouldn't even see the picture.
Comment 6 Lewis Smith 2023-08-15 20:50:46 CEST
Well, thank you Csaba for your detailed tests in coment 3.
Trying to note what exactly causes the application to crash, it looks something like adding a torrent - particularly a second one; or having more than one torrent going on startup.
Although Mageia 9 has v4.5.4 (mid June), this M8 v4.5.3 is also very recent (end May).
qbittorrent has been version updated several times this year. Has the application ever worked for you? Your comment 0 suggests that these crashes followed an update. Is it possible they started in June (when 4.5.3 happened)?

It might be worth downgrading to an earlier version to see whether that changes anything.
 $ urpmq -i qbittorrent
should list earlier versions, ending with the most recent.
Something like (you have to specify the exact package version):
 # urpmi --downgrade qbittorrent-4.5.x-1.mga8
Comment 7 Mészáros Csaba 2023-08-16 19:00:25 CEST
Hi guys!

It works smoothly with 4.3.2. I made a screenshot of the settings. Then he offered to upgrade. OK. I took a screenshot there as well, and there is a fundamental difference with the monitored directory.

A small menu appears with the old one, which is missing with the new one.
https://drive.google.com/file/d/1x6QF1VCGqRakiwBTKHj0tJA-riJYAdZj/view?usp=drive_link 
https://drive.google.com/file/d/1dS4sw4-d_BtXu62tcLX8EXMVeh40VsCQ/view?usp=drive_link
Comment 8 Lewis Smith 2023-08-17 20:02:47 CEST
Thank you for this new & helpful information.
It will be intersting to see whether it works OK on Mageia 9.
Re-assigning this to Stig who currently nurses this pkg.

CC: lewyssmith => (none)
Assignee: matteo.pasotti => smelror

Lewis Smith 2023-08-17 20:03:12 CEST

Status: UNCONFIRMED => NEW
Ever confirmed: 0 => 1

Comment 9 Stig-Ørjan Smelror 2023-08-17 21:11:24 CEST
(In reply to Mészáros Csaba from comment #7)
> Hi guys!
> 
> It works smoothly with 4.3.2. I made a screenshot of the settings. Then he
> offered to upgrade. OK. I took a screenshot there as well, and there is a
> fundamental difference with the monitored directory.
> 
> A small menu appears with the old one, which is missing with the new one.
> https://drive.google.com/file/d/1x6QF1VCGqRakiwBTKHj0tJA-riJYAdZj/
> view?usp=drive_link 
> https://drive.google.com/file/d/1dS4sw4-d_BtXu62tcLX8EXMVeh40VsCQ/
> view?usp=drive_link

Hi.

I've compiled version 4.5.4 for Mageia 8. Can you give it a try to see if it works any better?

You can download it from my server: https://kekepower.com/qbt/

The changelog doesn't say much... https://www.qbittorrent.org/news
Comment 10 Mészáros Csaba 2023-08-18 16:27:37 CEST
Created attachment 13942 [details]
segfault txt
Comment 11 Mészáros Csaba 2023-08-18 16:28:49 CEST
However, I also thought that maybe it was the length of the number of characters. It's silly though. Try it every night by me anyway. In fact, only in my own folder on the system disk.
Finally, I created a log with a strace -p PID number. If it helps.
The PID number was the number of the currently running qbittorrent.
Comment 12 Stig-Ørjan Smelror 2023-08-18 16:47:58 CEST
Thanks.

Are you using version 4.5.3 or version 4.5.4 that I compiled for you?

Couldn't see anything specific in the attached file, but I saw a SIGSEV and after searching a bit around, it may be caused by a lot of different things.

Can you please keep your log open during a crash (# journalctl -f) and/or dmesg to see if anything pops up there that may give us a clue?

Also, though it may be rare, there could be a hardware issue like faulty RAM or motherboard components in addition to, what is called, dirty power (meaning that the power fluctuates so that it makes the whole computer unstable).

In very rare cases it could be a faulty CPU or over heating that may cause this.

Are you able to run a memory test on your system?

Thank you.
Comment 13 Mészáros Csaba 2023-08-18 16:57:12 CEST
$ sensors
atk0110-acpi-0
Adapter: ACPI interface
Vcore Voltage:       1.17 V  (min =  +0.80 V, max =  +1.80 V)
 +3.3 Voltage:       3.12 V  (min =  +2.97 V, max =  +3.63 V)
 +5 Voltage:         4.81 V  (min =  +4.50 V, max =  +5.50 V)
 +12 Voltage:       12.22 V  (min = +10.20 V, max = +13.80 V)
CPU FAN Speed:     3276 RPM  (min =  600 RPM, max = 7200 RPM)
CHASSIS FAN Speed: 4963 RPM  (min = 1200 RPM, max = 7200 RPM)
CPU Temperature:    +50.0°C  (high = +60.0°C, crit = +95.0°C)
MB Temperature:     +40.0°C  (high = +45.0°C, crit = +95.0°C)

$ qbittorrent -v
qBittorrent v4.5.4


unfortunately, the dmesget is full of garbage by the firewall. And so far no one has been able to find a normal solution for it.

A # jourmactl -f nem jelentett semmit. Oops. it meant nothing.

I will test the memory soon. The machine and all programs are atomically stable. In fact, the previous version 4.3.2 also works great.
Comment 14 Morgan Leijström 2023-08-18 17:26:26 CEST
Is this tested yet on mga9?

Maybe you Mészáros can make a Mageia 9 Live USB with persistence and see if yo can replicate the problem?

CC: (none) => fri

Comment 15 Mészáros Csaba 2023-08-18 18:31:00 CEST
Memory test ran without error.
For now, my primary system is Mageia 8 KDE. I don't know when Mageia 9 will be the final release.
I also tried qbittorrent 4.5.4 on icewm, but it crashed there too.
Mageia 9 is installed on another partition with xfce. Tested there with version 4.5.4 there were no problems.
Comment 16 Dave Hodgins 2023-08-18 18:38:22 CEST
To remove the messages from the terminal and dmesg add a file with ...
# cat /etc/sysctl.d/kernel.msg.conf 
kernel.printk=3 4 1 3

Then reboot.
Comment 17 Morgan Leijström 2023-08-18 19:36:24 CEST
Mageia 9 will have *very* little changes from now to release, so for your own use I would recommend to upgrade now. Did so a couple months ago on my production systems.

On the other hand it would be nice to fix this problem for other users on Mageia 8 - But have we seen anybody else hitting this problem?  As said mga9 is out real soon and we can already now i think recommend people having this and maybe other problem on mga8 to upgrade...  We are low on people so concentrate on 9 :)
Comment 18 Mészáros Csaba 2023-08-28 20:50:16 CEST
So I installed MAGEIA 9
Woohoo. It produces interesting things. But where should I write it?
What is certain is that qbittorrent works. :)
I have a problem with the video drive.
I'm opening a new thread titled Nvidia problem.