soffice headless on server consumes 100% CPU

classic Classic list List threaded Threaded
8 messages Options
Manfred Rebentisch Manfred Rebentisch
Reply | Threaded
Open this post in threaded view
|

soffice headless on server consumes 100% CPU

Hello,

if I call the headless mode:

# /usr/lib/libreoffice/program/soffice  --headless --nologo --norestore
 --accept="uno:socket,host=localhost,port=2083;urp" &

then the computer needs all its power for that software. top shows 100%
and the fans working hard.

What is wrong with this mode?


# soffice --version
LibreOffice 6.0.7.3 00m0(Build:3)

#  uname -a
Linux ws24 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


# javaldx
/usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/client:
/usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/server:
/usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/native_threads:
/usr/lib/jvm/java-11-openjdk-amd64/lib/amd64


Thank you in advance

Manfred


--
COMPARAT Software-Entwicklungs-GmbH
Willy-Brandt-Allee 31a
23554 Lübeck


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Jan-Marek Glogowski Jan-Marek Glogowski
Reply | Threaded
Open this post in threaded view
|

Re: soffice headless on server consumes 100% CPU

Hi Manfred,

Am 23.05.19 um 06:29 schrieb Manfred Rebentisch:
> if I call the headless mode:
>
> # /usr/lib/libreoffice/program/soffice  --headless --nologo --norestore
>  --accept="uno:socket,host=localhost,port=2083;urp" &
>
> then the computer needs all its power for that software. top shows 100%
> and the fans working hard.
>
> What is wrong with this mode?

You probably just found a bug. Please file a report[1].

6.0 had a larger rewrite of the internal job scheduler, which broke stuff,
resulting in some busy loops.

