[Libreoffice] UNO Object Life Cycle question
sbergman at redhat.com
Wed Jan 11 05:47:29 PST 2012
On 01/11/2012 12:51 PM, Tomas Hlavaty wrote:
>>> Is there a mechanism that when a link between the server and client
>>> bridge breaks, the server releases the resources properly, or do we
>>> get/expect memory leaks?
>> In some sense this is a QoI issue.
> What is "a QoI issue"? Quality of Information? You mean that the
> server must be able to detect disconnection, which works with sockets
> but wouldn't work for example with named pipes?
Quality of Implementation, sorry. As I wrote the other day, UNO largely
tries to pretend that interprocess communication is no different from
intraprocess communication. So questions of how to react to a lost
connection are somewhat outside the scope of the UNO specification.
> My use case is as follows:
> 1) connect to LO via unix domain socket
> 2) load and traverse (via uno) a large word document (about 1200 pages
> of plain text)
> 3) close the connection
> And repeat many times with long running LO process.
> The memory usage keeps growing, slightly but persistently. Is it a
> leak, or a feature of the custom LO allocator, or would it stabilise
Setting G_SLICE=always-malloc environment variable should help rule out
the LO memory allocator.
I can easily imagine that there is a leak somewhere. Why the numbers
are different with different release strategies is hard to tell. In
principle, it could be that releasing a remotely held UNO object early
releases more additional data structures than if it is only released
later, if the indirectly referenced data structures change in the
meantime (e.g., mass release during connection loss might hypothetically
lead to unreclaimable ring references).
More information about the LibreOffice