Avoiding LibreOffice DOS

MJ mafsys1234 at gmail.com
Thu Oct 17 22:00:14 UTC 2019


On 18/10/2019 12:05 am, Andrea Venturoli wrote:
> On 2019-10-17 13:48, MJ wrote:
>
>> Well the short answer is: You pretty well can't.
>
> :-O
>
>
>
>> If LibreOffice gets in such a tight loop processing that the kernel can't process keyboard commands, then you've got no alternative.
>
> I thought root could always stop a user process!

Of course.


> I wasn't logged in as root at the time, but I'll previously log in (in a VT or via SSH) next time and see if this helps.
>
>
>
>> Unless you can wait for it to stop, if it will ever stop.
>
> It won't stop (at least in about an hour, which is too much to wait anyhow).
>
>
>
>> Mucking around with settings is a waste of time until you know what's causing the lock-up. Is it the cpu? Memory exhaustion? etc
>
> From the bars in my XFCE panel I don't think it's the CPU (BTW, this is a 4-core system).
> 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.

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.


>
> In the past I've seen several "Process X was killed due to out of swap space" messages (or the like, I don't have them in sight now); why doesn't it happen in this case?

Conjecture? There's a tight loop. Possibly/likely a bug in libreoffice? Is the keyboard/mouse responsive at all?


>
>
>
>> Running it virtually would seem the only quick practical approach
>
> I thought about this, but putting a virtual machine up would be a lot of work; besides, I'd like to understand and solve the problem at its root.
> Today it's LibreOffice; tomorrow who knows...
>
Understandable.
>
>
>> better still fix your program. :-)
>
> That's what I'm trying to do... but it's hard if I need to constantly reboot/fsck/etc... :-)

So this is a UFS system?

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.

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?

Cheers

Mark




More information about the freebsd-questions mailing list