What happens if you use SAL_USE_VCLPLUGIN=svp (that shouldn't be needed)?

> # soffice --version
> LibreOffice 6.0.7.3 00m0(Build:3)

I guess you build that version on your own?

Nevertheless 6.0 is EOL, so you won't get fixes for it[2].

I suggest to test at least with 6.2 and probably even current development[3,4],
as even 6.1 will be EOL soon, before filing a bug.

If you need a fix for that specific version, there is also professional support[5].

HTH

Jan-Marek

[1] https://bugs.documentfoundation.org/
[2] https://wiki.documentfoundation.org/ReleasePlan/6.0
[3] https://wiki.documentfoundation.org/Installing_in_parallel/Linux
[4] https://dev-builds.libreoffice.org/daily/
[5] https://www.libreoffice.org/get-help/professional-support/
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Manfred Rebentisch Manfred Rebentisch
Reply | Threaded
Open this post in threaded view
|

Re: soffice headless on server consumes 100% CPU

Hi Jan-Marek,

Am 23.05.19 um 12:29 schrieb Jan-Marek Glogowski:> Hi Manfred,

>
> Am 23.05.19 um 06:29 schrieb Manfred Rebentisch:
>> if I call the headless mode:
>>
>> # /usr/lib/libreoffice/program/soffice  --headless --nologo --norestore
>>  --accept="uno:socket,host=localhost,port=2083;urp" &
>>
>> then the computer needs all its power for that software. top shows 100%
>> and the fans working hard.
>>
>> What is wrong with this mode?
>
> You probably just found a bug. Please file a report[1].
>
> 6.0 had a larger rewrite of the internal job scheduler, which broke stuff,
> resulting in some busy loops.


I just use the ubuntu repositories for installation, no own builds.

deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe
multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
universe multiverse

Version on Ubuntu: LibreOffice 6.0.7.3 00m0(Build:3)


Same problem on Debian Stretch server:

apt install openjdk-8-jre  openjdk-8-jre-headless
apt install libreoffice --no-install-recommends --no-install-suggests
apt install libreoffice-l10n-de

 # soffice --version
LibreOffice 5.2.7.2 20m0(Build:2)

deb http://deb.debian.org/debian stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://deb.debian.org/debian stretch-backports main contrib non-free


I am new to the libreoffice world.

I think, it is not a new bug but a mistake in waiting for request
(--accept mode), so we get an endless loop.


>
> What happens if you use SAL_USE_VCLPLUGIN=svp (that shouldn't be needed)?
>

Where to set SAL_USE_VCLPLUGIN ?

>> # soffice --version
>> LibreOffice 6.0.7.3 00m0(Build:3)
>
> I guess you build that version on your own?

Perhaps is that the way, I have to go?

Can I use the standard libreoffice on my notebook and parallel use the
new version with own compiling?

>
> Nevertheless 6.0 is EOL, so you won't get fixes for it[2].
>
> I suggest to test at least with 6.2 and probably even current development[3,4],
> as even 6.1 will be EOL soon, before filing a bug.
>
> If you need a fix for that specific version, there is also professional support[5].
>
> HTH
>
> Jan-Marek
>
> [1] https://bugs.documentfoundation.org/
> [2] https://wiki.documentfoundation.org/ReleasePlan/6.0
> [3] https://wiki.documentfoundation.org/Installing_in_parallel/Linux
> [4] https://dev-builds.libreoffice.org/daily/
> [5] https://www.libreoffice.org/get-help/professional-support/
>

Thank you
Manfred

--
COMPARAT Software-Entwicklungs-GmbH
Willy-Brandt-Allee 31a
23554 Lübeck


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Jan-Marek Glogowski Jan-Marek Glogowski
Reply | Threaded
Open this post in threaded view
|

Re: soffice headless on server consumes 100% CPU

Hi Manfred,

Am 23.05.19 um 12:47 schrieb Manfred Rebentisch:
> Am 23.05.19 um 12:29 schrieb Jan-Marek Glogowski:> Hi Manfred,
>>
>> Am 23.05.19 um 06:29 schrieb Manfred Rebentisch:
>>> if I call the headless mode:
>>>
>>> # /usr/lib/libreoffice/program/soffice  --headless --nologo --norestore
>>>  --accept="uno:socket,host=localhost,port=2083;urp" &

Hmm - also happens for my master build.

"make debugrun" uses '--accept=pipe,name=glg;urp;'

and in fact

'--accept=socket,host=localhost,port=2083;urp'

"works" (I don't see the busy-loop and 'netstat -ltp' shows the LO process, but
I didn't test it) and doesn't throw a never reported rtl::MalformedUriException,
which causes the "URP Acceptor" to run in a busy loop.

So at least the soffice --help documentation is wrong, so is probably
bean/com/sun/star/comp/beans/LocalOfficeConnection.java, but maybe for Java the
uno: prefix is still correct?

This means there are actually two bugs: wrong documentation and the busy-loop.

Would be nice if you can file a bug report[1].

HTH

Jan-Marek

[1] https://bugs.documentfoundation.org/
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: soffice headless on server consumes 100% CPU

On 23/05/2019 14:22, Jan-Marek Glogowski wrote:
> So at least the soffice --help documentation is wrong, so is probably
> bean/com/sun/star/comp/beans/LocalOfficeConnection.java, but maybe for Java the
> uno: prefix is still correct?

The --help documentation got broken with
<https://gerrit.libreoffice.org/plugins/gitiles/core/+/d78f29ab3f40cfaf8c975005fceba93a193b28e5%5E!/>
"tdf#100836 'Starting the LibreOffice Software With Parameters' help
update", changing from "<accept-string>" to "{UNO-URL}".  Technically,
the argument to --accept is the connection-type plus optional
protocol-name (defaulting to "urp") parts of a uno URL as specified by
<https://www.openoffice.org/udk/common/man/spec/uno-url.html>.  There is
no sense in specifying an ObjectName (the fourth part in that uno URL
specification) for --accept, hence the argument to --accept is not a uno
URL.

And bean/com/sun/star/comp/beans/LocalOfficeConnection.java constructs
correct --accept arguments, as far as I can see?
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Manfred Rebentisch Manfred Rebentisch
Reply | Threaded
Open this post in threaded view
|

Re: soffice headless on server consumes 100% CPU

In reply to this post by Jan-Marek Glogowski
Hi,

if I start soffice with

--accept="socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"

it runs normal.
But if I want to connect from client C++ programm:

sConnectionString =
"socket,host=localhost,port=2083;urp;StarOffice.ServiceManager";

xContextM = ::cppu::defaultBootstrap_InitialComponentContext();

xServiceManagerM = xContextM->getServiceManager();
xResolverM = Reference< XUnoUrlResolver > (xInterfaceM, UNO_QUERY);

xInterfaceM = Reference< XInterface >(
            xResolverM->resolve( sConnectionString ), UNO_QUERY );

it throws an exception with: "UNO URL does not start with "uno:" "

if I start soffice with

--accept="socket,host=localhost,port=2083;urp"

it runs normal. And if I use

sConnectionString = "socket,host=localhost,port=2083;urp";

from C++ program, I get the same exception.

I am on the beginning using libreoffice on this side. I missing
information about using this libraries.

I want to open existing documents, replace placeholders with values from
databases and generate output for Calc Documents, PDF and Excel.


Am 23.05.19 um 14:22 schrieb Jan-Marek Glogowski:
> Hi Manfred,
>
>
> Would be nice if you can file a bug report[1].
>

Never done this before for documentfoundation.org, have no account there...

Manfred

--
COMPARAT Software-Entwicklungs-GmbH
Willy-Brandt-Allee 31a
23554 Lübeck


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: soffice headless on server consumes 100% CPU

On 23/05/2019 17:18, Manfred Rebentisch wrote:

> Hi,
>
> if I start soffice with
>
> --accept="socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"
>
> it runs normal.
> But if I want to connect from client C++ programm:
>
> sConnectionString =
> "socket,host=localhost,port=2083;urp;StarOffice.ServiceManager";
>
> xContextM = ::cppu::defaultBootstrap_InitialComponentContext();
>
> xServiceManagerM = xContextM->getServiceManager();
> xResolverM = Reference< XUnoUrlResolver > (xInterfaceM, UNO_QUERY);
>
> xInterfaceM = Reference< XInterface >(
>              xResolverM->resolve( sConnectionString ), UNO_QUERY );
>
> it throws an exception with: "UNO URL does not start with "uno:" "

The soffice --accept command-line option and the UNO
css.bridge.UnoUrlResolver service expect different kinds of arguments.
The latter is documented to expect a full uno URL (see
<http://udk.openoffice.org/common/man/spec/uno-url.html>), while the
former takes only connection-type,params and optional (defaulting to
"urp") protocol-name,params parts of such a URL.  (Though the former was
mis-documented to also take a uno URL, see
<https://gerrit.libreoffice.org/#/c/72859/> "Fix documented 'soffice
--accept' parameter syntax") for fixing that.

So run `soffice --accept=socket,host=localhost,port=2083\;urp` but call
xResolver->resolve("uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager").
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Manfred Rebentisch Manfred Rebentisch
Reply | Threaded
Open this post in threaded view
|

Re: soffice headless on server consumes 100% CPU

Hi Stephan,

Am 23.05.19 um 17:33 schrieb Stephan Bergmann:

>
> The soffice --accept command-line option and the UNO
> css.bridge.UnoUrlResolver service expect different kinds of arguments.
> The latter is documented to expect a full uno URL (see
> <http://udk.openoffice.org/common/man/spec/uno-url.html>), while the
> former takes only connection-type,params and optional (defaulting to
> "urp") protocol-name,params parts of such a URL.  (Though the former was
> mis-documented to also take a uno URL, see
> <https://gerrit.libreoffice.org/#/c/72859/> "Fix documented 'soffice
> --accept' parameter syntax") for fixing that.
>
> So run `soffice --accept=socket,host=localhost,port=2083\;urp` but call
> xResolver->resolve("uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager").
>

Thank you! In this way it works!

Manfred

--
COMPARAT Software-Entwicklungs-GmbH
Willy-Brandt-Allee 31a
23554 Lübeck


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice