Bug 118178 - Conversion of ODT to PDF stalls for 25 seconds on the x-th conversion if settings.xml contains a PrinterName
Summary: Conversion of ODT to PDF stalls for 25 seconds on the x-th conversion if sett...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:odt, filter:pdf
Depends on:
Blocks:
 
Reported: 2018-06-15 13:11 UTC by angu
Modified: 2018-10-24 07:56 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
settings.xml working, formatted to make a diff possible (11.60 KB, application/xml)
2018-06-15 13:11 UTC, angu
Details
example ODT file (10.25 KB, application/vnd.oasis.opendocument.text)
2018-06-18 09:13 UTC, angu
Details
Conversion log of odt file with LibreOffice 6.1.3.1 (12.43 KB, text/plain)
2018-10-22 08:02 UTC, angu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description angu 2018-06-15 13:11:33 UTC
Created attachment 142766 [details]
settings.xml working, formatted to make a diff possible

Using this command:
 libreoffice --headless --convert-to pdf test.odt

to convert an new, empty test page runs fine, even multiple times.
chaning this command together for example 10 times with && even works as expected.
Conversion time is something between 1 and 2 Seconds per page.

Now changing the PrinterName Tag in settings.xml from this:

		<config:config-item config:name="PrinterName"
			config:type="string" />
to this:
		<config:config-item config:name="PrinterName"
			config:type="string">some_Printer</config:config-item>

causes the 5th conversion to stall for more that 25 seconds:
Comment 1 angu 2018-06-15 13:14:57 UTC
Sorry, but it seems impossible to attach multiple files. Therfore, here is the diff to "break" the working settings.xml above:

diff settings.xml_works settings.xml_broken 
114c114
<                   config:type="string" />
---
>                   config:type="string">some_Printer</config:config-item>

it doesn't matter if the printer exists or not.
Comment 2 angu 2018-06-15 13:23:41 UTC
Chaining 6 executions together then produces the following execution times:
time libreoffice --headless --convert-to pdf test.odt && 
time libreoffice --headless --convert-to pdf test.odt && 
time libreoffice --headless --convert-to pdf test.odt && 
time libreoffice --headless --convert-to pdf test.odt && 
time libreoffice --headless --convert-to pdf test.odt && 
time libreoffice --headless --convert-to pdf test.odt 
error : Unknown IO error                                                                                                                                                                                                                                                       
convert /home/case/eclipse_workspace/PackingServer/libretest/test.odt -> /home/case/eclipse_workspace/PackingServer/libretest/test.pdf using filter : writer_pdf_Export                                                                                                        
Overwriting: /home/case/eclipse_workspace/PackingServer/libretest/test.pdf                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                               
real    0m1.269s                                                                                                                                                                                                                                                               
user    0m1.050s                                                                                                                                                                                                                                                               
sys     0m0.241s                                                                                                                                                                                                                                                               
error : Unknown IO error                                                                                                                                                                                                                                                       
convert /home/case/eclipse_workspace/PackingServer/libretest/test.odt -> /home/case/eclipse_workspace/PackingServer/libretest/test.pdf using filter : writer_pdf_Export                                                                                                        
Overwriting: /home/case/eclipse_workspace/PackingServer/libretest/test.pdf                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                               
real    0m1.239s
user    0m1.017s
sys     0m0.216s
error : Unknown IO error
convert /home/case/eclipse_workspace/PackingServer/libretest/test.odt -> /home/case/eclipse_workspace/PackingServer/libretest/test.pdf using filter : writer_pdf_Export
Overwriting: /home/case/eclipse_workspace/PackingServer/libretest/test.pdf

real    0m1.269s
user    0m1.024s
sys     0m0.235s
error : Unknown IO error
convert /home/case/eclipse_workspace/PackingServer/libretest/test.odt -> /home/case/eclipse_workspace/PackingServer/libretest/test.pdf using filter : writer_pdf_Export
Overwriting: /home/case/eclipse_workspace/PackingServer/libretest/test.pdf

real    0m1.260s
user    0m1.004s
sys     0m0.243s
error : Unknown IO error
convert /home/case/eclipse_workspace/PackingServer/libretest/test.odt -> /home/case/eclipse_workspace/PackingServer/libretest/test.pdf using filter : writer_pdf_Export
Overwriting: /home/case/eclipse_workspace/PackingServer/libretest/test.pdf

