Apache OpenOffice (AOO) Bugzilla – Issue 119678
OpenOffice service soffice.bin becomes unresponsive/hung and hijacks CPU and memory
Last modified: 2017-05-20 11:55:38 UTC
Created attachment 77890 [details] snapshot of memory and CPU trend of soffice.bin We use OOo to generate word documents, OOo runs as service,our Java application pulls data from Database which includes plain text, html content with RTF data and files like jpgs from local filesystem and puts them in placeholders in odt template. RTF content mentioned above comes from TinyMCE - Javascript WYSIWYG Editor of our web application, here RTF content is pasted from MicroSoft WORD documents. Some of the UNO API used are xReplaceDescriptor.setReplaceString(replaceStr) where replaceStr could HTML content OR XDocumentInsertable xDocumentInsertable = (XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class, xTextCursor); xDocumentInsertable.insertDocumentFromURL(strFileUrl, insertArgs);// Inserts the document that is specified by the URL, strFileUrl is a HTML file with RTF content. Most of the time above API work fine but we noted critical failures when there are special HTML attributes in the RTF content or if there is ill formatted HTML like nested SPAN tags without matching close tags. For example 'class=Note' attribute of <P> tag causing soffice.bin hang and CPU and memory hijack. Below is sample tags causing this problem <P style="MARGIN: 6pt 3.5in 6pt 0.5in" class=Note _mce_style="margin-bottom: 0pt;margin: 6pt 3.5in 6pt 0.5in;" ><FONT size=2 face=Arial> </FONT></P> <P style="MARGIN: 6pt 3.5in 6pt 0.5in" class=Note _mce_style="margin-bottom: 0pt;margin: 6pt 3.5in 6pt 0.5in;" ><FONT size=2 face=Arial>To update the table of contents, put the cursor anywhere in the table and press [F9].<SPAN style="mso-spacerun: yes" _mce_style="mso-spacerun: yes;"> </SPAN>To change the number of levels displayed, select the menu option Insert->Index and Tables, make sure the Table of Contents tab is active, and change the Number of Levels to a new value.</FONT></P></DIV> See Attached is snapshot of memory and CPU trend of soffice.bin process Below is sample stacktraces when soffice.bin is hung WebContainer : 0" Priority=5 Thread Id=101 In State : WAITING at java.lang.Object.wait(Native Method) at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:289) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:399) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:372) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:132) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:902) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:851) AND 0000000d ThreadMonitor W WSVR0605W: Thread "WebContainer : 23" (0000009b) has been active for 624507 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung. at java.lang.Object.wait(Native Method) at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:289) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:399) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:372) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:132) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:902) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:851) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:177) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:163) at $Proxy30.storeAsURL(Unknown Source) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:177) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:163) at $Proxy10.getString(Unknown Source) Are there any fixes or workarounds for these issues? We have partial success when HTML content is cleaned with utilities like jTidy API before passing to OpenOffice service Are there any utilities at UNO API level to discard above mentioned HTML attributes or ill formatted HTML Quick response is appreciated, let us know if you need more details in reproducing the issue
Please refer to below stacktrace,other one in bug is mixed up WebContainer : 0" Priority=5 Thread Id=101 In State : WAITING at java.lang.Object.wait(Native Method) at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:289) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:399) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:372) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:132) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:902) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:851)at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:177) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:163) at $Proxy10.getString(Unknown Source) AND 0000000d ThreadMonitor W WSVR0605W: Thread "WebContainer : 23" (0000009b) has been active for 624507 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung. at java.lang.Object.wait(Native Method) at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:289) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:399) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:372) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:132) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:902) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:851) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:177) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:163) at $Proxy30.storeAsURL(Unknown Source)
We are facing the same issue and it is happening consistently. None of the word documents are generated,please look into this issue and provide approximate time lines for fix or workarounds if any.
Created attachment 79781 [details] OO template that shows the problem
I have attached a template that shows very similar behavior. If I try to save this template in OpenOffice native format, or most other formats, it's fine. If I try to save in with the "Word 95" or "Word 97" filters, it hangs (soffice.bin CPU utilization goes to 100% and it never returns). I am running OpenOffice 3.4.1 on 64-bit Windows 7, but the problem happens on other hardware as well. This may also be related to bugs 97227 and 82500.