zfs kernel panic, known incompatibilities with clang & CPUTYPE/COPTFLAGS?

Alexander Leidinger Alexander at Leidinger.net
Sat Jun 29 15:00:38 UTC 2013

On Sat, 29 Jun 2013 14:02:35 +0200
Martin Matuska <mm at FreeBSD.org> 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:
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

The test case is easy, create a dataset for a jail, add something like
this to /etc/devfs.rules:
add path zfs unhide

add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add include $devfsrules_unhide_zfs

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"


http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

More information about the freebsd-current mailing list