real    0m1.268s
user    0m1.020s
sys     0m0.242s
error : Unknown IO error
convert /home/case/eclipse_workspace/PackingServer/libretest/test.odt -> /home/case/eclipse_workspace/PackingServer/libretest/test.pdf using filter : writer_pdf_Export
Overwriting: /home/case/eclipse_workspace/PackingServer/libretest/test.pdf

real    0m26.207s
user    0m1.031s
sys     0m0.251s
case@wau:~/eclipse_workspace/PackingServer/libretest> 

As you can see - the 6th conversion (not the 5th) takes about 25 seconds longer. This goes on for every Xmod6th iteration: 12, 18, 24 etc.

libreoffice --version
LibreOffice 6.0.4.2 00m0(Build:2)

(Some older Version (LibreOffice 4.3.5.2.0 430m0(Build:2)) did not have that problem.)
Comment 3 Xisco Faulí 2018-06-15 14:00:15 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 4 angu 2018-06-18 09:13:50 UTC
Created attachment 142841 [details]
example ODT file

Added example file that creates the 25 seconds stall on the 6th iteration on my openSUSE Leap 42.3 system.

Note: Just executing
time libreoffice --headless --convert-to pdf test_defect.odt 

multiple times - even fast - will not show the problem. It just shows if some software executes this directly one after another for example with command chaining like this:
time libreoffice --headless --convert-to pdf test_defect.odt && time libreoffice --headless --convert-to pdf test_defect.odt etc.
Comment 5 Buovjaga 2018-06-24 17:53:23 UTC
(In reply to angu from comment #4)
> multiple times - even fast - will not show the problem. It just shows if
> some software executes this directly one after another for example with
> command chaining like this:
> time libreoffice --headless --convert-to pdf test_defect.odt && time
> libreoffice --headless --convert-to pdf test_defect.odt etc.

Did such a chain with 6 commands and did not get the stalling.

Arch Linux 64-bit
Version: 6.0.4.2
Build ID: 6.0.4-1
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 5b42a17dc99fba2ccf8dd8d0a8e0e4e836e30120
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on June 22nd 2018
Comment 6 angu 2018-06-25 06:13:19 UTC
Too bad. I will try that on another machine.
Comment 7 angu 2018-06-27 11:08:04 UTC
I could *not* reproduce the error on a Netrunner (Debian) and an Ubuntu
System (Core i3, 8GB) myself. 

Either this is something related to my hardware (maybe the AMD cpu - can someone else test this maybe?) or the OpenSuSE 42.3 System i'm running.

Tried it also on a OpenSuSE Leap 15 Live-USB-Stick (on the i3 machine),
but the Live-System is so awfully slow and fluctuating (between 3 and 24 Seconds, libreoffice installation also took several hours) that there were no clear results.

I will reinstall my (AMD) System with a fresh OS LEAP 15 and try again.
Comment 8 Terrence Enger 2018-06-30 20:47:51 UTC
On debian-buster running daily Linux dbgutil bibisect repository
version 2018-06-30 12 times in succession, I see elapsed times
consistently less than 2.2 seconds.  If at the same time I have Start
Center open, the elapsed times are less than 0.3 seconds.
Comment 9 Xisco Faulí 2018-10-18 14:59:00 UTC
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 10 angu 2018-10-22 08:02:18 UTC
Created attachment 145896 [details]
Conversion log of odt file with LibreOffice 6.1.3.1
Comment 11 angu 2018-10-22 08:04:28 UTC
Comment on attachment 145896 [details]
Conversion log of odt file with LibreOffice 6.1.3.1

Installed teh newest Version 6.1.3.1 for my system from Opensuse Factory.

Is this sufficient or should i install directly from 
https://www.libreoffice.org/download/libreoffice-fresh/ ?
Comment 12 Buovjaga 2018-10-22 09:29:47 UTC
I tried again with a chain of 13 commands, but no stalling

Version: 6.1.2.1
Build ID: 6.1.2-1
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Comment 13 angu 2018-10-24 07:36:05 UTC
I made a fresh OS install (OpenSuSE LEAP 15) on the same System with a new disk. 

The stalling is gone now.
Comment 14 Buovjaga 2018-10-24 07:36:59 UTC
Great to hear, let's close.
Comment 15 angu 2018-10-24 07:56:21 UTC
(In reply to Buovjaga from comment #14)
> Great to hear, let's close.

I´d like to add that this was a really weird one:
A bug and/or misconfiguration of the OS, kernel or the filesystem that only shows up if a specific application with a specific option occurs and multiple executions hereof. WTF?