https://bugs.kde.org/show_bug.cgi?id=524084
Bug ID: 524084
Summary: File dialog / Dolphin becomes unresponsive for
extended periods when PDF thumbnail generation via
Ghostscript is blocked (e.g. by AppArmor)
Classification: Frameworks and Libraries
Product: kio-extras
Version First unspecified
Reported In:
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: grave
Priority: NOR
Component: Thumbnails and previews
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
When Dolphin or a KDE Open/Save file dialog (KIO) navigates to a folder
containing a PDF whose thumbnail generation fails (in my case, Ghostscript
being denied read access by an AppArmor profile), the whole UI becomes
unresponsive/laggy for an extended period instead of just failing to show
a thumbnail for that one file. journalctl shows the process consuming far
less CPU time than wall-clock time during the hang (e.g. 43s CPU over
2m20s wall clock), indicating the UI thread is blocked waiting rather than
doing work. Disabling "Documents" preview in Dolphin settings (Configure >
General > Previews) makes the problem disappear completely, confirming
the PDF thumbnail generator as the cause. Also pressed F11 to disable preview
on right side layout.
STEPS TO REPRODUCE
1. Have a PDF file in a folder (e.g. ~/Desktop) that Ghostscript cannot
read due to an AppArmor/security policy denial (or any condition that
makes `gs` fail with "Unrecoverable error"). ex: a pdf named FILENAME but
instead of FILENAME.pdf just named FILENAME
2. Open Dolphin or any KIO-based Open/Save file dialog and navigate to
that folder, or make it the last-visited folder for file dialogs.
3. Observe UI responsiveness (dragging window, clicking, typing) while
the thumbnail job runs.
OBSERVED RESULT
- UI becomes unresponsive / delayed / stutters for an extended period.
- journalctl shows repeated:
"GPL Ghostscript 10.06.0: Unrecoverable error, exit code 1"
paired with kernel audit entries:
"apparmor="DENIED" operation="open" ... profile="gs" name="<pdf path>"
comm="gs" requested_mask="r" denied_mask="r""
- systemd accounting for the dolphin scope shows CPU time far lower than
wall-clock time during the affected session, consistent with the
process being blocked rather than computing
(e.g. "Consumed 43.729s CPU time over 2min 20.456s wall clock time").
- Disabling "Documents" thumbnail previews in Dolphin settings eliminates
the issue entirely.
IMPORTANT NOTE: I suspect this might not be solely related to PDFs. But
empirically speaking it seems to happen deterministically when PDFs are
involved.
EXPECTED RESULT
A single failed/denied thumbnail generation (Ghostscript or any other
per-file thumbnailer) should fail fast and not block or noticeably delay
the rest of the UI. Ideally thumbnailers should run in a sandboxed/
isolated worker with a timeout, independent of the UI thread (related:
kio-extras wishlist bug #521526, "Sandbox thumbnailers").
SOFTWARE/OS VERSIONS
Operating System: Ubuntu 26.04
KDE Plasma Version: 6.6.6
Qt Version: 6.10.2
KDE framework: 6.24.0
ADDITIONAL INFORMATION
Also observed in the same session (possibly unrelated, noting for
completeness):
"kf.kio.workers.trash: Creating trash for "/" failed - no permission?"
— repeated attempts to create a .Trash folder at filesystem root, likely
a separate minor issue.
Operating System: Ubuntu 26.04
KDE Plasma Version: 6.6.6
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 7.0.0-29-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Memory: 34 GB of RAM (32,2 GB usable)
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: Dell Inc.
Product Name: Latitude 5420
See also: kio-extras bug #521526 (Sandbox thumbnailers).
--
You are receiving this mail because:
You are watching all bug changes.