Bug 170114 - LibreOffice hangs indefinitely when converting corrupt word/DOC/DOCX in headless mode
Summary: LibreOffice hangs indefinitely when converting corrupt word/DOC/DOCX in headl...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-24 12:11 UTC by Ahmed
Modified: 2026-01-08 09:35 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmed 2025-12-24 12:11:52 UTC
LibreOffice hangs indefinitely when converting a corrupt DOC/DOCX file to PDF in headless mode.

We use LibreOffice in headless server mode (via UNO, using JODConverter) to convert Word documents (DOC/DOCX) to PDF.

When a corrupted or malformed Word file is uploaded for conversion:
- LibreOffice does not return an error
- The conversion never completes
- The soffice.bin (UNO) process becomes stuck
- All subsequent Word→PDF conversions also hang
- Only restarting LibreOffice or the server fixes the issue

Expected behavior:
LibreOffice should fail the conversion gracefully and release the UNO process when a corrupt Word file is encountered.

Actual behavior:
LibreOffice enters a permanently blocked state after attempting to convert a corrupt DOC/DOCX file to PDF, making the service unusable until restarted.

This makes LibreOffice unreliable for server-side Word-to-PDF conversion when invalid or corrupted files are uploaded.

Steps to reproduce:
1. Run LibreOffice in headless mode via JODConverter (UNO)
2. Convert a corrupted DOC/DOCX file to PDF
3. The conversion hangs
4. Try converting a valid DOC/DOCX file
5. It also hangs until LibreOffice is restarted
Comment 1 Timur 2026-01-08 09:33:48 UTC Comment hidden (me-too)
Comment 2 Timur 2026-01-08 09:35:44 UTC
Does LO in GUI report a corrupted file? If not, headless is misleading here.
I assume sample would be useful for that.
In general, I set timeout function around headless, which also has output result.
Plus there is change in Bug 148275 for headless result.