From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 18 19:29:22 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2EDC1065670; Mon, 18 Jan 2010 19:29:22 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 452278FC13; Mon, 18 Jan 2010 19:29:22 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o0IJT5q6001219; Mon, 18 Jan 2010 20:29:20 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o0IJT5IZ001218; Mon, 18 Jan 2010 20:29:05 +0100 (CET) (envelope-from olli) Date: Mon, 18 Jan 2010 20:29:05 +0100 (CET) Message-Id: <201001181929.o0IJT5IZ001218@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, jhs@berklix.com, dougb@FreeBSD.ORG In-Reply-To: <4B549B67.90206@FreeBSD.org> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 18 Jan 2010 20:29:20 +0100 (CET) Cc: Subject: Re: limits for run away Firefox ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 19:29:22 -0000 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