Bug 32806 - rtorrent crashed "priority_queue_insert(...) called on an invalid item" when the ruTorrent page was loaded.
Summary: rtorrent crashed "priority_queue_insert(...) called on an invalid item" when ...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL: https://github.com/rakshasa/rtorrent/...
Whiteboard:
Keywords: IN_ERRATA9, UPSTREAM
Depends on:
Blocks:
 
Reported: 2024-02-04 22:41 CET by PC LX
Modified: 2024-02-06 21:14 CET (History)
2 users (show)

See Also:
Source RPM: rtorrent-0.9.8-4.mga9.src.rpm
CVE:
Status comment:


Attachments

Description PC LX 2024-02-04 22:41:15 CET
Description of problem:

rtorrent crashed when the ruTorrent page was loaded.

rtorrent was restarted automatically by systemd and did not crash again so it is not a big issue but I'm making this bug report and will keep an eye on rtorrent upstream for a fix.

There is an upstream bug report for this issue here:
https://github.com/rakshasa/rtorrent/issues/939




System: Mageia 9, x86_64, Apache httpd, Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz.


$ uname -a
Linux marte 6.6.14-desktop-1.mga9 #1 SMP PREEMPT_DYNAMIC Sat Jan 27 01:13:53 UTC 2024 x86_64 GNU/Linux
$ rpm -q rtorrent
rtorrent-0.9.8-4.mga9


# journalctl -b0 -u rtorrent@-media-share-rtorrent.service
fev 02 14:56:41 marte systemd[1]: Starting rtorrent@-media-share-rtorrent.service...
fev 02 14:56:41 marte systemd[1]: Started rtorrent@-media-share-rtorrent.service.
fev 04 21:07:35 marte rtorrent[2557]: Caught internal_error: priority_queue_insert(...) called on an invalid item.
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libtorrent.so.21(_ZN7torrent14internal_error10initializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x21b) [0x7faa95c9b1fb]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent(_ZN7torrent14internal_errorC1EPKc+0x7e) [0x46debe]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x46e451]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x42cf7e]
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libtorrent.so.21(_ZN7torrent11thread_base10event_loopEPS0_+0x14b) [0x7faa95ce1bdb]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x42a3a7]
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libc.so.6(+0x236b7) [0x7faa958316b7]
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libc.so.6(__libc_start_main+0x85) [0x7faa95831775]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x42aad1]
fev 04 21:07:35 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Main process exited, code=exited, status=255/EXCEPTION
fev 04 21:07:35 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Failed with result 'exit-code'.
fev 04 21:07:35 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Consumed 9h 52min 45.110s CPU time.
fev 04 21:07:40 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Scheduled restart job, restart counter is at 1.
fev 04 21:07:40 marte systemd[1]: Stopped rtorrent@-media-share-rtorrent.service.
fev 04 21:07:40 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Consumed 9h 52min 45.110s CPU time.
fev 04 21:07:40 marte systemd[1]: Starting rtorrent@-media-share-rtorrent.service...
fev 04 21:07:40 marte systemd[1]: Started rtorrent@-media-share-rtorrent.service.


# journalctl -b0 -u rtorrent@-media-share-rtorrent.service | c++filt 
fev 02 14:56:41 marte systemd[1]: Starting rtorrent@-media-share-rtorrent.service...
fev 02 14:56:41 marte systemd[1]: Started rtorrent@-media-share-rtorrent.service.
fev 04 21:07:35 marte rtorrent[2557]: Caught internal_error: priority_queue_insert(...) called on an invalid item.
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libtorrent.so.21(torrent::internal_error::initialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x21b) [0x7faa95c9b1fb]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent(torrent::internal_error::internal_error(char const*)+0x7e) [0x46debe]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x46e451]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x42cf7e]
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libtorrent.so.21(torrent::thread_base::event_loop(torrent::thread_base*)+0x14b) [0x7faa95ce1bdb]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x42a3a7]
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libc.so.6(+0x236b7) [0x7faa958316b7]
fev 04 21:07:35 marte rtorrent[2557]: /lib64/libc.so.6(__libc_start_main+0x85) [0x7faa95831775]
fev 04 21:07:35 marte rtorrent[2557]: /usr/bin/rtorrent() [0x42aad1]
fev 04 21:07:35 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Main process exited, code=exited, status=255/EXCEPTION
fev 04 21:07:35 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Failed with result 'exit-code'.
fev 04 21:07:35 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Consumed 9h 52min 45.110s CPU time.
fev 04 21:07:40 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Scheduled restart job, restart counter is at 1.
fev 04 21:07:40 marte systemd[1]: Stopped rtorrent@-media-share-rtorrent.service.
fev 04 21:07:40 marte systemd[1]: rtorrent@-media-share-rtorrent.service: Consumed 9h 52min 45.110s CPU time.
fev 04 21:07:40 marte systemd[1]: Starting rtorrent@-media-share-rtorrent.service...
fev 04 21:07:40 marte systemd[1]: Started rtorrent@-media-share-rtorrent.service.






