Issue 118118 - JREProperties increase server CPU
Summary: JREProperties increase server CPU
Status: REOPENED
Alias: None
Product: performance
Classification: Code
Component: www (show other issues)
Version: OOO310m1
Hardware: All Linux, all
: P3 Normal (vote)
Target Milestone: not determined
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 11:05 UTC by maria.kiousi
Modified: 2023-11-30 04:09 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description maria.kiousi 2011-06-01 11:05:56 UTC
In our client's server (SuSE Linux SLES 11) is installed OpenOffice 3.1.0. OpenOffice is called in command line to convert an HTML or TXT document to PDF. 
It has been observed many times that the server's CPU rises to 100% and never falls (OpenOffice hangs), unless the following process is killed:

/usr/lib64/jvm/java-1_6_0-ibm-1.6.0/jre/bin/java -classpath /opt/openoffice.org/ure/lib JREProperties


What is the reason behind this apparently bad OpenOffice performance? 
Can this be fixed (through configuration, upgrade to a newer OpenOffice version, etc)?
If not, is there a workaround available?
Comment 1 Oliver-Rainer Wittmann 2012-06-13 12:24:36 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 2 oooforum (fr) 2023-10-23 13:58:48 UTC
All these versions are out-to-date
Comment 3 damjan 2023-11-30 03:41:59 UTC
As per OP:

"our client's server (SuSE Linux SLES 11)"

A server probably has no X11 installed.

Look at this comment in main/jvmfwk/java/jreproperties/src/main/java/JREProperties.java:

---snip---
            //We need to be able to switch this part off because
            //it causes an exception if the DISPLAY variable has
            //a false value. Setting the noaccessibility argument
            //can be done by providing a sunjavaplugin.ini with
            //the bootstrap parameter JFW_PLUGIN_NO_NOT_CHECK_ACCESSIBILITY
            //set to "1"
            if (bNoAccess == false && ! bW98)
            {
                try{
                    //This line is needed to get the accessibility properties
                    Toolkit tk = java.awt.Toolkit.getDefaultToolkit();
                }
                catch(Throwable e)
                {
                    System.err.println(e);
                }
            }
---snip---

The DISPLAY environment won't ever be "false", but it might be unset in a command line or when there is no X11, so that's probably why java.awt.Toolkit.getDefaultToolkit() hangs with 100% CPU usage.

Oh and main/jvmfwk/java/jreproperties/src/main/java/JREProperties.java was unchanged since 2011, so "out-to-date" does not apply.
Comment 4 damjan 2023-11-30 04:09:32 UTC
But I can't get it to hang when I do:

java -cp . JREProperties

in openoffice4/program with Java 8 or 11 on FreeBSD.


Maybe this is the source of the problem?
                          |||
                          vvv
/usr/lib64/jvm/java-1_6_0-ibm-1.6.0/jre/bin/java -classpath /opt/openoffice.org/ure/lib JREProperties

I can't seem to find IBM's Java 1.6 anywhere to test with.