KP with import -d

This forum is to find answers to problems you may be having with ZEVO Community Edition.

Moderators: jhartley, MSR734, nola

KP with import -d

Post by jsb204 » Mon Sep 17, 2012 6:22 pm

I've found that Zevo often exhibits a kernel panic when running zpool import with the "-d <dir>" option. Has anyone else observed this? I've never seen this happen with MacZFS.


Code: Select all
Mon Sep 17 16:08:55 2012
panic(cpu 2 caller 0xffffff80002d1208): Kernel trap at 0xffffff7f8088ef9c, type 14=page fault, registers:
CR0: 0x0000000080010033, CR2: 0x0000000000000000, CR3: 0x00000001141fc000, CR4: 0x0000000000000660
RAX: 0x0000000000000000, RBX: 0xffffff801006c500, RCX: 0xffffff8010064a00, RDX: 0x0000000000000000
RSP: 0xffffff808710baf0, RBP: 0xffffff808710bb30, RSI: 0xffffff80113fad00, RDI: 0x0000000000000000
R8:  0xffffff808710bb70, R9:  0xffffff808710bb90, R10: 0x0000000000000156, R11: 0xffffff800052b944
R12: 0xffffff8010064a00, R13: 0xffffff808710bb90, R14: 0x0000005b8bfa7a00, R15: 0x0000000000000000
RFL: 0x0000000000010246, RIP: 0xffffff7f8088ef9c, CS:  0x0000000000000008, SS:  0x0000000000000010
Error code: 0x0000000000000000

Backtrace (CPU 2), Frame : Return Address
0xffffff808710b790 : 0xffffff8000204d15
0xffffff808710b890 : 0xffffff80002d1208
0xffffff808710b9e0 : 0xffffff80002e3f4a
0xffffff808710b9f0 : 0xffffff7f8088ef9c
0xffffff808710bb30 : 0xffffff7f808921a7
0xffffff808710bbe0 : 0xffffff800031801a
0xffffff808710bc40 : 0xffffff800030c73e
0xffffff808710bc70 : 0xffffff80002eeb81
0xffffff808710bca0 : 0xffffff80002eec13
0xffffff808710bcc0 : 0xffffff80003185f3
0xffffff808710bd70 : 0xffffff800023eabc
0xffffff808710bdd0 : 0xffffff800030b248
0xffffff808710be30 : 0xffffff800049593c
0xffffff808710bed0 : 0xffffff8000495f36
0xffffff808710bf40 : 0xffffff80004e8168
0xffffff808710bfa0 : 0xffffff80002e4874
      Kernel Extensions in backtrace (with dependencies):
         com.apple.iokit.IOStorageFamily(1.6.3)@0xffffff7f80884000->0xffffff7f8089dfff

BSD process name corresponding to current thread: zpool

Mac OS version:
10K549

Kernel version:
Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64
System model name: iMac11,1 (Mac-F2268DAE)
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: KP with import -d

Post by dbrady » Tue Sep 18, 2012 5:40 pm

What was the directory used with the -d option? "/dev/" ?

Were there ZFS disks attached, and if so where they from another platform?

Thanks
dbrady
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: KP with import -d

Post by jsb204 » Tue Sep 18, 2012 8:36 pm

dbrady wrote:What was the directory used with the -d option? "/dev/" ?

Yep, it is rather reproducible with /dev. Steps to reproduce:

