https://bugs.documentfoundation.org/show_bug.cgi?id=106949

            Bug ID: 106949
           Summary: HTML  to PDF conversion hangs when called through
                    socket from Liferay
           Product: LibreOffice
           Version: 5.3.0.3 release
          Hardware: x86-64 (AMD64)
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Liferay portal server offers a pdf export based on LibreOffice. It requires
that LibreOffice is started in headless mode and accepts requests via a socket.
Liferay uses com.artofsolving.jodconverter.openoffice to start the conversion.

Starting command of libre office:
/opt/libreoffice5.3/program/soffice.bin --backtrace --headless --nologo
--nofirststartwizard --accept="socket,host=127.0.0.1,port=8100;urp"

When starting the a conversion of an article, a html file is written to a temp
folder and libreoffice "asked" to create a pdf version of the file. Libreoffice
creates an empty pdf file, than hangs with 100% CPU load. 

While the process hangs, files like these can be seen:

-rw-r--r--   1 liferay liferay        0  4. Apr 15:25
document9023065231684639692.pdf
-rw-r--r--   1 liferay liferay   627114  4. Apr 15:25
document3598502034899325534.html

While libreoffice hangs, all other conversion attempts, don't return either.

Killing the libreoffice process and converting above html file directly works
flawless and creates a pdf version of the html page as expected. So it probably
has nothing to do with the file itself but with the way the conversion is
started.
/opt/libreoffice5.3/program/soffice.bin --headless --convert-to pdf 
document9023065231684639692.html


I have used strace and gdb to check where it hangs. Apparently the function
rtl_cache_wsupdate_all runs in an endless loop and never finishes.

I looked a bit into the code, I guess the destructor of the cache is never
called and the relevant flag is never set to true, so the loop in that function
never completes. To me, this looks more of a symptom than the root cause, but
it might give a hint in the right direction.


Steps to Reproduce:
1. Start LibreOffice in Headless Mode
2. Configure Liferay 6.2 to use Libre Office for pdf export
3. Export an article from Liferay

Sorry, that I can't offer an easier way to reproduce it, but I don't have
another way to start a conversion through a socket.

Actual Results:  
Libre Office hangs without completing the conversion.

Expected Results:
Libre Office finishes conversion of the html file and "returns".


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101
Firefox/53.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to