From owner-freebsd-fs@freebsd.org Sun May 20 21:23:54 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1966BEF0917 for ; Sun, 20 May 2018 21:23:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 8C3B8716DB for ; Sun, 20 May 2018 21:23:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 42980EF0916; Sun, 20 May 2018 21:23:53 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 303DBEF0915 for ; Sun, 20 May 2018 21:23:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1673716D9 for ; Sun, 20 May 2018 21:23:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id D78291BCD9 for ; Sun, 20 May 2018 21:23:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KLNpL3010972 for ; Sun, 20 May 2018 21:23:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4KLNpb4010965 for fs@FreeBSD.org; Sun, 20 May 2018 21:23:51 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 203906] ZFS lockup, spa_namespace_lock Date: Sun, 20 May 2018 21:23:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 21:23:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203906 --- Comment #15 from Andriy Gapon --- (In reply to Alexandre Kovalenko from comment #11) So, it's: 13 100015 geom g_event mi_switch+0xe6 sleepq_wait+0x2c _sx_xlock_hard+0x314 zvol_geom_access+0x148 g_access+0x1fd g_eli_read_metadata+0x249 g_eli_config+0x3ed g_run_events+0x13e fork_exit+0= x83 fork_trampoline+0xe=20 930 100354 zfsd - mi_switch+0xe6 sleepq_wait+0x2c _sleep+0x23e g_access+0xf7 vdev_geom_attach+0x61c vdev_attach_ok+0x29 vdev_geom_open+0x394 vdev_open+0x115 vdev_open_children+0x30 vdev_root_open+0x3a vdev_open+0x115 spa_ld_open_vdevs+0x5e spa_ld_mos_init+0x1be spa_ld_mos_with_trusted_config+0x19 spa_load+0x5c spa_load_best+0x6b spa_open_common+0x11d spa_get_stats+0x4f=20 I think I know what's going on in your case (not sure if it's the same a as previous reports in this bug). It's probably a consequence of base r330977= , a fix to bug 225960. I didn't fully realize at that time, but that commit introduced a "g_access lock" in disguise. So, we went from a LOR between geom topology lock and spa_namespace_lock to= a race caused by dropping the topology lock to a LOR between spa_namespace_lo= ck and "g_access lock". The toughest part now is to decide how to solve the LOR without re-introduc= ing the race. Or alternatively, how to solve the race without introducing a deadlock. --=20 You are receiving this mail because: You are the assignee for the bug.=