fabioz23 / maczfs

Automatically exported from code.google.com/p/maczfs
Other
0 stars 0 forks source link

secpolicy_zinject causes kernel panic #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install the MacZFS-76.0.7 package
2. Created a zpool with a single raidz vdev with 3 drives
3. In a terminal execute zpool status

What is the expected output? What do you see instead?
Expected: actual zpool status, Actual: Kernel panic. (See attached panic log)

What version of the product are you using? On what operating system?
76.0.7 on OS X 10.6.5

Please provide any additional information below.
On a Mac mini (2GHz C2D/intel graphics) and an iMac (2.8GHz i7/ATI HD 4850)

Original issue reported on code.google.com by patri...@gmail.com on 2 Jan 2011 at 12:53

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, will take a look

Original comment by alex.ble...@gmail.com on 3 Jan 2011 at 5:52

GoogleCodeExporter commented 9 years ago
$ sudo installer -target / -pkg MacZZS-76.0.7.pkg 
Password:
installer: Package name is Mac ZFS 76.0.7
installer: Upgrading at base path /
installer: The upgrade was successful.
$ sudo zpool status
no pools available
$ zpool create Foobar /var/tmp/disc1
$ zpool status
  pool: Foobar
 state: ONLINE
 scrub: none requested
config:

    NAME              STATE     READ WRITE CKSUM
    Foobar            ONLINE       0     0     0
      /var/tmp/disc1  ONLINE       0     0     0

errors: No known data errors

Original comment by alex.ble...@gmail.com on 4 Jan 2011 at 10:10

GoogleCodeExporter commented 9 years ago
$ sudo installer -target / -pkg MacZZS-76.0.7.pkg 
Password:
installer: Package name is Mac ZFS 76.0.7
installer: Upgrading at base path /
installer: The upgrade was successful.
$ sudo zpool status
no pools available
$ zpool create Foobar /var/tmp/disc1
$ zpool status
  pool: Foobar
 state: ONLINE
 scrub: none requested
config:

    NAME              STATE     READ WRITE CKSUM
    Foobar            ONLINE       0     0     0
      /var/tmp/disc1  ONLINE       0     0     0

errors: No known data errors

Original comment by alex.ble...@gmail.com on 4 Jan 2011 at 10:10

GoogleCodeExporter commented 9 years ago
Maybe the issue is related to the fact it's a 3-disk zraid. Will look into that.

Original comment by alex.ble...@gmail.com on 4 Jan 2011 at 10:53

GoogleCodeExporter commented 9 years ago
This is the same issue as reported on the mailing list:

https://groups.google.com/group/zfs-macos/browse_thread/thread/1acbdd56f64c435f

0x34f9eb45 <zfsdev_ioctl+68>:   mov    %eax,%ebx
0x34fbc662 <secpolicy_zinject+17>:  test   %eax,%eax

It looks like a page fault is triggering this code which has a bug in it. I'll 
see if I can reproduce it.

Original comment by alex.ble...@gmail.com on 4 Jan 2011 at 11:15

GoogleCodeExporter commented 9 years ago

Original comment by alex.ble...@gmail.com on 4 Jan 2011 at 11:15

GoogleCodeExporter commented 9 years ago
From the prior mailing list:

These seem to be the same error, in: 
0x35f532f7 <zfsdev_ioctl+68> 
 calls 
0x35f71a11 <secpolicy_zinject+17> 
I suspect the code is coming from here: 
https://github.com/alblue/mac-zfs/blob/613276b9c2e874eecbee8223d1c957... 
 calling 
https://github.com/alblue/mac-zfs/blob/613276b9c2e874eecbee8223d1c957... 
Though quite why that should fail is unclear at this point. 

Original comment by alex.ble...@gmail.com on 4 Jan 2011 at 11:16

GoogleCodeExporter commented 9 years ago
I can't reproduce this. Is it always reproducible for you? I can try to put 
something in place but don't know if it will fix it other than you being able 
to check  

Original comment by alex.ble...@gmail.com on 4 Jan 2011 at 11:10

GoogleCodeExporter commented 9 years ago
Yes, it happens every time I run "zpool status" - so I'll be able to verify it.

Original comment by patr...@m.ac.nz on 4 Jan 2011 at 11:14

GoogleCodeExporter commented 9 years ago
Did this also happen with ZFS 74.0.1? I imagine the issue would be there as 
well. If so I can try a fix based on that instead for the interim to reduce 
other changes being implicated.  

Original comment by alex.ble...@gmail.com on 5 Jan 2011 at 10:33

GoogleCodeExporter commented 9 years ago
This didn't happen for me with 74.0.1

Original comment by patr...@m.ac.nz on 7 Jan 2011 at 3:14

GoogleCodeExporter commented 9 years ago
I've put a new build up which has fixed some issues with the prior build. 
However, the filesystem causes a panic on unmount which I still have to 
investigate.

I've only done brief testing on this so far but has cleaned up a couple of 
issues. I've not been able to replicate this bug however so I don't know if it 
will fix it.

http://code.google.com/p/maczfs/downloads/detail?name=MacZFS-77.0.9.pkg&can=2&q=

Can you try removing the contents of /System/Library/Frameworks/zfs.kext prior 
to installing to ensure that there's no bit difference that might be causing 
problems?

Original comment by alex.ble...@gmail.com on 9 Jan 2011 at 11:22

GoogleCodeExporter commented 9 years ago
That has indeed fixed it, thanks

Original comment by patri...@gmail.com on 19 Jan 2011 at 12:41

GoogleCodeExporter commented 9 years ago

Original comment by alex.ble...@gmail.com on 20 Jan 2011 at 1:09