1. Import a zpool (I've tried with both ZevoCE and MacZFS-created zpools)

2. Export said pool

3. Run zpool import -d /dev

I expected zpool import to look in /dev by default (as I think MacZFS does), but it seems like it only looks in /dev/dsk.

I'm pretty sure I observed a KP one time while attempting to mount zfs disk images in a regular directory, but have not been able to reproduce it.
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: KP with import -d

Post by dbrady » Wed Sep 19, 2012 1:04 pm

We haven't been able to reproduce. Does this only happen on 10.6.8?

Are you running the zpool command as root/sudo or as an admin user?

Note that zpool import only looks in /dev/dsk/ by design since it's only looking for ZFS devices. ZEVO will create an entry in/dev/dsk/ for every ZFS GPT partition (6A898CC3-1DD2-11B2-99A6-080020736631) during the IOKit probe. The "-d" is only intended as a fallback in case someone accidentally placed ZFS in a non-ZFS partition (like Apple_HFS). We don't officially support importing pools from other platforms When we do, they'll likely get /dev/dsk/ entries as well).
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: KP with import -d

Post by jsb204 » Wed Sep 19, 2012 2:43 pm

dbrady wrote:We haven't been able to reproduce. Does this only happen on 10.6.8?

Sorry, I don't have a Lion or ML machine that I can use for testing, so my data is restricted to 10.6.8. It is 100% reproducible for me, the key step is importing and then exporting a pool before trying the -d /dev command.

dbrady wrote:Are you running the zpool command as root/sudo or as an admin user?

Running as root.

Thanks for taking the time to reply.
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: KP with import -d

Post by dbrady » Thu Sep 20, 2012 10:03 pm

We still cannot reproduce this using 10.6.8. Could you send us a the output of a "diskutil list" that shows your zfs disks. Do you happen to know if some of your zfs disks are in some other partition type than ZFS?
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: KP with import -d

Post by jsb204 » Fri Sep 21, 2012 7:51 pm

dbrady wrote:We still cannot reproduce this using 10.6.8. Could you send us a the output of a "diskutil list" that shows your zfs disks. Do you happen to know if some of your zfs disks are in some other partition type than ZFS?


Here are two terminal sessions ending in kernel panics. As you can see, sometimes one has to play around with it for awhile to trigger a problem.

Code: Select all
sh-3.2# diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.9 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS backup                  600.0 GB   disk1s2
   3:                        ZFS                         399.7 GB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *2.0 TB     disk2
   1:        Apple_partition_map                         32.3 KB    disk2s1
   2:                  Apple_HFS jsb                     2.0 TB     disk2s2

sh-3.2# zpool import -D
  pool: tpool
    id: 5610325854391297086
 state: ONLINE (DESTROYED)
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
   some features will not be available without an explicit 'zpool upgrade'.
config:

   tpool                                        ONLINE
     GPTE_9C715E50-C0E1-4D59-A943-275C82EE2217  ONLINE

sh-3.2# zpool import -fD tpool

sh-3.2# zpool list
NAME     SIZE   ALLOC    FREE     CAP  HEALTH  ALTROOT
tpool   372Gi   156Ki   372Gi      0%  ONLINE  -

sh-3.2# zpool export tpool

sh-3.2# zpool import -d /dev
  pool: tpool
    id: 5610325854391297086
 state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
   some features will not be available without an explicit 'zpool upgrade'.
config:

   tpool           ONLINE
     /dev/disk1s3  ONLINE

sh-3.2# zpool import tpool

sh-3.2# zpool destroy tpool

sh-3.2# zpool create testpool /dev/disk1s3

sh-3.2# zpool list
NAME        SIZE   ALLOC    FREE     CAP  HEALTH  ALTROOT
testpool   372Gi   244Ki   372Gi      0%  ONLINE  -

sh-3.2# zpool export  testpool

sh-3.2# zpool import -d /dev

*bang*


Code: Select all
sh-3.2# zpool list
NAME        SIZE   ALLOC    FREE     CAP  HEALTH  ALTROOT
testpool   372Gi   485Ki   372Gi      0%  ONLINE  -
sh-3.2# diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.9 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS backup                  600.0 GB   disk1s2
   3:                        ZFS                         399.7 GB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:             zfs_pool_proxy testpool               *399.4 GB   disk2
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *2.0 TB     disk3
   1:        Apple_partition_map                         32.3 KB    disk3s1
   2:                  Apple_HFS jsb                     2.0 TB     disk3s2

sh-3.2# zpool export testpool

sh-3.2# zpool import -d /dev
  pool: testpool
    id: 2718849431541938165
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

   testpool        ONLINE
     /dev/disk1s3  ONLINE

sh-3.2# zpool import testpool

sh-3.2# zpool export testpool

sh-3.2# zpool import -d /dev
  pool: testpool
    id: 2718849431541938165
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

   testpool        ONLINE
     /dev/disk1s3  ONLINE

sh-3.2# zpool import testpool

sh-3.2# zpool list
NAME        SIZE   ALLOC    FREE     CAP  HEALTH  ALTROOT
testpool   372Gi   658Ki   372Gi      0%  ONLINE  -

sh-3.2# zpool export testpool

sh-3.2# zpool import -d /dev
  pool: testpool
    id: 2718849431541938165
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

   testpool        ONLINE
     /dev/disk1s3  ONLINE

sh-3.2# zpool import  testpool

sh-3.2# zfs create testpool/testfs

sh-3.2# zpool export testpool

sh-3.2# zpool import -d /dev

*bang*
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: KP with import -d

Post by dbrady » Fri Sep 21, 2012 11:52 pm

I finally found a way to reproduce this. Know that we know the cause, we can focus on a fix. In the mean time, try to avoid using the fallback "-d" imports after an preceding export.
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

fix in the 2012-09-23 build

Post by grahamperrin » Thu Sep 27, 2012 12:24 am

grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to Troubleshooting

Who is online

Users browsing this forum: bileyqrkq, ilovezfs and 0 guests

cron