Bug 472485 - Segfault in Dynamic Playlist continuous generation
Summary: Segfault in Dynamic Playlist continuous generation
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlists/Dynamic Playlists (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: kf5
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-22 00:26 UTC by Evert Vorster
Modified: 2024-12-07 07:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
GDB Backtrace of all the processes that were running (116.10 KB, text/plain)
2023-07-22 00:26 UTC, Evert Vorster
Details
Screenshot at the moment of the crash (330.49 KB, image/jpeg)
2023-07-22 00:27 UTC, Evert Vorster
Details
GDB Backtrace with debug symbols (96.84 KB, text/plain)
2023-07-23 00:15 UTC, Evert Vorster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evert Vorster 2023-07-22 00:26:42 UTC
Created attachment 160438 [details]
GDB Backtrace of all the processes that were running

SUMMARY
***
Been noticing this one for a while, but whenever I was running gdb on it, it refused to crash, until today. 
I have a collection of about 100,000 songs, and it is nicely curated. Amarok's Dynamic playlist is a great feature, as it allows me to finely tune a playlist suited for the environment. 

Unfortunately is segfaults after running for a while. I have noticed that the segfaults are more frequent when the filter is set so that it would only match a small subset of the collection.

***


STEPS TO REPRODUCE
1. Run Amarok on a collection of 100K+ songs
2. Enable Dynamic Playlist
3. Set playlist to search for a specific Genre AND rating of "0" 
4. Let is play for an hour or so.

OBSERVED RESULT
Amarok segfaults after a while

EXPECTED RESULT
Continuous playing until program is stopped from the UI.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.4.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 36.9 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 20T8001JUS
System Version: ThinkPad E15 Gen 2

ADDITIONAL INFORMATION
Amarok is built from source checked out from git master on 2023-07-20
I am the package maintainer for the AUR package amarok-git
Comment 1 Evert Vorster 2023-07-22 00:27:23 UTC
Created attachment 160439 [details]
Screenshot at the moment of the crash

Screenshot showing the settings of the dynamic playlist
Comment 2 Evert Vorster 2023-07-23 00:15:34 UTC
Created attachment 160458 [details]
GDB Backtrace with debug symbols

Rebuilt Amarok with Debug symbols enabled, and re-created the crash. 

Hopefully this helps an interested developer.
Comment 3 Tuomas Nurmi 2024-04-17 08:54:03 UTC
Thank you for the report!
I think I'll try reproducing this myself a bit later (probably after 3.0 release).
However, as there were some fixes to related codepaths introduced in 2.9.82, it would be great to hear if you still experience this with 2.9.82 (or current git master).
If yes, in addition to backtrace, output from amarok being run with "--debug" parameters might be useful here, too (to get it when running through gdb, start execution with ´run --debug´).

Additionally, I was wondering if the crash can be made happen faster by manually deleting upcoming tracks from the Dynamic playlist (the answer might be no, though, at least if this is related to the parts I think it is)
Comment 4 Tuomas Nurmi 2024-05-18 12:28:59 UTC
I tried playing a dynamic playlist with narrow subset for a hour but didn't manage to crash Amarok yet. I might try again later, but looking at backtraces, this might have something to do with ThreadWeaver usages in KF5 port. I think they could use some deeper reworking to fix some underlying issues, but that's probably something to do with Qt6 port, as they work somewhat OK now, and re-working them might impact many things.
Comment 5 Evert Vorster 2024-05-25 08:38:22 UTC
I have started using Amarok again after a little hiatus. Will monitor and if I am unable to make it crash will close this ticket.

It's awesome to see activity on this project again.
Comment 6 Tuomas Nurmi 2024-12-06 11:59:39 UTC
There doesn't seem to be any are recent reports like this on crash-reports.kde.org (and some more possibly related fixes were merged in late October), so I'm hoping this might indeed have gotten fixed. Do you think it's ok to close this, or have you encountered this kind of crashes lately?
Comment 7 Evert Vorster 2024-12-07 07:16:42 UTC
I have not seen Amarok crash in this way in a while. Let's close this ticket.