incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 119678] New: OpenOffice service soffice.bin becomes unresponsive/hung and hijacks CPU and memory
Date Fri, 01 Jun 2012 18:12:00 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=119678

          Priority: P3
            Bug ID: 119678
          Assignee: ooo-issues@incubator.apache.org
           Summary: OpenOffice service soffice.bin becomes
                    unresponsive/hung and hijacks CPU and memory
          Severity: critical
        Issue Type: DEFECT
    Classification: Code
                OS: All
          Reporter: jsdivi@gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: OOo 3.3 RC10
         Component: code
           Product: api

Created attachment 77890
  --> https://issues.apache.org/ooo/attachment.cgi?id=77890&action=edit
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-&gt;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

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message