mds kernel panic with -o readonly=on (TrueCrypt scenario)

Moderators: jhartley, MSR734, nola

mds kernel panic with -o readonly=on (TrueCrypt scenario)

Post by grahamperrin » Sun Oct 21, 2012 2:17 am

Steps to reproduce a kernel panic

  1. Give a TrueCrypt disk to ZEVO
  2. restart the computer
  3. use TrueCrypt to attempt a read-only mount
  4. observe the report from TrueCrypt that hdiutil failed to attach the image
  5. as superuser, use zpool to attempt a read-only import.

Logs, .panic files etc.

First occurrence: http://www.wuala.com/grahamperrin/publi ... de=gallery

Second occurrence: http://www.wuala.com/grahamperrin/publi ... de=gallery

From the second occurrence, lines logged around the time of the failed attempt by TrueCrypt include:

Code: Select all
2012-10-21 07:25:55.000   kernel[0]   ZFSLabelScheme:probe: label 'crypt', vdev 11764303400396822435
2012-10-21 07:25:55.000   kernel[0]   ZFSLabelScheme:start: 'crypt' critical mass with 1 vdev(s) (importing)
2012-10-21 07:25:55.000   kernel[0]   zfsx_kev_importpool:'crypt' (12887253980953825356)
2012-10-21 07:25:55.000   kernel[0]   zfsx_vdm_open: couldn't open 'disk4s1' WRITE
2012-10-21 07:25:55.000   kernel[0]   zfsx_vdm_open: couldn't open 'disk4s1' WRITE
2012-10-21 07:25:55.000   kernel[0]   zfsdev_ioctl: function error 19 on command 2
2012-10-21 07:25:55.000   kernel[0]   zfsx_vdm_open: couldn't open 'disk4s1' WRITE
2012-10-21 07:25:55.000   kernel[0]   zfsx_vdm_open: couldn't open 'disk4s1' WRITE
2012-10-21 07:25:55.000   kernel[0]   zfsdev_ioctl: function error 19 on command 2


An extract from the second .panic file:

Code: Select all
panic(cpu 1 caller 0xffffff7f889b01b7): "/staging/zevo/src/uts/common/fs/zfs/txg.c:544 ZFS assertion failed: tx->tx_threads == 2"@/staging/zevo/src/uts/darwin/os/printf.c:43
Backtrace (CPU 1), Frame : Return Address
0xffffff811c11af80 : 0xffffff800841d626
0xffffff811c11aff0 : 0xffffff7f889b01b7
0xffffff811c11b000 : 0xffffff7f88a0a388
0xffffff811c11b040 : 0xffffff7f889ecd0e
0xffffff811c11b080 : 0xffffff7f889d17f5
0xffffff811c11b530 : 0xffffff7f88a51927
0xffffff811c11b880 : 0xffffff7f88a39239
0xffffff811c11bb70 : 0xffffff8008513746
0xffffff811c11bc00 : 0xffffff8008502c12
0xffffff811c11bf50 : 0xffffff80087e182a
0xffffff811c11bfb0 : 0xffffff80084ced33
      Kernel Extensions in backtrace:
         com.getgreenbytes.filesystem.zfs(2012.9.23)[04497DBB-8849-31D8-8496-BE10E5711C53]@0xffffff7f889a5000->0xffffff7f88b3ffff
            dependency: com.apple.iokit.IOStorageFamily(1.8)[5BA4CD36-E96D-3A9E-ADFF-A863BBD63BC7]@0xffffff7f88978000

BSD process name corresponding to current thread: mds
Boot args: -v

Mac OS version:
12C60

Kernel version:
Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
Kernel UUID: 69A5853F-375A-3EF4-9247-478FD0247333
Kernel slide:     0x0000000008200000
Kernel text base: 0xffffff8008400000
System model name: MacBookPro5,2 (Mac-F2268EC8)

System uptime in nanoseconds: 1016057766096
last loaded kext at 568028770725: com.github.osxfuse.filesystems.osxfusefs   2.5.2 (addr 0xffffff7f8aa2a000, size 102400)
last unloaded kext at 114767043101: com.apple.driver.AppleFileSystemDriver   3.0.1 (addr 0xffffff7f8a7c6000, size 8192)


For forum search purposes, some key phrases are repeated without formatting:

panic(cpu 1 caller 0xffffff7f889b01b7): "/staging/zevo/src/uts/common/fs/zfs/txg.c:544 ZFS assertion failed: tx->tx_threads == 2"@/staging/zevo/src/uts/darwin/os/printf.c:43

Kernel Extensions in backtrace:
com.getgreenbytes.filesystem.zfs(2012.9.23)[04497DBB-8849-31D8-8496-BE10E5711C53]@0xffffff7f889a5000->0xffffff7f88b3ffff
dependency: com.apple.iokit.IOStorageFamily(1.8)[5BA4CD36-E96D-3A9E-ADFF-A863BBD63BC7]@0xffffff7f88978000

BSD process name corresponding to current thread: mds

last loaded kext at 568028770725: com.github.osxfuse.filesystems.osxfusefs 2.5.2 (addr 0xffffff7f8aa2a000, size 102400)
last unloaded kext at 114767043101: com.apple.driver.AppleFileSystemDriver 3.0.1 (addr 0xffffff7f8a7c6000, size 8192

Environment

  • OS X 10.8.2
  • FUSE for OS X 2.5.2
  • TrueCrypt 7.1.1
  • ZEVO Community Edition 1.1.1

Thoughts

This type of panic may:

  • be easily avoidable
  • help us to consider possible causes of panics in other scenarios.

Maybe way off: is a superuser run of zpool appropriate in a userspace (FUSE) where processes owned by root may be disallowed? Postscript: probably ignore this paragraph – when the file system is mounted normally, root can work with the volume:

Code: Select all
sh-3.2$ sudo su
sh-3.2# whoami
root
sh-3.2# ls -l /Volumes/crypt
total 17
-rw-r--r--@ 1 gjp22  wheel  6148 21 Oct 10:40 .DS_Store
d-wx-wx-wt@ 2 root   wheel     2 21 Oct 05:48 .Trashes
drwx------  2 root   wheel    23 21 Oct 10:43 .fseventsd
-rw-r--r--@ 1 gjp22  wheel     0 21 Oct 05:51 test.txt
sh-3.2# exit
exit
sh-3.2$ exit
exit
macbookpro08-centrim:~ gjp22$ date
Sun 21 Oct 2012 10:49:37 BST
macbookpro08-centrim:~ gjp22$
Last edited by grahamperrin on Sun Oct 21, 2012 4:51 am, edited 2 times in total.
grahamperrin Offline

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

alternative steps to reproduce

Post by grahamperrin » Sun Oct 21, 2012 4:39 am

Note, the ZFS volume crypt is owned by the logged in user gjp22 – not owned by root:

Code: Select all
macbookpro08-centrim:~ gjp22$ ls -@alde /Volumes/crypt
drwxr-xr-x  4 gjp22  wheel  5 21 Oct 05:51 /Volumes/crypt
macbookpro08-centrim:~ gjp22$


Alternative steps to reproduce

Without superuser privileges:

  1. use TrueCrypt to mount normally
  2. export
  3. attempt a read-only import.

First occurrence: http://www.wuala.com/grahamperrin/publi ... de=gallery

Second occurrence: http://www.wuala.com/grahamperrin/publi ... de=gallery
grahamperrin Offline

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


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron