Page 1 of 2

ZFS causing crash/reboot

PostPosted: Mon Oct 16, 2017 12:20 am
by RobRehnmark
I'm running High Sierra latest update.
I installed the latest ZFS with the help of zfsadm a few days ago.
I'm running it all on a Hackintosh. I doubt this is causing a problem but it could potentially be related to power saving or something.
(I have no problems with any other app or kext.)

Sometimes the computer is suddenly rebooted during import of my pool as if I had pressed the hardware reset button.
It seems a bit "moody", sometimes it will do this during several startups in a row.
Right now I'm booted, everything seems to be working fine. iTunes, Photos and Time Machine is working well on the ZFS pool.

If I try to start a scrub it will delay for a couple of seconds, like normal, but instead of returning the prompt after having started the scrub it just reboots.
This happens every time I try to scrub.

Any tips on what to do or how to analyse this problem?

zfs and spl versions:
Code: Select all
 137    1 0xffffff7f82e55000 0x3f8      0x3f8      net.lundman.kernel.dependencies.30 (12.5.0) EABE2046-57AE-4F8D-8EEB-15176843E226
 138    1 0xffffff7f82e56000 0x11f5000  0x11f5000  net.lundman.spl (1.6.2) 47DF1BD7-98FE-38D1-88DF-2BB62C86AAC9 <137 7 5 4 3 1>
 139    1 0xffffff7f8404b000 0x2b4000   0x2b4000   net.lundman.zfs (1.6.2) E26C25E4-D481-3968-B88C-BD1B70BA4403 <138 26 7 5 4 3 1>

Re: ZFS causing crash/reboot

PostPosted: Mon Oct 16, 2017 12:55 am
by RobRehnmark
Very strange.
I'm running a scrub now and it seems fine so far.
I waited until there was no activity and no mdworker going on but I don't know if that made any difference.
We'll see how it pans out from here.
If there are any tests or anything you'd like me to do just let me know.

Re: ZFS causing crash/reboot

PostPosted: Mon Oct 16, 2017 1:10 pm
by Brendon
You really need to submit the crashdump that should have been generated when the machine crashed for analysis.

Cheers
Brendon

Re: ZFS causing crash/reboot

PostPosted: Mon Oct 16, 2017 2:40 pm
by RobRehnmark
Yes, of course, you're right.
I was a bit stressed for time and didn't really deal with it.
I hope there is something but I'm not sure since it really just rebooted as if I'd hit the reset button.
I'll look into it when I can, right now it's the middle of the night and I'm on my way home from work.

Re: ZFS causing crash/reboot

PostPosted: Mon Oct 16, 2017 2:57 pm
by jdwhite
RobRehnmark wrote:I hope there is something but I'm not sure since it really just rebooted as if I'd hit the reset button.

For what it's worth, I recently encountered a seemingly similar issue. Turns out while trying to copy a zfs volume from one disk to another my machine would just reset as if I'd held the power button. After watching this reset several times I noted that the activity light on one of the disks in my ZFS array was lit solid for several seconds just before the machine reset. I noticed this same behavior several times.

I was further frustrated by the fact that I had no *.crash logs. Then I removed the suspect disk from the array and suddenly everything was better. Turns out that this was an issue with macOS (10.12.6) (or OpenZFSOSX?) not dealing well with a failing disk. Had no issues until I was trying to copy the entire contents of the array to a different ZFS vdev.

-Jason

Re: ZFS causing crash/reboot

PostPosted: Mon Oct 16, 2017 8:08 pm
by lundman
Try using sysctl to turn on zfs_recover before you scrub - it will dump any bad items into the kernel log

Re: ZFS causing crash/reboot

PostPosted: Tue Oct 17, 2017 12:22 am
by RobRehnmark
lundman wrote:Try using sysctl to turn on zfs_recover before you scrub - it will dump any bad items into the kernel log

I will do that if I get problems again.
I'm no hacker though, do I simply do "sudo sysctl zfs_recover=on/1"?

Re: ZFS causing crash/reboot

PostPosted: Tue Oct 17, 2017 4:27 am
by jdwhite
RobRehnmark wrote:
lundman wrote:Try using sysctl to turn on zfs_recover before you scrub - it will dump any bad items into the kernel log

I will do that if I get problems again.
I'm no hacker though, do I simply do "sudo sysctl zfs_recover=on/1"?


Code: Select all
sudo sysctl -w kstat.zfs.darwin.tunable.zfs_recover=1

If successful it will return: kstat.zfs.darwin.tunable.zfs_recover: 0 -> 1

Re: ZFS causing crash/reboot

PostPosted: Tue Oct 17, 2017 6:42 am
by RobRehnmark
jdwhite wrote:
Code: Select all
sudo sysctl -w kstat.zfs.darwin.tunable.zfs_recover=1

If successful it will return: kstat.zfs.darwin.tunable.zfs_recover: 0 -> 1


Thanks!

Re: ZFS causing crash/reboot

PostPosted: Tue Oct 17, 2017 4:51 pm
by lundman
Apologies my reply was terse, I was on phone :)