From owner-freebsd-bugs@FreeBSD.ORG Sun Jan 20 21:20:04 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5270616A47E for ; Sun, 20 Jan 2008 21:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 399ED13C43E for ; Sun, 20 Jan 2008 21:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0KLK4c6084653 for ; Sun, 20 Jan 2008 21:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0KLK4pP084650; Sun, 20 Jan 2008 21:20:04 GMT (envelope-from gnats) Resent-Date: Sun, 20 Jan 2008 21:20:04 GMT Resent-Message-Id: <200801202120.m0KLK4pP084650@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kirk Strauser Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D7A416A419 for ; Sun, 20 Jan 2008 21:19:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 5AEB413C4F8 for ; Sun, 20 Jan 2008 21:19:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m0KLIIJB093153 for ; Sun, 20 Jan 2008 21:18:18 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m0KLIIBm093152; Sun, 20 Jan 2008 21:18:18 GMT (envelope-from nobody) Message-Id: <200801202118.m0KLIIBm093152@www.freebsd.org> Date: Sun, 20 Jan 2008 21:18:18 GMT From: Kirk Strauser To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/119842: "Bad address" with smbfs inside a jail X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2008 21:20:04 -0000 >Number: 119842 >Category: kern >Synopsis: "Bad address" with smbfs inside a jail >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 20 21:20:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Kirk Strauser >Release: 7.0-PRERELEASE >Organization: The Day Companies >Environment: FreeBSD jail1.daycos.com 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Sat Jan 19 11:16:27 CST 2008 root@jail1.daycos.com:/usr/obj/usr/src/sys/JAIL1 i386 >Description: I have a very new FreeBSD 7 build on a server: ------------------------- $ uname -a FreeBSD jail1.daycos.com 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Sat Jan 19 11:16:27 CST 2008     root@jail1.daycos.com:/usr/obj/usr/src/sys/JAIL1  i386 ------------------------- Its kernel is very close to GENERIC (and I've tried GENERIC with /etc/make.conf:CPUTYPE unset just to rule it out): ------------------------- $ cat /usr/src/sys/i386/conf/JAIL1 include                 GENERIC ident                   JAIL1 options                 PMAP_SHPGPERPROC=301 nooption                SCHED_4BSD option                  SCHED_ULE # Don't let Mike accidentally reboot the server option                  SC_DISABLE_REBOOT       # disable reboot key sequence ------------------------- I have the same smbfs share mounted in two different places on the system: once inside the "main" system and once inside a jail.  I'm having a problem with the jailed version when copying new files: ------------------------- $ cp /mnt/tiffsrv/vdrive/Scanned/2008/01/20/2008012014450000.tif /tmp/foo cp: /tmp/foo: Bad address ------------------------- This only affects new files; that is, ones that have been created since the filesystem was mounted.  If I unmount/remount the filesystem, that copy succeeds: ------------------------- $ cp /mnt/tiffsrv/vdrive/Scanned/2008/01/20/2008012014450000.tif /tmp/foo $ ------------------------- The fstab entries for those mounts are identical: ------------------------- $ grep tiffsrv /etc/fstab //web2@tiffsrv/vdrive /mnt/tiffsrv/vdrive smbfs rw,noexec 0 0 $ grep tiffsrv /etc/fstab.web2 //web2@tiffsrv/vdrive /var/jail/web2/mnt/tiffsrv/vdrive smbfs rw,noexec 0 0 ------------------------- >How-To-Repeat: Mount an smbfs somewhere that a jail can access it. Inside the jail, create a file inside the smbfs mount. Inside the same jail, try copy that file to, say, /tmp. This will randomly, but often (maybe 50% of the time) fail with "Bad address". >Fix: unmount and remount the smbfs share. This is suboptimal in production. >Release-Note: >Audit-Trail: >Unformatted: