From owner-freebsd-fs@freebsd.org Thu Aug 20 07:21:28 2015 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C94829BE87B for ; Thu, 20 Aug 2015 07:21:28 +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 mx1.freebsd.org (Postfix) with ESMTPS id 9D0A310C4 for ; Thu, 20 Aug 2015 07:21:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t7K7LSwK045803 for ; Thu, 20 Aug 2015 07:21:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 202358] [patch] [zfs] fix possible assert fail in sa_handle_get_from_db() Date: Thu, 20 Aug 2015 07:21:28 +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: 11.0-CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2015 07:21:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202358 Andriy Gapon changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gibbs@FreeBSD.org, | |mav@FreeBSD.org --- Comment #1 from Andriy Gapon --- (In reply to luke.tw from comment #0) I think that you correctly identified the problem. And what you describe seems to be only the part of the problem. It seems that illumos kmem cache API is used incorrectly for sa_cache. Its usage resembles how FreeBSD uma(9) could be used and that almost works with FreeBSD's emulation of kmem cache. The difference is that kmem_cache_create() is not as flexible as uma_create(): whereas the latter supports two ways of initialization an object - via init/fini and constructor/destructor, the former has only constructor/destructor support: http://illumos.org/man/9F/kmem_cache_create But the kmem cache's constructor and destructor work similarly to how the init and fini work in uma(9). And, apparently, that is a source of the confusion here. I am surprised that there are no bug reports about this API misuse from illumos users yet. It seems that the problem was introduced as a part of bigger changes in base r286575 which is an import of illumos/illumos-gate@bc9014e6a81272073b9854d9f65dd59e18d18c35 -- You are receiving this mail because: You are the assignee for the bug.