https://bugs.kde.org/show_bug.cgi?id=523498
Bug ID: 523498
Summary: PDF thumbnailer repeatedly spawns unbounded
Ghostscript jobs for oversized-page PDF
Classification: Frameworks and Libraries
Product: kio-extras
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Thumbnails and previews
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 194606
--> https://bugs.kde.org/attachment.cgi?id=194606&action=edit
the offending file
DESCRIPTION
I have this weirdly huge (large page dimensions) PDF in my files, and when I
navigate to it in Dolphin, it starts multiple Ghostscript processes to generate
a thumbnail. The processes never complete, they continuously consume CPU and
remain active after Dolphin is closed. Laptop's CPU reached 95°C.
The affected file is a one-page, 893,795-byte PDF created by ImageMagick. Its
declared page size is 77,688 × 376,416 points.
STEPS TO REPRODUCE
1. Enable previews for PostScript, PDF and DVI files in Dolphin.
2. Open a directory containing the attached file, 1_5116180161280083549.pdf,
with previews enabled.
3. Check CPU usage using System Monitor or `ps`, then close Dolphin and check
whether the processes stop.
OBSERVED RESULT
KDE starts several Ghostscript (`gs`) processes for the same PDF. Three
processes appeared during the first test and five during a second test. Each
used approximately 99% of one CPU core.
The CPU reached 95°C. Closing Dolphin did not reliably terminate the processes.
Killing only the Ghostscript processes while Dolphin remained open caused new
thumbnail workers to appear. After Dolphin and its KIO thumbnail workers were
terminated, the CPU temperature dropped to 53°C.
The journal contained the following message for the thumbnail workers:
QImageIOHandler: Rejecting image as it exceeds the current allocation limit
of 256 megabytes
EXPECTED RESULT
The thumbnail generator should scale the PDF down before rendering it or just
reject unreasonable page dimensions. Closing Dolphin or cancelling thumbnail
generation should terminate the associated Ghostscript process. Multiple
workers should not render the same file simultaneously.
SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.3
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
ADDITIONAL INFORMATION
Dolphin Version: 26.04.3
kdegraphics-thumbnailers Version: 26.04.3-1.fc44
kio-extras Version: 26.04.3-1.fc44
Ghostscript Version: 10.06.0-2.fc44
Graphics Platform: Wayland
Kernel Version: 7.1.4-204.fc44.x86_64
Affected file:
Filename: 1_5116180161280083549.pdf
Size: 893,795 bytes
Pages: 1
Page size: 77,688 × 376,416 points
PDF version: 1.7
Creator/Producer: ImageMagick
SHA-256: 9a2be406c2b692cf58d4645b465eceae3d76487578fef8e22cdb6fe0a86e815b
The responsible plugin appears to be `gsthumbnail.so` from the
kdegraphics-thumbnailers package.
--
You are receiving this mail because:
You are watching all bug changes.