From owner-freebsd-fs@FreeBSD.ORG Sat Dec 10 16:15:21 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3617F1065677 for ; Sat, 10 Dec 2011 16:15:21 +0000 (UTC) (envelope-from kamil.choudhury@anserinae.net) Received: from hapkido.dreamhost.com (hapkido.dreamhost.com [66.33.216.122]) by mx1.freebsd.org (Postfix) with ESMTP id 0BBDE8FC16 for ; Sat, 10 Dec 2011 16:15:20 +0000 (UTC) Received: from homiemail-a91.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by hapkido.dreamhost.com (Postfix) with ESMTP id 153A917EEBF for ; Sat, 10 Dec 2011 07:50:08 -0800 (PST) Received: from homiemail-a91.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a91.g.dreamhost.com (Postfix) with ESMTP id 8069A36A06D for ; Sat, 10 Dec 2011 07:50:07 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=anserinae.net; h=message-id:date :subject:from:to:reply-to:mime-version:content-type: content-transfer-encoding; q=dns; s=anserinae.net; b=kM9mHxNvfAs qUDLkXf91VaPbQjXT2dIGoKxk9PHlMTGA1s4JNbuas2ouHHAeKCMylxceDip7cGd VJFVRtoGv9lDI/o77E6pLfFiPGF/GO5XzeuMICUsZGFkxbWQB4JJQNmnc4e8A30c 1sqYV3bG0vEIOmb8SwschmaLaHDxUiNc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=anserinae.net; h= message-id:date:subject:from:to:reply-to:mime-version :content-type:content-transfer-encoding; s=anserinae.net; bh=5z0 VX2UJDs19JvnZzwXmqM6OfMQ=; b=TaJKs4PiUtuX8exFmQ4kQqbiONicrX4r4o1 P+4nVEbWbnJbER2rHYLJByywQV5bgHq9/v2SXd7Et2KigtuxQCQUmbxXWcIdcQpC TVIoG3LKZlylEAplOIaTNGQwH+tf4CO9p78LhU9E7TP3wncnmCX9FELYEYRjCduW 9Wf2kvyY= Received: from webmail.anserinae.net (ahfbbjcaiaae.dreamhost.com [75.119.208.4]) (Authenticated sender: kamil.choudhury@anserinae.net) by homiemail-a91.g.dreamhost.com (Postfix) with ESMTPA id 7D10A36A06B for ; Sat, 10 Dec 2011 07:50:07 -0800 (PST) Received: from 68.173.236.44 (proxying for 68.173.236.44) (SquirrelMail authenticated user kamil.choudhury@anserinae.net) by webmail.anserinae.net with HTTP; Sat, 10 Dec 2011 10:50:07 -0500 Message-ID: Date: Sat, 10 Dec 2011 10:50:07 -0500 From: "Kamil Choudhury" To: freebsd-fs@freebsd.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: mysterious sysctl failure on nullfs mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kamil.choudhury@anserinae.net List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Dec 2011 16:15:21 -0000 Hi all: I've been trying to figure out what's going on with this bug for a few da= ys now: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=3D899628+0+current/freebsd-p= orts-bugs Summary: you mount the virtualbox binaries to /usr/local/ via nullfs, and execution fails with a syctl error. I've figured out the bit of code that's causing the error, and I've encapsulated it in the following (small) program: #include #include #include #include #include int main( void ) { char g_szSupLibHardenedExePath[5000]; int aiName[4]; aiName[0] =3D CTL_KERN; aiName[1] =3D KERN_PROC; aiName[2] =3D KERN_PROC_PATHNAME; aiName[3] =3D getpid(); size_t cbPath =3D sizeof( g_szSupLibHardenedExePath ); printf( "%d\n", cbPath ); if(sysctl(aiName, 4, g_szSupLibHardenedExePath, &cbPath, NULL, 0)= < 0) printf( "sysctl failed" ); else printf( "sysctl succeeded" ); return( 0 ); } Here's where it gets weird: if the code is executed in in /usr/local/lib/virtualbox, it fails with the sysctl error. If the code is executed in another location on the *same* nullfs mount (say, /usr/local/bin/), it executes fine. There seems to be a something at a filesystem level that's preventing execution -- does anyone on the list know what that something may be? Thanks, Kamil