Version-Release number of selected component (if applicable):

rtorrent-0.9.8-4.mga9



How reproducible:

So far, it occurred one time and I don't know how to reproduce it.



Steps to Reproduce:

Unknown.
Comment 1 Morgan Leijström 2024-02-04 23:30:33 CET
Thank you for finding the upstream bug.

When a remedy is found, please assign to pkg-bugs as we have no registered maintainer.

Keywords: (none) => UPSTREAM
CC: (none) => fri

Comment 2 Lewis Smith 2024-02-05 20:53:14 CET
That upstream bug is not encouraging.
It was raised in 2019, has no assignee, no milestone, last post 2020. No sign of resolution. Gloom.

About ruTorrent:
Name        : rutorrent
Version     : 3.5
Source RPM  : rutorrent-3.5-6.mga9.src.rpm
URL         : http://code.google.com/p/rutorrent/
Summary     : Web front-end for the rTorrent BitTorrent client
Description :
rutorrent is a web frontend for the rTorrent BitTorrent client.
Official plugins are included in rutorrent-plugins subpackage.
Note that you need to either configure an SCGI module for your web
server or install rutorrent-plugins and enable rpc or httprpc
plugins for rutorrent to work. See the online documentation for more
details. All configuration files, including plugin configuration,
are in /etc/rutorrent.

(The URL is now https://github.com/Novik/ruTorrent)
Looks complicated...

I wondered whether the problem is related to rutorrent, since the bug report talks mostly about heavy loads. However, one comment says:
"This happens when there's a lot of download/upload going on and if I try to load ruTorrent it hangs up for some time then rtorrent crashes with this error.
It never happens where the load is low.
I'm suspecting it's a problem with ruTorrent but why would rtorrent crash for such an issue?"
Another:
"It looks more like an issue rutorrent exposes when doing heavy rpc calls to rtorrent under load."

We might have to ERRATA this until & if it gets fixed.

CC: (none) => lewyssmith
Keywords: (none) => FOR_ERRATA9
Summary: rtorrent crashed when the ruTorrent page was loaded. => rtorrent crashed "priority_queue_insert(...) called on an invalid item" when the ruTorrent page was loaded.

Comment 3 Lewis Smith 2024-02-05 20:54:52 CET
(In reply to PC LX from comment #0)
> rtorrent was restarted automatically by systemd and did not crash again so
> it is not a big issue
So it is not critical.

Severity: critical => major

Comment 4 PC LX 2024-02-06 10:43:38 CET
(In reply to Lewis Smith from comment #3)
> (In reply to PC LX from comment #0)
> > rtorrent was restarted automatically by systemd and did not crash again so
> > it is not a big issue
> So it is not critical.

I choose critical because the software crashed and I followed the bug tracker description for critical severity ("Critical: The software crashes, hangs, or causes you to lose data.") but for me it is not critical since it happens rarely  (once in the past 26 days, as far back as the logs go) and an automatic restart solves the issue.


(In reply to Lewis Smith from comment #2)
> That upstream bug is not encouraging.

No, it is not.

If someone else comes across this bug, hopefully this report will save some work.
Comment 5 Morgan Leijström 2024-02-06 14:49:52 CET
Entered end of
https://wiki.mageia.org/en/Mageia_9_Errata#Various_software

Keywords: FOR_ERRATA9 => IN_ERRATA9

Comment 6 Lewis Smith 2024-02-06 21:14:37 CET
Thanks, Morgan.
This joins loads of unfixable bugs...

Note You need to log in before you can comment on or make changes to this bug.