Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2010 20:29:05 +0100 (CET)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-hackers@FreeBSD.ORG, jhs@berklix.com, dougb@FreeBSD.ORG
Subject:   Re: limits for run away Firefox ?
Message-ID:  <201001181929.o0IJT5IZ001218@lurza.secnetix.de>
In-Reply-To: <4B549B67.90206@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Barton wrote:
 > On 01/17/10 17:07, Julian H. Stacey wrote:
 > > Hi hackers
 > > I'm tired of my X server occasionaly freezing, swap thrasing, & firefox dumps:
 > >       4,346,937,344 ~/firefox-bin.core
 > > so as a temporary cludge I ran
 > >       touch ~/firefox-bin.core ; chmod 000  ~/firefox-bin.core
 > 
 > Sorry I don't have a solution to your actual problem, but a better way
 > to deal with this is to do: ln -s /dev/null ~/firefox-bin.core

I think not generating a core dump at all is better than
writing 4 GB to /dev/null.  Thus:

alias firefox='/usr/bin/limits -c 0 /usr/local/bin/firefox3'

solves the problem of not generating a core dump.  Of course,
if firefox is started by other means (e.g. through a desktop
icon or a WM menu), the "limits -c 0" command should be added
there instead.

By the way, if you don't want any coredumps at all, you can
disable them globally with sysctl kern.coredump=0.

Another part of the problem is that the firefox process grows
that big at all.  I suggest you watch the size of the process
during normal operation ("SIZE" in top(1) or "VSS" in ps(1)),
and then make an apropriate virtualmem size limit for the
firefox process.  This is the -v option to the limits(1) tool.

HTH.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"Perl will consistently give you what you want,
unless what you want is consistency."
        -- Larry Wall



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001181929.o0IJT5IZ001218>