From owner-freebsd-bugs@FreeBSD.ORG Thu Sep 6 13:30:02 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FA9F106564A for ; Thu, 6 Sep 2012 13:30:02 +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 303DA8FC12 for ; Thu, 6 Sep 2012 13:30:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q86DU2vl083837 for ; Thu, 6 Sep 2012 13:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q86DU2jE083821; Thu, 6 Sep 2012 13:30:02 GMT (envelope-from gnats) Resent-Date: Thu, 6 Sep 2012 13:30:02 GMT Resent-Message-Id: <201209061330.q86DU2jE083821@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, Bryan Drewery Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE49C106566C for ; Thu, 6 Sep 2012 13:24:14 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 6FD1C8FC0C for ; Thu, 6 Sep 2012 13:24:14 +0000 (UTC) Received: (qmail 18619 invoked from network); 6 Sep 2012 08:24:11 -0500 Received: from unknown (HELO test8.xzibition.com) (10.10.0.34) by sweb.xzibition.com with SMTP; 6 Sep 2012 08:24:11 -0500 Received: by test8.xzibition.com (sSMTP sendmail emulation); Thu, 06 Sep 2012 08:24:10 -0500 Message-Id: <20120906132414.DE49C106566C@hub.freebsd.org> Date: Thu, 06 Sep 2012 08:24:10 -0500 From: Bryan Drewery To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: pjd@FreeBSD.org, mm@FreeBSD.org Subject: kern/171380: [ZFS] 9.1: Panic when importing pool from OpenSolaris/OpenIndiana that has multiple FUID domains X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bryan Drewery List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 13:30:02 -0000 >Number: 171380 >Category: kern >Synopsis: [ZFS] 9.1: Panic when importing pool from OpenSolaris/OpenIndiana that has multiple FUID domains >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 06 13:30:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Bryan Drewery >Release: FreeBSD 9.1-PRERELEASE amd64 >Organization: >Environment: >Description: I imported a ZFS pool from an OpenIndiana system. When I tried to traverse into a certain directory, the system would panic: panic: avl_find() succeeded inside avl_add() avl_add+0x4b zfs_fuid_table_load+0x198 zfs_fuid_init+0x12c zfs_fuid_find_by_idx+0xc7 zfs_fuid_map_id+0x19 zfs_groupmember+0x16 zfs_zaccess_aces_check+0x196 zfs_zaccess+0xc6 zfs_freebsd_getattr+0x1c1 ugidfw_check_vp+0x6c mac_vnode_check_stat+0xa7 vn_stat+0x39 kern_statat_vnhook+0xf9 kern_statat+0x15 sys_stat+0x2a amd64_syscall+0x540 I disabled MAC/ugidfw and still had the issue: panic: avl_find() succeeded inside avl_add() avl_add+0x4b zfs_fuid_table_load+0x198 zfs_fuid_init+0x12c zfs_fuid_find_by_idx+0xc7 zfs_fuid_map_id+0x19 zfs_groupmember+0x16 zfs_zaccess_aces_check+0x196 zfs_zaccess+0xc6 zfs_freebsd_getattr+0x1c1 vn_stat+0x6a kern_statat_vnhook+0xf9 kern_statat+0x15 sys_lstat+0x2a amd64_syscall+0x540 The code that is causing issue is with importing FUIDs that have different domains. The FreeBSD code hardcodes "FreeBSD" as the domain, so importing two objects with two different domains, results in "FreeBSD" added to the avl tree twice, resulting in the panic. >How-To-Repeat: I've tried several times to create a pool on OpenSolaris 111,134 and OpenIndiana 151 with ACLs and modifying the ACLs over CIFS. I'm pretty certain that CIFS-created files are a major factor here. None of these datasets results in the panic though. I admit I am unclear where this FUID domain comes from, so I am unable to properly produce a dataset needed to produce the issue. >Fix: The panic was fixed by r230454 in HEAD on Jan 22 2012. MFCing it fixes it. After applying to my machine, I was able to traverse into these directories/files. >Release-Note: >Audit-Trail: >Unformatted: