Return-Path: X-Original-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B0D3CA79 for ; Fri, 1 Jun 2012 18:12:31 +0000 (UTC) Received: (qmail 68558 invoked by uid 500); 1 Jun 2012 18:12:31 -0000 Delivered-To: apmail-incubator-ooo-issues-archive@incubator.apache.org Received: (qmail 68529 invoked by uid 500); 1 Jun 2012 18:12:31 -0000 Mailing-List: contact ooo-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-issues@incubator.apache.org Delivered-To: mailing list ooo-issues@incubator.apache.org Received: (qmail 68518 invoked by uid 99); 1 Jun 2012 18:12:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 18:12:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.123] (HELO sif.zones.apache.org) (140.211.11.123) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 18:12:27 +0000 Received: by sif.zones.apache.org (Postfix, from userid 80) id 9847F449A; Fri, 1 Jun 2012 18:12:06 +0000 (UTC) From: bugzilla@apache.org To: ooo-issues@incubator.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 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: api X-Bugzilla-Component: code X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: jsdivi@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ooo-issues@incubator.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: priority bug_id assigned_to short_desc bug_severity cf_bug_type classification op_sys reporter rep_platform bug_status version component product Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/ooo/ Auto-Submitted: auto-generated MIME-Version: 1.0 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

tag causing soffice.bin hang and CPU and memory hijack. Below is sample tags causing this problem

To update the table of contents, put the cursor anywhere in the table and press [F9]. 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.

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.