Avoiding LibreOffice DOS

Andrea Venturoli ml at netfence.it
Fri Oct 18 12:31:38 UTC 2019

On 2019-10-17 23:59, MJ wrote:

>> As I said, I think it's a problem with memory.
> Oh did you? I saw you mention "vmemoryuse" but didn't understand whether 
> you meant this was the cause or just an attempt to fix one cause.

Sorry, maybe I should have made this clearer.

> If it is memory related, perhaps you need to create a larger swap space. 
> It might just get you over the hump of exhausting memory enough for 
> Libreoffice to complete whatever it is it's trying to do.

My guess is that it will use as much as it's available.

> Conjecture? There's a tight loop. Possibly/likely a bug in libreoffice? 

Possibly, but, as I said, I'm trying to approach this from an OS 
perspective as a general case.
This time it was LibreOffice, but I was also able to reproduce this with 
different applications (e.g. remove swap, fire up a couple of VirtualBox 
VMs to eat most memory, open several pages in FireFox).

> Is the keyboard/mouse responsive at all?

Sometimes it is: moving the mouse (slowly) moves the pointer. Switching 
to a VT console works, I can enter the username, but then it'll get 
stuck before the password prompt.
Other times no input device seems to work.

> So this is a UFS system?

What difference does it make?
Apart from limiting the ARC size in case I need virtual machines, I mean.

> As to ulimit, I'm not sure it will have the affect you desire. You could 
> ulimit -v YOUR_VALUE; exec your_program and try.
> Have you considered using a login class - create a new user, give them 
> fixed resource limits (like you tried on your own account?) and run 
> within that user domain?
> Set the stacksize small.

I'll try.

> However, I'm not sure what this achieves. All you will do is run the 
> program until it encounters the bug, then it will die because of 
> resource exhaustion (best case) and so what have you achieved?

That's exactly what I'm trying to achieve: have the memory hog program 
killed, without the need to hard-reset the system, so saving all the rest.

  bye & Thanks

More information about the freebsd-questions mailing list