From owner-freebsd-current@FreeBSD.ORG Sat Jun 29 15:00:38 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2EAF367F; Sat, 29 Jun 2013 15:00:38 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id B1C731947; Sat, 29 Jun 2013 15:00:37 +0000 (UTC) Received: from outgoing.leidinger.net (p57A396DB.dip0.t-ipconnect.de [87.163.150.219]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 2072D8440CE; Sat, 29 Jun 2013 17:00:23 +0200 (CEST) Received: from unknown (Titan.Leidinger.net [192.168.1.17]) by outgoing.leidinger.net (Postfix) with ESMTP id A6152119E; Sat, 29 Jun 2013 17:00:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=leidinger.net; s=outgoing-alex; t=1372518020; bh=3TRKZgT/Eqf6Rm2lgVjbJqlCeHS3ES80HevWN/J80go=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=JOIJQuFz5/Meq3bbapEoRj/rvoxDSXBLkbbeu3J+90BhZkbqm7vsiVkqupJUqxaVE 1S58ZCGNDAvyqyKrGk46gWojcDtcGIxriFd5JEoi2RpclVu3QFTQvceeMCZqT7T0zz Up9s3ztkC9nxdG9loQ7DJA1wmDYsvEzlPWVMvdtbECwKyujuymkG8CPxqciq4K2WFS V/IRssoxQhXdOPkY5tBZ2yGaNnr9bSfj7gozk+xg1m7rfyLD432zZQ8racbLBTHbx7 gWSEDZE24dfD65b2F8usCK69lRAM+eTOgUFdSnw5KDaKFwHXHPJPWFjA8zAmgs7o1T xwe+N/QyxewuQ== Date: Sat, 29 Jun 2013 17:00:24 +0200 From: Alexander Leidinger To: Martin Matuska Subject: Re: zfs kernel panic, known incompatibilities with clang & CPUTYPE/COPTFLAGS? Message-ID: <20130629170024.0000145b@unknown> In-Reply-To: <51CECCDB.7040904@FreeBSD.org> References: <20130612223024.00003980@unknown> <20130614230702.00006aa0@unknown> <20130624101517.GA9630@thebe.jupiter.sigsegv.be> <20130624220801.0000492c@unknown> <20130627215832.GA9470@thebe.jupiter.sigsegv.be> <20130629120122.000041c7@unknown> <51CECCDB.7040904@FreeBSD.org> X-Mailer: Claws Mail 3.9.1-2-g66aa06 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 2072D8440CE.A06B9 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.024, required 6, autolearn=disabled, ALL_TRUSTED -1.00, AWL -0.15, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, TW_EV 0.08, TW_ZF 0.08, TW_ZJ 0.08, T_RP_MATCHES_RCVD -0.01, URIBL_BLOCKED 0.00) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1373122824.06539@hSHCwNjZkHEGVBnyPF3Edw X-EBL-Spam-Status: No Cc: Kristof Provost , current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jun 2013 15:00:38 -0000 On Sat, 29 Jun 2013 14:02:35 +0200 Martin Matuska wrote: > some input would be great (at least the panic message - ideally from a > debug kernel). The bt in the minidump is useless, but I made a bt directly in the kernel debugger: ---snip--- Fatal trap 12: page fault while in kernel mode cpuid = 2; apic id = 02 fault virtual address = 0x0 fault code = supervisor read instruction, page not present instruction pointer = 0x20:0x0 stack pointer = 0x28:0xffffff839e79d930 frame pointer = 0x28:0xffffff839e79d9e0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 2183 (zfs) db> bt Tracing pid 2356 uart_sab82532_class() at 0 devfs_ioctl_f() at devfs_ioctl_f+0xf0 kern_ioctl() at kern_ioctl+0x1d7 sys_ioctl() at sys_ioctl+0x142 ---snip--- The test case is easy, create a dataset for a jail, add something like this to /etc/devfs.rules: ---snip--- [devfsrules_unhide_zfs=12] add path zfs unhide [devfsrules_jail_withzfs=17] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add include $devfsrules_unhide_zfs ---snip--- Attach the dataset to the jail and see the box panicing on the use of the zfs command in the jail (maybe you don't even need to attach the dataset to the jail, maybe just the above devfs stuff is enough). The default jail scripts don't attach a ZFS dataset to a jail, the corresponding ezjail-script code is # Attach ZFS-datasets to the jail for zfs in ${ezjail_zfs_datasets}; do /sbin/zfs jail ${ezjail_id} ${zfs} || echo -n "Error: ${zfs} could not be configured" done Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137