From owner-freebsd-current@FreeBSD.ORG Fri Feb 8 11:48:29 2013 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2D89EABD; Fri, 8 Feb 2013 11:48:29 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 87E32F25; Fri, 8 Feb 2013 11:48:28 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.6/8.14.6) with ESMTP id r18BmQEq044930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 8 Feb 2013 12:48:26 +0100 (CET) (envelope-from uqs@FreeBSD.org) Date: Fri, 8 Feb 2013 12:48:25 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Fabian Keil , zont@FreeBSD.org, avg@FreeBSD.org Subject: Re: geli(8) breaks after a couple hours of uptime Message-ID: <20130208114825.GY35868@acme.spoerlein.net> Mail-Followup-To: Fabian Keil , zont@FreeBSD.org, avg@FreeBSD.org, current@FreeBSD.org References: <20130207141833.GA15884@acme.spoerlein.net> <20130207153322.5c371beb@fabiankeil.de> <20130207180153.GX35868@acme.spoerlein.net> <20130208095709.6ae61cff@fabiankeil.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130208095709.6ae61cff@fabiankeil.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2013 11:48:29 -0000 On Fri, 2013-02-08 at 09:57:09 +0100, Fabian Keil wrote: > Ulrich Spörlein wrote: > > > On Thu, 2013-02-07 at 15:33:22 +0100, Fabian Keil wrote: > > > Ulrich Spörlein wrote: > > > > > > > Yes, it's pretty much as weird as it sounds. All new machine, forklifted > > > > the image from on old i386 machine running 8.x to current on amd64. > > > > > > > > Everything seemingly works fine, attaching geli volumes shortly after > > > > boot is fine, attached devices continue to work fine. There are no > > > > strange crashes with this machine or anything, but when I try to attach > > > > an USB volume the next day, geli attach segfaults. > > > > > > This could be: > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=174831 > > > Except it happens to me when run as root, and: > > Depending on your settings the limit could still apply. > Did you check with ulimit -l to be sure? > > > root@coyote:~# sysctl vm.old_mlock > > vm.old_mlock: 0 > > Looks like I got the logic wrong in the PR ... > > fk@r500 ~ $sysctl -d vm.old_mlock > vm.old_mlock: Do not apply RLIMIT_MEMLOCK on mlockall > > Fabian Of course! root@coyote:~# ulimit -l 64 The problem here is that I login via my user account, then either use sudo or sudo -i for a root shell, this however does not raise the memorylocked limit. So when I said this works during boot and shortly after, it's because I haven't started my screen session yet, through which I do all the work, usually, but have logged in with a direct root shell. D'oh! It looks like 128k as a limit is still too low for geli(8) to work, and I've set it to 256k now, so that I can use "sudo geli". Can you maybe revise the patch to not use 1024k as an arbitrary limit, but rather make sure you test for precisely as much memory as will be needed? Also, can we maybe revisit the new 64k default limit, as it will obviously make peoples work with geli a bit painful, this should work out of the box. Thanks Uli