Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lockup on inode lookup with xattr=sa and acltype=posixacl #2214

Closed
akorn opened this issue Mar 26, 2014 · 17 comments
Closed

Lockup on inode lookup with xattr=sa and acltype=posixacl #2214

akorn opened this issue Mar 26, 2014 · 17 comments
Milestone

Comments

@akorn
Copy link
Contributor

akorn commented Mar 26, 2014

Hi,

I have a zfs instance with a few thousand inodes in use, all of which have POSIX ACLs. The pool uses xattr=sa and acltype=posixacl.

After a while, corruption occurs such that looking up specific inodes (e.g. by way of "ls -l" in a directory) results in a crash.

I have collected some stack traces via netconsole (which perhaps explains while the lines are a bit disjointed):

2014-03-26T06:42:08+01:00 unable to handle kernel 
2014-03-26T06:42:08+01:00 request
2014-03-26T06:42:08+01:00 ffffffffa058b458
2014-03-26T06:42:08+01:00 
2014-03-26T06:42:08+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T06:42:08+01:00 180d067 
2014-03-26T06:42:08+01:00 180e063 
2014-03-26T06:42:08+01:00 42a7d3067 
2014-03-26T06:42:08+01:00 0
2014-03-26T06:42:08+01:00 
2014-03-26T06:42:08+01:00 0000 [#1] 
2014-03-26T06:42:08+01:00 
2014-03-26T06:42:08+01:00 
2014-03-26T06:42:08+01:00 linked in:
2014-03-26T06:42:08+01:00 3 PID: 28586 Comm: rsync Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T06:42:08+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T06:42:08+01:00 ffff880154193100 ti: ffff8802f0464000 task.ti: ffff8802f0464000
2014-03-26T06:42:08+01:00 0010:[<ffffffffa04c8591>] 
2014-03-26T06:42:08+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T06:42:08+01:00 0018:ffff8802f0465668  EFLAGS: 00010207
2014-03-26T06:42:08+01:00 0000000196f518d8 RBX: 0000000002000000 RCX: ffffffffa05041a0
2014-03-26T06:42:08+01:00 00000001ef41f800 RSI: 0000000000000230 RDI: 000000000000ffff
2014-03-26T06:42:08+01:00 ffff8802f0465668 R08: d49001787b908d4b R09: 002dd752c4aa49b8
2014-03-26T06:42:08+01:00 ffff8802f0465650 R11: ffff8802f0465668 R12: 0000000000000001
2014-03-26T06:42:08+01:00 ffff8801d0197388 R14: ffff8801d01973c0 R15: ffffc900756aff80
2014-03-26T06:42:08+01:00  00007fa9407ad700(0000) GS:ffff88043fcc0000(0000) knlGS:0000000000000000
2014-03-26T06:42:08+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T06:42:08+01:00 ffffffffa058b458 CR3: 00000002ca423000 CR4: 00000000001407e0
2014-03-26T06:42:08+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T06:42:08+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T06:42:08+01:00 
2014-03-26T06:42:08+01:00 Trace:
2014-03-26T06:42:08+01:00 arc_get_data_buf.isra.19+0x355/0x4b0 [zfs]
2014-03-26T06:42:08+01:00 arc_buf_alloc+0xe4/0x120 [zfs]
2014-03-26T06:42:08+01:00 arc_read+0x22f/0x8a0 [zfs]
2014-03-26T06:42:08+01:00 ? dbuf_do_evict+0x70/0x70 [zfs]
2014-03-26T06:42:08+01:00 dbuf_read+0x262/0x810 [zfs]
2014-03-26T06:42:08+01:00 dmu_spill_hold_by_dnode+0x4a/0x150 [zfs]
2014-03-26T06:42:08+01:00 dmu_spill_hold_existing+0x143/0x150 [zfs]
2014-03-26T06:42:08+01:00 sa_get_spill.part.8+0x22/0x80 [zfs]
2014-03-26T06:42:08+01:00 sa_attr_op+0x30e/0x420 [zfs]
2014-03-26T06:42:08+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T06:42:08+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T06:42:08+01:00 sa_lookup+0x3d/0x60 [zfs]
2014-03-26T06:42:08+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T06:42:08+01:00 zfs_dirent_lock+0x44c/0x5b0 [zfs]
2014-03-26T06:42:08+01:00 ? xdrmem_dec_bytes+0x73/0xb0 [spl]
2014-03-26T06:42:08+01:00 zfs_get_xattrdir+0x81/0x190 [zfs]
2014-03-26T06:42:08+01:00 ? nvlist_common+0x115/0x1d0 [znvpair]
2014-03-26T06:42:08+01:00 zfs_lookup+0x1cd/0x330 [zfs]
2014-03-26T06:42:08+01:00 __zpl_xattr_get+0x7c/0x220 [zfs]
2014-03-26T06:42:08+01:00 ? in_group_p+0x2c/0x30
2014-03-26T06:42:08+01:00 zpl_xattr_get+0x62/0x120 [zfs]
2014-03-26T06:42:08+01:00 zpl_get_acl+0xd6/0x240 [zfs]
2014-03-26T06:42:08+01:00 ? __d_lookup+0x7a/0x180
2014-03-26T06:42:08+01:00 ? link_path_walk+0x24a/0x870
2014-03-26T06:42:08+01:00 zpl_xattr_acl_get+0x49/0x100 [zfs]
2014-03-26T06:42:08+01:00 zpl_xattr_acl_get_access+0xd/0x10 [zfs]
2014-03-26T06:42:08+01:00 generic_getxattr+0x47/0x70
2014-03-26T06:42:08+01:00 vfs_getxattr+0x54/0x70
2014-03-26T06:42:08+01:00 getxattr+0xa6/0x1c0
2014-03-26T06:42:08+01:00 ? final_putname+0x1d/0x40
2014-03-26T06:42:08+01:00 ? putname+0x26/0x40
2014-03-26T06:42:08+01:00 ? user_path_at_empty+0x5a/0x90
2014-03-26T06:42:08+01:00 ? SYSC_newlstat+0x32/0x40
2014-03-26T06:42:08+01:00 SyS_getxattr+0x50/0x90
2014-03-26T06:42:08+01:00 system_call_fastpath+0x1a/0x1f
2014-03-26T06:42:08+01:00 
2014-03-26T06:42:08+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T06:42:08+01:00 <ffff8802f0465668>
2014-03-26T06:42:08+01:00 ffffffffa058b458
2014-03-26T06:42:08+01:00 end trace e11ee486d0d00f2f ]---
2014-03-26T06:42:08+01:00 panic - not syncing: Fatal exception
2014-03-26T06:42:09+01:00 in 60 seconds..
2014-03-26T06:43:09+01:00 
2014-03-26T06:43:09+01:00 MEMORY or I/O RESET_REG.
2014-03-26T12:43:29+01:00 unable to handle kernel 
2014-03-26T12:43:29+01:00 request
2014-03-26T12:43:29+01:00 ffffffffa05b8458
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T12:43:29+01:00 180d067 
2014-03-26T12:43:29+01:00 180e063 
2014-03-26T12:43:29+01:00 428576067 
2014-03-26T12:43:29+01:00 0
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 0000 [#1] 
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 linked in:
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 2 PID: 20956 Comm: java Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T12:43:29+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T12:43:29+01:00 ffff88042aae3100 ti: ffff88037214c000 task.ti: ffff88037214c000
2014-03-26T12:43:29+01:00 0010:[<ffffffffa04f5591>] 
2014-03-26T12:43:29+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T12:43:29+01:00 0018:ffff88037214d7c0  EFLAGS: 00010207
2014-03-26T12:43:29+01:00 000000011526e7c8 RBX: 0000000002000000 RCX: ffffffffa05311a0
2014-03-26T12:43:29+01:00 00000001ef41f800 RSI: 0000000000000230 RDI: 000000000000ffff
2014-03-26T12:43:29+01:00 ffff88037214d7c0 R08: d49001787b908d4b R09: 002dd752c4aa49b8
2014-03-26T12:43:29+01:00 ffff88037214d7a8 R11: ffff88037214d7c0 R12: 0000000000000001
2014-03-26T12:43:29+01:00 ffff8802c9c3e838 R14: ffff8802c9c3e870 R15: ffffc9004fbb2f80
2014-03-26T12:43:29+01:00  00002b79e22d2700(0000) GS:ffff88043fc80000(0000) knlGS:0000000000000000
2014-03-26T12:43:29+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T12:43:29+01:00 ffffffffa05b8458 CR3: 00000003e38a4000 CR4: 00000000001407e0
2014-03-26T12:43:29+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T12:43:29+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 Trace:
2014-03-26T12:43:29+01:00 arc_get_data_buf.isra.19+0x355/0x4b0 [zfs]
2014-03-26T12:43:29+01:00 arc_buf_alloc+0xe4/0x120 [zfs]
2014-03-26T12:43:29+01:00 arc_read+0x22f/0x8a0 [zfs]
2014-03-26T12:43:29+01:00 ? dbuf_do_evict+0x70/0x70 [zfs]
2014-03-26T12:43:29+01:00 dbuf_read+0x262/0x810 [zfs]
2014-03-26T12:43:29+01:00 dmu_spill_hold_by_dnode+0x4a/0x150 [zfs]
2014-03-26T12:43:29+01:00 dmu_spill_hold_existing+0x143/0x150 [zfs]
2014-03-26T12:43:29+01:00 ? load_balance+0xd8/0x710
2014-03-26T12:43:29+01:00 sa_get_spill.part.8+0x22/0x80 [zfs]
2014-03-26T12:43:29+01:00 sa_attr_op+0x30e/0x420 [zfs]
2014-03-26T12:43:29+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:43:29+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T12:43:29+01:00 sa_lookup+0x3d/0x60 [zfs]
2014-03-26T12:43:29+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:43:29+01:00 zfs_dirent_lock+0x44c/0x5b0 [zfs]
2014-03-26T12:43:29+01:00 ? xdrmem_dec_bytes+0x73/0xb0 [spl]
2014-03-26T12:43:29+01:00 zfs_get_xattrdir+0x81/0x190 [zfs]
2014-03-26T12:43:29+01:00 ? __inode_permission+0x42/0xd0
2014-03-26T12:43:29+01:00 ? nvlist_common+0x115/0x1d0 [znvpair]
2014-03-26T12:43:29+01:00 zfs_lookup+0x1cd/0x330 [zfs]
2014-03-26T12:43:29+01:00 __zpl_xattr_get+0x7c/0x220 [zfs]
2014-03-26T12:43:29+01:00 ? tsd_exit+0x5f/0x2a0 [spl]
2014-03-26T12:43:29+01:00 zpl_xattr_get+0x62/0x120 [zfs]
2014-03-26T12:43:29+01:00 ? final_putname+0x1d/0x40
2014-03-26T12:43:29+01:00 zpl_get_acl+0xd6/0x240 [zfs]
2014-03-26T12:43:29+01:00 generic_permission+0x1e9/0x230
2014-03-26T12:43:29+01:00 __inode_permission+0x42/0xd0
2014-03-26T12:43:29+01:00 inode_permission+0x13/0x40
2014-03-26T12:43:29+01:00 SyS_faccessat+0xd1/0x200
2014-03-26T12:43:29+01:00 SyS_access+0x13/0x20
2014-03-26T12:43:29+01:00 system_call_fastpath+0x1a/0x1f
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 
2014-03-26T12:43:29+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T12:43:29+01:00 <ffff88037214d7c0>
2014-03-26T12:43:29+01:00 ffffffffa05b8458
2014-03-26T12:43:29+01:00 end trace 145be2dcccbf61a0 ]---
2014-03-26T12:43:29+01:00 panic - not syncing: Fatal exception
2014-03-26T12:43:29+01:00 in 60 seconds..
2014-03-26T12:44:29+01:00 
2014-03-26T12:44:29+01:00 MEMORY or I/O RESET_REG.
2014-03-26T12:46:05+01:00 unable to handle kernel 
2014-03-26T12:46:05+01:00 request
2014-03-26T12:46:05+01:00 ffffffffa041f1c0
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T12:46:05+01:00 180d067 
2014-03-26T12:46:05+01:00 180e063 
2014-03-26T12:46:05+01:00 4287b7067 
2014-03-26T12:46:05+01:00 419ff1161
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 0003 [#1] 
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 linked in:
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 1 PID: 20969 Comm: ls Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T12:46:05+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T12:46:05+01:00 ffff880419c748a0 ti: ffff88036dc10000 task.ti: ffff88036dc10000
2014-03-26T12:46:05+01:00 0010:[<ffffffffa01bfb72>] 
2014-03-26T12:46:05+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T12:46:05+01:00 0018:ffff88036dc115c8  EFLAGS: 00010246
2014-03-26T12:46:05+01:00 00000001ef41f800 RBX: ffffffffa041f120 RCX: ffffffffa03f71a0
2014-03-26T12:46:05+01:00 0000000000000030 RSI: 0000000000000230 RDI: ffffffffa041f120
2014-03-26T12:46:05+01:00 ffff88036dc116a8 R08: d49001787b908d4b R09: 002dd752c4aa49b8
2014-03-26T12:46:05+01:00 ffff88036dc116a0 R11: ffff88036dc116b8 R12: 0000000000000001
2014-03-26T12:46:05+01:00 ffff88036e17e7c0 R14: 0000000000000230 R15: ffffffffa041f1c0
2014-03-26T12:46:05+01:00  00002b72405d4080(0000) GS:ffff88043fc40000(0000) knlGS:0000000000000000
2014-03-26T12:46:05+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T12:46:05+01:00 ffffffffa041f1c0 CR3: 000000036eb05000 CR4: 00000000001407e0
2014-03-26T12:46:05+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T12:46:05+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 Trace:
2014-03-26T12:46:05+01:00 ? __blk_run_queue+0x2e/0x40
2014-03-26T12:46:05+01:00 ? blk_queue_bio+0x2dd/0x3b0
2014-03-26T12:46:05+01:00 ? generic_make_request+0xc2/0x110
2014-03-26T12:46:05+01:00 ? submit_bio+0x6c/0x150
2014-03-26T12:46:05+01:00 ? bio_alloc_bioset+0x11e/0x1d0
2014-03-26T12:46:05+01:00 zio_buf_alloc+0x1e/0x20 [zfs]
2014-03-26T12:46:05+01:00 arc_get_data_buf.isra.19+0x355/0x4b0 [zfs]
2014-03-26T12:46:05+01:00 arc_buf_alloc+0xe4/0x120 [zfs]
2014-03-26T12:46:05+01:00 arc_read+0x22f/0x8a0 [zfs]
2014-03-26T12:46:05+01:00 ? dbuf_do_evict+0x70/0x70 [zfs]
2014-03-26T12:46:05+01:00 dbuf_read+0x262/0x810 [zfs]
2014-03-26T12:46:05+01:00 dmu_spill_hold_by_dnode+0x4a/0x150 [zfs]
2014-03-26T12:46:05+01:00 ? __wake_up+0x3f/0x50
2014-03-26T12:46:05+01:00 dmu_spill_hold_existing+0x143/0x150 [zfs]
2014-03-26T12:46:05+01:00 sa_get_spill.part.8+0x22/0x80 [zfs]
2014-03-26T12:46:05+01:00 sa_attr_op+0x30e/0x420 [zfs]
2014-03-26T12:46:05+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:46:05+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T12:46:05+01:00 sa_lookup+0x3d/0x60 [zfs]
2014-03-26T12:46:05+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:46:05+01:00 zfs_dirent_lock+0x44c/0x5b0 [zfs]
2014-03-26T12:46:05+01:00 ? xdrmem_dec_bytes+0x73/0xb0 [spl]
2014-03-26T12:46:05+01:00 zfs_get_xattrdir+0x81/0x190 [zfs]
2014-03-26T12:46:05+01:00 ? nvlist_common+0x115/0x1d0 [znvpair]
2014-03-26T12:46:05+01:00 zfs_lookup+0x1cd/0x330 [zfs]
2014-03-26T12:46:05+01:00 __zpl_xattr_get+0x7c/0x220 [zfs]
2014-03-26T12:46:05+01:00 zpl_xattr_get+0x62/0x120 [zfs]
2014-03-26T12:46:05+01:00 zpl_xattr_security_get+0x5c/0x80 [zfs]
2014-03-26T12:46:05+01:00 generic_getxattr+0x47/0x70
2014-03-26T12:46:05+01:00 vfs_getxattr+0x54/0x70
2014-03-26T12:46:05+01:00 getxattr+0xa6/0x1c0
2014-03-26T12:46:05+01:00 ? final_putname+0x1d/0x40
2014-03-26T12:46:05+01:00 ? putname+0x26/0x40
2014-03-26T12:46:05+01:00 ? user_path_at_empty+0x5a/0x90
2014-03-26T12:46:05+01:00 ? SYSC_newlstat+0x32/0x40
2014-03-26T12:46:05+01:00 SyS_lgetxattr+0x4d/0x80
2014-03-26T12:46:05+01:00 system_call_fastpath+0x1a/0x1f
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 Error processing log message: <f0> 
2014-03-26T12:46:05+01:00 
2014-03-26T12:46:05+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T12:46:05+01:00 <ffff88036dc115c8>
2014-03-26T12:46:05+01:00 ffffffffa041f1c0
2014-03-26T12:46:05+01:00 end trace 1e5b689f8cce9959 ]---
2014-03-26T12:46:05+01:00 panic - not syncing: Fatal exception
2014-03-26T12:46:05+01:00 in 60 seconds..
2014-03-26T12:47:05+01:00 
2014-03-26T12:47:05+01:00 MEMORY or I/O RESET_REG.
2014-03-26T12:49:31+01:00 protection fault: 0000 [#1] 
2014-03-26T12:49:31+01:00 
2014-03-26T12:49:31+01:00 
2014-03-26T12:49:31+01:00 linked in:
2014-03-26T12:49:31+01:00 
2014-03-26T12:49:31+01:00 2 PID: 21345 Comm: zsh Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T12:49:31+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T12:49:31+01:00 ffff88035fce1820 ti: ffff88035437e000 task.ti: ffff88035437e000
2014-03-26T12:49:31+01:00 0010:[<ffffffffa01b4b72>] 
2014-03-26T12:49:31+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T12:49:31+01:00 0018:ffff88035437f710  EFLAGS: 00010246
2014-03-26T12:49:31+01:00 00000001ef41f800 RBX: 481074e589485500 RCX: ffffffffa054d1a0
2014-03-26T12:49:31+01:00 0000000000000030 RSI: 0000000000000230 RDI: 481074e589485500
2014-03-26T12:49:31+01:00 ffff88035437f7f0 R08: d49001787b908d4b R09: 002dd752c4aa49b8
2014-03-26T12:49:31+01:00 ffff88035437f7e8 R11: ffff88035437f800 R12: 0000000000000001
2014-03-26T12:49:31+01:00 ffff8803564b6f40 R14: 0000000000000230 R15: 481074e5894855a0
2014-03-26T12:49:31+01:00  00007fac909cd700(0000) GS:ffff88043fc80000(0000) knlGS:0000000000000000
2014-03-26T12:49:31+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T12:49:31+01:00 00000000009a98b0 CR3: 00000003542bc000 CR4: 00000000001407e0
2014-03-26T12:49:31+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T12:49:31+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T12:49:31+01:00 
2014-03-26T12:49:31+01:00 Trace:
2014-03-26T12:49:31+01:00 ? sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T12:49:31+01:00 ? sa_lookup+0x48/0x60 [zfs]
2014-03-26T12:49:31+01:00 ? dmu_object_size_from_db+0x64/0x90 [zfs]
2014-03-26T12:49:31+01:00 ? zfs_inode_update+0x126/0x190 [zfs]
2014-03-26T12:49:31+01:00 zio_buf_alloc+0x1e/0x20 [zfs]
2014-03-26T12:49:31+01:00 arc_get_data_buf.isra.19+0x355/0x4b0 [zfs]
2014-03-26T12:49:31+01:00 arc_buf_alloc+0xe4/0x120 [zfs]
2014-03-26T12:49:31+01:00 arc_read+0x22f/0x8a0 [zfs]
2014-03-26T12:49:31+01:00 ? dbuf_do_evict+0x70/0x70 [zfs]
2014-03-26T12:49:31+01:00 dbuf_read+0x262/0x810 [zfs]
2014-03-26T12:49:31+01:00 dmu_spill_hold_by_dnode+0x4a/0x150 [zfs]
2014-03-26T12:49:31+01:00 ? cpumask_next_and+0x2e/0x40
2014-03-26T12:49:31+01:00 ? cpumask_next_and+0x2e/0x40
2014-03-26T12:49:31+01:00 dmu_spill_hold_existing+0x143/0x150 [zfs]
2014-03-26T12:49:31+01:00 sa_get_spill.part.8+0x22/0x80 [zfs]
2014-03-26T12:49:31+01:00 sa_attr_op+0x30e/0x420 [zfs]
2014-03-26T12:49:31+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:49:31+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T12:49:31+01:00 sa_lookup+0x3d/0x60 [zfs]
2014-03-26T12:49:31+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:49:31+01:00 zfs_dirent_lock+0x44c/0x5b0 [zfs]
2014-03-26T12:49:31+01:00 ? xdrmem_dec_bytes+0x73/0xb0 [spl]
2014-03-26T12:49:31+01:00 ? in_group_p+0x2c/0x30
2014-03-26T12:49:31+01:00 zfs_get_xattrdir+0x81/0x190 [zfs]
2014-03-26T12:49:31+01:00 ? nvlist_common+0x115/0x1d0 [znvpair]
2014-03-26T12:49:31+01:00 zfs_lookup+0x1cd/0x330 [zfs]
2014-03-26T12:49:31+01:00 __zpl_xattr_get+0x7c/0x220 [zfs]
2014-03-26T12:49:31+01:00 zpl_xattr_get+0x62/0x120 [zfs]
2014-03-26T12:49:31+01:00 ? final_putname+0x1d/0x40
2014-03-26T12:49:31+01:00 zpl_get_acl+0xd6/0x240 [zfs]
2014-03-26T12:49:31+01:00 generic_permission+0x1e9/0x230
2014-03-26T12:49:31+01:00 __inode_permission+0x42/0xd0
2014-03-26T12:49:31+01:00 inode_permission+0x13/0x40
2014-03-26T12:49:31+01:00 SyS_chdir+0x42/0xc0
2014-03-26T12:49:31+01:00 system_call_fastpath+0x1a/0x1f
2014-03-26T12:49:31+01:00 
2014-03-26T12:49:31+01:00 Error processing log message: <f0> 
2014-03-26T12:49:31+01:00 
2014-03-26T12:49:31+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T12:49:31+01:00 <ffff88035437f710>
kern.notice: Mar 26 12:49:31 kernel: general protection fault: 0000 [#1] SMP 
2014-03-26T12:49:31+01:00 end trace 42bfd74278cc53bd ]---
kern.notice: Mar 26 12:49:31 kernel: Modules linked in: xt_nat iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables netconsole nfsd dummy ext4 crc16 jbd2 mbcache capi capidrv isdn fuse zfs(PO) zunicode(PO) zavl(PO) coretemp zcommon(PO) hwmon znvpair(PO) intel_powerclamp kvm_intel kvm spl(O) zlib_deflate crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel iTCO_wdt aes_x86_64 lrw iTCO_vendor_support gf128mul glue_helper ablk_helper fcpci(PO) cryptd i2c_i801 kernelcapi lpc_ich mfd_core evdev hid_generic e1000e(O)
2014-03-26T12:49:31+01:00 panic - not syncing: Fatal exception
2014-03-26T12:49:31+01:00 in 60 seconds..
2014-03-26T12:50:31+01:00 
2014-03-26T12:50:31+01:00 MEMORY or I/O RESET_REG.
2014-03-26T12:57:43+01:00 unable to handle kernel 
2014-03-26T12:57:43+01:00 request
2014-03-26T12:57:43+01:00 ffffffffa0622458
2014-03-26T12:57:43+01:00 
2014-03-26T12:57:43+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T12:57:43+01:00 180d067 
2014-03-26T12:57:43+01:00 180e063 
2014-03-26T12:57:43+01:00 42a2e4067 
2014-03-26T12:57:43+01:00 0
2014-03-26T12:57:43+01:00 
2014-03-26T12:57:43+01:00 0000 [#1] 
2014-03-26T12:57:43+01:00 
2014-03-26T12:57:43+01:00 
2014-03-26T12:57:43+01:00 linked in:
2014-03-26T12:57:43+01:00 
2014-03-26T12:57:43+01:00 3 PID: 22156 Comm: ls Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T12:57:43+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T12:57:43+01:00 ffff8803e9830820 ti: ffff880343ba0000 task.ti: ffff880343ba0000
2014-03-26T12:57:43+01:00 0010:[<ffffffffa055f591>] 
2014-03-26T12:57:43+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T12:57:43+01:00 0018:ffff880343ba16b8  EFLAGS: 00010207
2014-03-26T12:57:43+01:00 00000001ef41f800 RBX: 0000000002000000 RCX: ffffffffa059b1a0
2014-03-26T12:57:43+01:00 0000000000000030 RSI: 0000000000000230 RDI: 000000000000ffff
2014-03-26T12:57:43+01:00 ffff880343ba16b8 R08: d49001787b908d4b R09: 002dd752c4aa49b8
2014-03-26T12:57:43+01:00 ffff880343ba16a0 R11: ffff880343ba16b8 R12: 0000000000000001
2014-03-26T12:57:43+01:00 ffff88039e4ea040 R14: ffff88039e4ea078 R15: ffffc9005cad9f80
2014-03-26T12:57:43+01:00  00007f67387c97c0(0000) GS:ffff88043fcc0000(0000) knlGS:0000000000000000
2014-03-26T12:57:43+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T12:57:43+01:00 ffffffffa0622458 CR3: 00000003038cb000 CR4: 00000000001407e0
2014-03-26T12:57:43+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T12:57:43+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T12:57:43+01:00 
2014-03-26T12:57:43+01:00 Trace:
2014-03-26T12:57:43+01:00 arc_get_data_buf.isra.19+0x355/0x4b0 [zfs]
2014-03-26T12:57:43+01:00 arc_buf_alloc+0xe4/0x120 [zfs]
2014-03-26T12:57:43+01:00 arc_read+0x22f/0x8a0 [zfs]
2014-03-26T12:57:43+01:00 ? dbuf_do_evict+0x70/0x70 [zfs]
2014-03-26T12:57:43+01:00 dbuf_read+0x262/0x810 [zfs]
2014-03-26T12:57:43+01:00 dmu_spill_hold_by_dnode+0x4a/0x150 [zfs]
2014-03-26T12:57:43+01:00 ? __wake_up+0x3f/0x50
2014-03-26T12:57:43+01:00 dmu_spill_hold_existing+0x143/0x150 [zfs]
2014-03-26T12:57:43+01:00 sa_get_spill.part.8+0x22/0x80 [zfs]
2014-03-26T12:57:43+01:00 sa_attr_op+0x30e/0x420 [zfs]
2014-03-26T12:57:43+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:57:43+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T12:57:43+01:00 sa_lookup+0x3d/0x60 [zfs]
2014-03-26T12:57:43+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T12:57:43+01:00 zfs_dirent_lock+0x44c/0x5b0 [zfs]
2014-03-26T12:57:43+01:00 ? xdrmem_dec_bytes+0x73/0xb0 [spl]
2014-03-26T12:57:43+01:00 zfs_get_xattrdir+0x81/0x190 [zfs]
2014-03-26T12:57:43+01:00 ? nvlist_common+0x115/0x1d0 [znvpair]
2014-03-26T12:57:43+01:00 zfs_lookup+0x1cd/0x330 [zfs]
2014-03-26T12:57:43+01:00 __zpl_xattr_get+0x7c/0x220 [zfs]
2014-03-26T12:57:43+01:00 zpl_xattr_get+0x62/0x120 [zfs]
2014-03-26T12:57:43+01:00 zpl_xattr_security_get+0x5c/0x80 [zfs]
2014-03-26T12:57:43+01:00 generic_getxattr+0x47/0x70
2014-03-26T12:57:43+01:00 vfs_getxattr+0x54/0x70
2014-03-26T12:57:43+01:00 getxattr+0xa6/0x1c0
2014-03-26T12:57:43+01:00 ? final_putname+0x1d/0x40
2014-03-26T12:57:43+01:00 ? putname+0x26/0x40
2014-03-26T12:57:43+01:00 ? user_path_at_empty+0x5a/0x90
2014-03-26T12:57:43+01:00 ? SYSC_newlstat+0x32/0x40
2014-03-26T12:57:43+01:00 SyS_lgetxattr+0x4d/0x80
2014-03-26T12:57:43+01:00 system_call_fastpath+0x1a/0x1f
2014-03-26T12:57:43+01:00 
2014-03-26T12:57:43+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T12:57:43+01:00 <ffff880343ba16b8>
2014-03-26T12:57:43+01:00 ffffffffa0622458
2014-03-26T12:57:43+01:00 end trace 1c715fa638e25da7 ]---
2014-03-26T12:57:43+01:00 panic - not syncing: Fatal exception
2014-03-26T12:57:43+01:00 in 60 seconds..
2014-03-26T12:58:43+01:00 
2014-03-26T12:58:43+01:00 MEMORY or I/O RESET_REG.
2014-03-26T13:01:14+01:00 unable to handle kernel 
2014-03-26T13:01:14+01:00 request
2014-03-26T13:01:14+01:00 ffffffffa043a1c0
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T13:01:14+01:00 180d067 
2014-03-26T13:01:14+01:00 180e063 
2014-03-26T13:01:14+01:00 42a038067 
2014-03-26T13:01:14+01:00 417de6161
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 0003 [#1] 
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 linked in:
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 2 PID: 21598 Comm: ls Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T13:01:14+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T13:01:14+01:00 ffff880418a8a080 ti: ffff880332b72000 task.ti: ffff880332b72000
2014-03-26T13:01:14+01:00 0010:[<ffffffffa01acb72>] 
2014-03-26T13:01:14+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T13:01:14+01:00 0018:ffff880332b735c8  EFLAGS: 00010246
2014-03-26T13:01:14+01:00 00000001ef41f800 RBX: ffffffffa043a120 RCX: ffffffffa04121a0
2014-03-26T13:01:14+01:00 0000000000000030 RSI: 0000000000000230 RDI: ffffffffa043a120
2014-03-26T13:01:14+01:00 ffff880332b736a8 R08: d49001787b908d4b R09: 002dd752c4aa49b8
2014-03-26T13:01:14+01:00 ffff880332b736a0 R11: ffff880332b736b8 R12: 0000000000000001
2014-03-26T13:01:14+01:00 ffff88032fe590b8 R14: 0000000000000230 R15: ffffffffa043a1c0
2014-03-26T13:01:14+01:00  00007face40337c0(0000) GS:ffff88043fc80000(0000) knlGS:0000000000000000
2014-03-26T13:01:14+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T13:01:14+01:00 ffffffffa043a1c0 CR3: 000000039d9c4000 CR4: 00000000001407e0
2014-03-26T13:01:14+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T13:01:14+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 Trace:
2014-03-26T13:01:14+01:00 ? update_sd_lb_stats+0x108/0x600
2014-03-26T13:01:14+01:00 zio_buf_alloc+0x1e/0x20 [zfs]
2014-03-26T13:01:14+01:00 arc_get_data_buf.isra.19+0x355/0x4b0 [zfs]
2014-03-26T13:01:14+01:00 arc_buf_alloc+0xe4/0x120 [zfs]
2014-03-26T13:01:14+01:00 arc_read+0x22f/0x8a0 [zfs]
2014-03-26T13:01:14+01:00 ? dbuf_do_evict+0x70/0x70 [zfs]
2014-03-26T13:01:14+01:00 dbuf_read+0x262/0x810 [zfs]
2014-03-26T13:01:14+01:00 dmu_spill_hold_by_dnode+0x4a/0x150 [zfs]
2014-03-26T13:01:14+01:00 ? __wake_up+0x3f/0x50
2014-03-26T13:01:14+01:00 dmu_spill_hold_existing+0x143/0x150 [zfs]
2014-03-26T13:01:14+01:00 sa_get_spill.part.8+0x22/0x80 [zfs]
2014-03-26T13:01:14+01:00 sa_attr_op+0x30e/0x420 [zfs]
2014-03-26T13:01:14+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T13:01:14+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T13:01:14+01:00 sa_lookup+0x3d/0x60 [zfs]
2014-03-26T13:01:14+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T13:01:14+01:00 zfs_dirent_lock+0x44c/0x5b0 [zfs]
2014-03-26T13:01:14+01:00 ? xdrmem_dec_bytes+0x73/0xb0 [spl]
2014-03-26T13:01:14+01:00 zfs_get_xattrdir+0x81/0x190 [zfs]
2014-03-26T13:01:14+01:00 ? nvlist_common+0x115/0x1d0 [znvpair]
2014-03-26T13:01:14+01:00 zfs_lookup+0x1cd/0x330 [zfs]
2014-03-26T13:01:14+01:00 __zpl_xattr_get+0x7c/0x220 [zfs]
2014-03-26T13:01:14+01:00 zpl_xattr_get+0x62/0x120 [zfs]
2014-03-26T13:01:14+01:00 zpl_xattr_security_get+0x5c/0x80 [zfs]
2014-03-26T13:01:14+01:00 generic_getxattr+0x47/0x70
2014-03-26T13:01:14+01:00 vfs_getxattr+0x54/0x70
2014-03-26T13:01:14+01:00 getxattr+0xa6/0x1c0
2014-03-26T13:01:14+01:00 ? final_putname+0x1d/0x40
2014-03-26T13:01:14+01:00 ? putname+0x26/0x40
2014-03-26T13:01:14+01:00 ? user_path_at_empty+0x5a/0x90
2014-03-26T13:01:14+01:00 ? SYSC_newlstat+0x32/0x40
2014-03-26T13:01:14+01:00 SyS_lgetxattr+0x4d/0x80
2014-03-26T13:01:14+01:00 system_call_fastpath+0x1a/0x1f
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 Error processing log message: <f0> 
2014-03-26T13:01:14+01:00 
2014-03-26T13:01:14+01:00 spl_kmem_cache_alloc+0x42/0xf10 [spl]
2014-03-26T13:01:14+01:00 <ffff880332b735c8>
2014-03-26T13:01:14+01:00 ffffffffa043a1c0
2014-03-26T13:01:14+01:00 end trace 43092c5ea484d517 ]---
2014-03-26T13:01:14+01:00 panic - not syncing: Fatal exception
2014-03-26T13:01:15+01:00 in 60 seconds..
2014-03-26T13:02:15+01:00 
2014-03-26T13:02:15+01:00 MEMORY or I/O RESET_REG.
2014-03-26T13:08:33+01:00 unable to handle kernel 
2014-03-26T13:08:33+01:00 request
2014-03-26T13:08:33+01:00 ffffffffa04c2458
2014-03-26T13:08:33+01:00 
2014-03-26T13:08:33+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T13:08:33+01:00 180d067 
2014-03-26T13:08:33+01:00 180e063 
2014-03-26T13:08:33+01:00 42a4d1067 
2014-03-26T13:08:33+01:00 0
2014-03-26T13:08:33+01:00 
2014-03-26T13:08:33+01:00 0000 [#1] 
2014-03-26T13:08:33+01:00 
2014-03-26T13:08:33+01:00 
2014-03-26T13:08:33+01:00 linked in:
2014-03-26T13:08:33+01:00 
2014-03-26T13:08:33+01:00 3 PID: 22105 Comm: ls Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T13:08:33+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T13:08:33+01:00 ffff88032e5e57a0 ti: ffff88032b46c000 task.ti: ffff88032b46c000
2014-03-26T13:08:33+01:00 0010:[<ffffffffa03ff591>] 
2014-03-26T13:08:33+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T13:08:33+01:00 0018:ffff88032b46d6b8  EFLAGS: 00010207
2014-03-26T13:08:33+01:00 00000001ef41f800 RBX: 0000000002000000 RCX: ffffffffa043b1a0
2014-03-26T13:08:33+01:00 0000000000000030 RSI: 0000000000000230 RDI: 000000000000ffff
2014-03-26T13:08:33+01:00 ffff88032b46d6b8 R08: d49001787b908d4b R09: 002dd752c4aa49b8
2014-03-26T13:08:33+01:00 ffff88032b46d6a0 R11: ffff88032b46d6b8 R12: 0000000000000001
2014-03-26T13:08:33+01:00 ffff88032ea5d298 R14: ffff88032ea5d2d0 R15: ffffc90058abaf80
2014-03-26T13:08:33+01:00  00007f7b5bfb87c0(0000) GS:ffff88043fcc0000(0000) knlGS:0000000000000000
2014-03-26T13:08:33+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T13:08:33+01:00 ffffffffa04c2458 CR3: 000000032e5c2000 CR4: 00000000001407e0
2014-03-26T13:08:33+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T13:08:33+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T13:08:33+01:00 
2014-03-26T13:08:33+01:00 Trace:
2014-03-26T13:08:33+01:00 arc_get_data_buf.isra.19+0x355/0x4b0 [zfs]
2014-03-26T13:08:33+01:00 arc_buf_alloc+0xe4/0x120 [zfs]
2014-03-26T13:08:33+01:00 arc_read+0x22f/0x8a0 [zfs]
2014-03-26T13:08:33+01:00 ? dbuf_do_evict+0x70/0x70 [zfs]
2014-03-26T13:08:33+01:00 dbuf_read+0x262/0x810 [zfs]
2014-03-26T13:08:33+01:00 dmu_spill_hold_by_dnode+0x4a/0x150 [zfs]
2014-03-26T13:08:33+01:00 ? __wake_up+0x3f/0x50
2014-03-26T13:08:33+01:00 dmu_spill_hold_existing+0x143/0x150 [zfs]
2014-03-26T13:08:33+01:00 sa_get_spill.part.8+0x22/0x80 [zfs]
2014-03-26T13:08:33+01:00 sa_attr_op+0x30e/0x420 [zfs]
2014-03-26T13:08:33+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T13:08:33+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T13:08:33+01:00 sa_lookup+0x3d/0x60 [zfs]
2014-03-26T13:08:33+01:00 ? kmem_alloc_debug+0x198/0x3c0 [spl]
2014-03-26T13:08:33+01:00 zfs_dirent_lock+0x44c/0x5b0 [zfs]
2014-03-26T13:08:33+01:00 ? xdrmem_dec_bytes+0x73/0xb0 [spl]
2014-03-26T13:08:33+01:00 zfs_get_xattrdir+0x81/0x190 [zfs]
2014-03-26T13:08:33+01:00 ? nvlist_common+0x115/0x1d0 [znvpair]
2014-03-26T13:08:33+01:00 zfs_lookup+0x1cd/0x330 [zfs]
2014-03-26T13:08:33+01:00 __zpl_xattr_get+0x7c/0x220 [zfs]
2014-03-26T13:08:33+01:00 zpl_xattr_get+0x62/0x120 [zfs]
2014-03-26T13:08:33+01:00 zpl_xattr_security_get+0x5c/0x80 [zfs]
2014-03-26T13:08:33+01:00 generic_getxattr+0x47/0x70
2014-03-26T13:08:33+01:00 vfs_getxattr+0x54/0x70
2014-03-26T13:08:33+01:00 getxattr+0xa6/0x1c0
2014-03-26T13:08:33+01:00 ? final_putname+0x1d/0x40
2014-03-26T13:08:33+01:00 ? putname+0x26/0x40
2014-03-26T13:08:33+01:00 ? user_path_at_empty+0x5a/0x90
2014-03-26T13:08:33+01:00 SyS_lgetxattr+0x4d/0x80
2014-03-26T13:08:33+01:00 tracesys+0xe1/0xe6
2014-03-26T13:08:33+01:00 
2014-03-26T13:08:33+01:00 zio_buf_alloc+0x11/0x20 [zfs]
2014-03-26T13:08:33+01:00 <ffff88032b46d6b8>
2014-03-26T13:08:33+01:00 ffffffffa04c2458
2014-03-26T13:08:33+01:00 end trace e150009bb07d1a1f ]---
2014-03-26T13:08:33+01:00 panic - not syncing: Fatal exception
2014-03-26T13:08:33+01:00 in 60 seconds..
2014-03-26T13:09:33+01:00 
2014-03-26T13:09:33+01:00 MEMORY or I/O RESET_REG.

This is what happened when I tried to zfs destroy the affected dataset:

2014-03-26T13:18:29+01:00 1815:0:(spl-err.c:67:vcmn_err()) WARNING: metaslab_free_dva(): bad DVA 402653184:6690883298068194816
2014-03-26T13:18:29+01:00 unable to handle kernel NULL pointer dereference at 0000000000000570
2014-03-26T13:18:29+01:00 [<ffffffffa03aba1d>] dva_get_dsize_sync+0x4d/0x60 [zfs]
2014-03-26T13:18:29+01:00 0 
2014-03-26T13:18:29+01:00 0000 [#1] SMP 
2014-03-26T13:18:29+01:00 linked in: xt_nat iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables netconsole nfsd dummy ext4 crc16 jbd2 mbcache capi capidrv isdn fuse zfs(PO) zunicode(PO) zavl(PO) zcommon(PO) znvpair(PO) coretemp hwmon intel_powerclamp spl(O) kvm_intel zlib_deflate kvm crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 lrw iTCO_wdt gf128mul glue_helper iTCO_vendor_support ablk_helper fcpci(PO) cryptd i2c_i801 kernelcapi lpc_ich mfd_core evdev hid_generic e1000e(O)
2014-03-26T13:18:29+01:00 7 PID: 1851 Comm: txg_sync Tainted: P           O 3.10.16-vs2.3.6.6-thunderbolt #1
2014-03-26T13:18:29+01:00 name: Intel Corporation S1200BTL/S1200BTL, BIOS S1200BT.86B.02.00.0037.053020121529 05/30/2012
2014-03-26T13:18:29+01:00 ffff88042b746860 ti: ffff8804196a6000 task.ti: ffff8804196a6000
2014-03-26T13:18:29+01:00 0010:[<ffffffffa03aba1d>]  [<ffffffffa03aba1d>] dva_get_dsize_sync+0x4d/0x60 [zfs]
2014-03-26T13:18:29+01:00 0000:ffff8804196a7298  EFLAGS: 00010246
2014-03-26T13:18:29+01:00 0000000000000000 RBX: 000000000069736f RCX: 000000000007a120
2014-03-26T13:18:29+01:00 00000000d2e6de00 RSI: 000000006c63615f RDI: ffff880425688000
2014-03-26T13:18:29+01:00 ffff8804196a72a8 R08: ffff88043fdccd80 R09: 0000000000000001
2014-03-26T13:18:29+01:00 0000000000000001 R11: 0000000000000027 R12: 0000000000000000
2014-03-26T13:18:29+01:00 ffffc9005f442f80 R14: ffff880425688000 R15: fffffffffe000000
2014-03-26T13:18:29+01:00  0000000000000000(0000) GS:ffff88043fdc0000(0000) knlGS:0000000000000000
2014-03-26T13:18:29+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T13:18:29+01:00 0000000000000570 CR3: 000000000180c000 CR4: 00000000001407e0
2014-03-26T13:18:29+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T13:18:29+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T13:18:29+01:00 
2014-03-26T13:18:29+01:00 0000000000000002 ffff8804196a72d8 ffffffffa03aba6a
2014-03-26T13:18:29+01:00 fffffffffe000000 ffffc9005f442f80 ffff88036073c300
2014-03-26T13:18:29+01:00 ffffffffa038f162 ffff8804196a7318 ffff8804196a7af8
2014-03-26T13:18:29+01:00 Trace:
2014-03-26T13:18:29+01:00 bp_get_dsize_sync+0x3a/0x60 [zfs]
2014-03-26T13:18:29+01:00 dsl_scan_free_block_cb+0xb2/0x1e0 [zfs]
2014-03-26T13:18:29+01:00 bptree_visit_cb+0x39/0x110 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x1d1/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_dnode+0xee/0x130 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x561/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x443/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x443/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x443/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x443/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x443/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x443/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_dnode+0x75/0x130 [zfs]
2014-03-26T13:18:29+01:00 traverse_visitbp+0x624/0x730 [zfs]
2014-03-26T13:18:29+01:00 traverse_impl+0x170/0x340 [zfs]
2014-03-26T13:18:29+01:00 traverse_dataset_destroyed+0x31/0x40 [zfs]
2014-03-26T13:18:29+01:00 ? dbuf_stats_destroy+0x50/0x50 [zfs]
2014-03-26T13:18:29+01:00 bptree_iterate+0x171/0x220 [zfs]
2014-03-26T13:18:29+01:00 ? dsl_scan_zil_block+0xd0/0xd0 [zfs]
2014-03-26T13:18:29+01:00 dsl_scan_sync+0x65e/0xb50 [zfs]
2014-03-26T13:18:29+01:00 spa_sync+0x4a7/0xb10 [zfs]
2014-03-26T13:18:29+01:00 ? ktime_get_ts+0x43/0xe0
2014-03-26T13:18:29+01:00 txg_sync_thread+0x38e/0x610 [zfs]
2014-03-26T13:18:29+01:00 ? enqueue_task_fair+0x947/0xe50
2014-03-26T13:18:29+01:00 ? set_user_nice+0xd0/0x170
2014-03-26T13:18:29+01:00 ? txg_quiesce_thread+0x350/0x350 [zfs]
2014-03-26T13:18:29+01:00 thread_generic_wrapper+0x73/0x90 [spl]
2014-03-26T13:18:29+01:00 ? __thread_create+0x340/0x340 [spl]
2014-03-26T13:18:29+01:00 kthread+0xbb/0xc0
2014-03-26T13:18:29+01:00 ? kthread_create_on_node+0x110/0x110
2014-03-26T13:18:29+01:00 ret_from_fork+0x7c/0xb0
2014-03-26T13:18:29+01:00 ? kthread_create_on_node+0x110/0x110
2014-03-26T13:18:29+01:00 bf 78 09 00 00 00 48 89 d3 75 13 48 83 c4 08 48 89 d8 5b 5d c3 66 0f 1f 84 00 00 00 00 00 48 c1 ee 20 48 c1 eb 09 e8 23 6f 00 00 <48> 0f af 98 70 05 00 00 48 83 c4 08 48 89 d8 5b 5d c3 90 55 48 
2014-03-26T13:18:29+01:00  [<ffffffffa03aba1d>] dva_get_dsize_sync+0x4d/0x60 [zfs]
2014-03-26T13:18:29+01:00 <ffff8804196a7298>
2014-03-26T13:18:29+01:00 0000000000000570
2014-03-26T13:18:29+01:00 end trace 51ebd9f3429a7c35 ]---
2014-03-26T13:18:29+01:00 panic - not syncing: Fatal exception
2014-03-26T13:18:29+01:00 in 60 seconds..
2014-03-26T13:19:29+01:00 
2014-03-26T13:19:29+01:00 MEMORY or I/O RESET_REG.

I have to resort to destroying the pool to get rid of the error.
Rolling back to earlier snapshots didn't help (but maybe the snapshots weren't early enough).

@akorn
Copy link
Contributor Author

akorn commented Mar 26, 2014

Oh, sorry, this is with the packages from @dajhorn 's repository; after

apt-get -u install spl-dkms=0.6.2-2~trusty~3.gbpc35b1e zfs-dkms=0.6.2-2~trusty~3.gbp9888b6 zfsutils=0.6.2-2~trusty~3.gbp9888b6 libnvpair1=0.6.2-2~trusty~3.gbp9888b6 libuutil1=0.6.2-2~trusty~3.gbp9888b6

@dweeezil
Copy link
Contributor

@akorn Were the files also created with this version of ZFS? There have been a number of SA (system attribute) fixes added since 0.6.2, however, the version you're currently running does appear to have them. I'm wondering if an earlier version of ZFS might have created some bogus SAs.

@akorn
Copy link
Contributor Author

akorn commented Mar 26, 2014

This was with a new pool I created with this zfs version, so yes, the files were created by the same zfs version as well.

Meanwhile, a different box where I stored backups of this pool also locked up while retrieving the backups:

2014-03-26T14:48:28+01:00 unable to handle kernel 
2014-03-26T14:48:28+01:00 request
2014-03-26T14:48:28+01:00 ffffffffa0322078
2014-03-26T14:48:28+01:00 
2014-03-26T14:48:28+01:00 zio_buf_alloc+0xd/0x1f [zfs]
2014-03-26T14:48:28+01:00 1a0f067 
2014-03-26T14:48:28+01:00 1a10063 
2014-03-26T14:48:28+01:00 c07d07067 
2014-03-26T14:48:28+01:00 0
2014-03-26T14:48:28+01:00 
2014-03-26T14:48:28+01:00 0000 [#1] 
2014-03-26T14:48:28+01:00 
2014-03-26T14:48:28+01:00 
2014-03-26T14:48:28+01:00 linked in:
2014-03-26T14:48:28+01:00 
2014-03-26T14:48:28+01:00 3 PID: 14322 Comm: rsync Tainted: P           O 3.10.16-vs2.3.6.6-superguppy #1
2014-03-26T14:48:28+01:00 name: Supermicro H8SGL/H8SGL, BIOS 3.0        08/31/2012
2014-03-26T14:48:28+01:00 ffff8804f0852540 ti: ffff880608aa0000 task.ti: ffff880608aa0000
2014-03-26T14:48:28+01:00 0010:[<ffffffffa0264870>] 
2014-03-26T14:48:28+01:00 zio_buf_alloc+0xd/0x1f [zfs]
2014-03-26T14:48:28+01:00 0018:ffff880608aa36d8  EFLAGS: 00010217
2014-03-26T14:48:28+01:00 00000007a5f44000 RBX: 0000000002000000 RCX: 0000000000000004
2014-03-26T14:48:28+01:00 ffff8807486166a8 RSI: 0000000000000230 RDI: 000000000000ffff
2014-03-26T14:48:28+01:00 ffff880608aa3710 R08: 00000020ffffffff R09: 0000000000000000
2014-03-26T14:48:28+01:00 ffff8803d86c0508 R11: 0000000000000040 R12: ffffffffa029b310
2014-03-26T14:48:28+01:00 ffff880479377838 R14: 0000000000000001 R15: ffff880608aa3824
2014-03-26T14:48:28+01:00  00007f9dc74a9700(0000) GS:ffff88081fcc0000(0000) knlGS:0000000000000000
2014-03-26T14:48:28+01:00  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
2014-03-26T14:48:28+01:00 ffffffffa0322078 CR3: 000000064d086000 CR4: 00000000000007e0
2014-03-26T14:48:28+01:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-26T14:48:28+01:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-26T14:48:28+01:00 
2014-03-26T14:48:28+01:00 Trace:
2014-03-26T14:48:28+01:00 ? arc_get_data_buf+0x1b9/0x3d6 [zfs]
2014-03-26T14:48:28+01:00 arc_buf_alloc+0xd3/0xfe [zfs]
2014-03-26T14:48:28+01:00 ? dbuf_rele_and_unlock+0x1be/0x1be [zfs]
2014-03-26T14:48:28+01:00 arc_read+0x266/0x73f [zfs]
2014-03-26T14:48:28+01:00 ? _cond_resched+0x9/0x19
2014-03-26T14:48:28+01:00 ? mutex_lock+0xd/0x2a
2014-03-26T14:48:28+01:00 dbuf_read+0x3a3/0x4d0 [zfs]
2014-03-26T14:48:28+01:00 dmu_spill_hold_by_dnode+0x75/0x9b [zfs]
2014-03-26T14:48:28+01:00 dmu_spill_hold_existing+0x6a/0xa7 [zfs]
2014-03-26T14:48:28+01:00 sa_get_spill.part.6+0x19/0x61 [zfs]
2014-03-26T14:48:28+01:00 sa_attr_op+0x118/0x2e7 [zfs]
2014-03-26T14:48:28+01:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-26T14:48:28+01:00 sa_lookup+0x36/0x4b [zfs]
2014-03-26T14:48:28+01:00 zfs_dirent_lock+0x2ca/0x40a [zfs]
2014-03-26T14:48:28+01:00 ? xdr_dec_string+0x8d/0xb9 [spl]
2014-03-26T14:48:28+01:00 zfs_get_xattrdir+0x6e/0x15a [zfs]
2014-03-26T14:48:28+01:00 ? nvlist_common+0x195/0x1a0 [znvpair]
2014-03-26T14:48:28+01:00 ? should_resched+0x9/0x28
2014-03-26T14:48:28+01:00 ? _cond_resched+0x9/0x19
2014-03-26T14:48:28+01:00 ? mutex_lock+0xd/0x2a
2014-03-26T14:48:28+01:00 zfs_lookup+0x153/0x29a [zfs]
2014-03-26T14:48:28+01:00 __zpl_xattr_get+0x67/0x1af [zfs]
2014-03-26T14:48:28+01:00 zpl_xattr_get+0x57/0x93 [zfs]
2014-03-26T14:48:28+01:00 zpl_get_acl+0xa2/0x15d [zfs]
2014-03-26T14:48:28+01:00 generic_permission+0xd1/0x1d4
2014-03-26T14:48:28+01:00 __inode_permission+0x77/0xb5
2014-03-26T14:48:28+01:00 inode_permission+0x3b/0x3d
2014-03-26T14:48:28+01:00 may_open+0xcc/0x133
2014-03-26T14:48:28+01:00 do_last+0x851/0xa3c
2014-03-26T14:48:28+01:00 path_openat+0xe0/0x37f
2014-03-26T14:48:28+01:00 do_filp_open+0x33/0x76
2014-03-26T14:48:28+01:00 ? __alloc_fd+0x61/0x109
2014-03-26T14:48:28+01:00 do_sys_open+0x67/0xf4
2014-03-26T14:48:28+01:00 SyS_openat+0xf/0x11
2014-03-26T14:48:28+01:00 system_call_fastpath+0x1a/0x1f
2014-03-26T14:48:28+01:00 
2014-03-26T14:48:28+01:00 zio_buf_alloc+0xd/0x1f [zfs]
2014-03-26T14:48:28+01:00 <ffff880608aa36d8>
2014-03-26T14:48:28+01:00 ffffffffa0322078
2014-03-26T14:48:28+01:00 end trace 89db80aeb8ea2bd9 ]---
2014-03-26T14:48:29+01:00 panic - not syncing: Fatal exception
2014-03-26T14:48:29+01:00 Warn]: GHES: Failed to read error status block!
2014-03-26T14:48:30+01:00 in 60 seconds..

Setting xattr=off and actlype=noacl allowed me to read the files.

@dweeezil
Copy link
Contributor

@akorn If you can identify any specific files or directories that cause the problem, could you please find their inode number with ls -i and then run zdb -ddddd <pool>/<fs> <inode>. Also, could you try building the modules with --enable-debug and see whether any of the ASSERTs are triggered (hopefully earlier than the hangs you're seeing).

@akorn
Copy link
Contributor Author

akorn commented Mar 28, 2014

I suppose so, but I'll need to put a test rig together for that. I'm afraid it will take a long time.

@dweeezil
Copy link
Contributor

Finding a file with a corrupted SA and running zdb -ddddd would be very useful by itself.

@akorn
Copy link
Contributor Author

akorn commented Mar 31, 2014

Here is one:

# zdb -ddddd backup/thunderbolt/tbolt-hdd_srv_jenkins@zfsbackup-daily-2014-03-26-0643 161656
Dataset backup/thunderbolt/tbolt-hdd_srv_jenkins@zfsbackup-daily-2014-03-26-0643 [ZPL], ID 79835, cr_txg 940106, 20.0G, 199771 objects, rootbp DVA[0]=<0:17d2dcd8c000:4000> DVA[1]=<0:ec7b6cbc000:4000> [L0 DMU objset] fletcher4 lzjb LE contiguous unique double size=800L/200P birth=940106L/940106P fill=199771 cksum=16bd5c9686:7e33eb8e1ba:174f53f035fd0:3086c1dc6b8f7d

    Object  lvl   iblk   dblk  dsize  lsize   %full  type
    161656    1    16K    512  46.5K    512  100.00  ZFS directory
                                        284   bonus  System attributes
        dnode flags: USED_BYTES USERUSED_ACCOUNTED SPILL_BLKPTR
        dnode maxblkid: 0
        path    /userContent/foo-coverage-html
        uid     1116
        gid     550
        atime   Tue Mar 25 11:42:08 2014
        mtime   Thu Mar 20 13:37:38 2014
        ctime   Tue Mar 25 11:42:08 2014
        crtime  Tue Mar 25 11:42:03 2014
        gen     937659
        mode    42775
        size    6
        parent  18
        links   5
        pflags  40800000044
[1]    6354 segmentation fault  zdb -ddddd  161656

strace ls -lad foo-coverage-html stops at:

fstat(3, {st_mode=S_IFREG|0644, st_size=26258, ...}) = 0
mmap(NULL, 26258, PROT_READ, MAP_SHARED, 3, 0) = 0x7f1827245000
close(3)                                = 0
futex(0x7f1826c08918, FUTEX_WAKE_PRIVATE, 2147483647) = 0
lstat("foo-coverage-html", {st_mode=S_IFDIR|S_ISGID|0775, st_size=6, ...}) = 0
lgetxattr("foo-coverage-html", "security.selinux"

And the kernel logs:

2014-03-31T11:40:51+02:00 unable to handle kernel 
2014-03-31T11:40:51+02:00 request
2014-03-31T11:40:51+02:00 ffffffffa05fc0d8
2014-03-31T11:40:51+02:00 
2014-03-31T11:40:51+02:00 zio_buf_alloc+0xd/0x1f [zfs]
2014-03-31T11:40:51+02:00 1a0f067 
2014-03-31T11:40:51+02:00 1a10063 
2014-03-31T11:40:51+02:00 c07b04067 
2014-03-31T11:40:51+02:00 0
2014-03-31T11:40:51+02:00 
2014-03-31T11:40:51+02:00 0000 [#1] 
2014-03-31T11:40:51+02:00 
2014-03-31T11:40:51+02:00 
2014-03-31T11:40:51+02:00 linked in:
2014-03-31T11:40:51+02:00 
2014-03-31T11:40:51+02:00 1 PID: 6754 Comm: ls Tainted: P           O 3.10.16-vs2.3.6.6-superguppy #1
2014-03-31T11:40:51+02:00 name: Supermicro H8SGL/H8SGL, BIOS 3.0        08/31/2012
2014-03-31T11:40:51+02:00 ffff8807e090e780 ti: ffff8807e09d4000 task.ti: ffff8807e09d4000
2014-03-31T11:40:51+02:00 0010:[<ffffffffa053db5b>] 
2014-03-31T11:40:51+02:00 zio_buf_alloc+0xd/0x1f [zfs]
2014-03-31T11:40:51+02:00 0018:ffff8807e09d77d8  EFLAGS: 00010217
2014-03-31T11:40:51+02:00 00000007a5f44000 RBX: 0000000002000000 RCX: 0000000000000001
2014-03-31T11:40:51+02:00 ffff8807e0f49230 RSI: 0000000000000230 RDI: 000000000000ffff
2014-03-31T11:40:51+02:00 ffff8807e09d7810 R08: 00000020ffffffff R09: 0000000000000000
2014-03-31T11:40:51+02:00 ffff880bf7782fc8 R11: 0000000000000040 R12: ffffffffa0575350
2014-03-31T11:40:51+02:00 ffff8807e0c3e220 R14: 0000000000000001 R15: ffff8807e09d7924
2014-03-31T11:40:51+02:00  00007f182724c800(0000) GS:ffff88081fc40000(0000) knlGS:0000000000000000
2014-03-31T11:40:51+02:00  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
2014-03-31T11:40:51+02:00 ffffffffa05fc0d8 CR3: 00000007e06d2000 CR4: 00000000000007e0
2014-03-31T11:40:51+02:00 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
2014-03-31T11:40:51+02:00 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
2014-03-31T11:40:51+02:00 
2014-03-31T11:40:51+02:00 Trace:
2014-03-31T11:40:51+02:00 ? arc_get_data_buf+0x1bc/0x3e7 [zfs]
2014-03-31T11:40:51+02:00 arc_buf_alloc+0xd3/0xfe [zfs]
2014-03-31T11:40:51+02:00 ? dbuf_rele_and_unlock+0x1be/0x1be [zfs]
2014-03-31T11:40:51+02:00 arc_read+0x266/0x741 [zfs]
2014-03-31T11:40:51+02:00 ? _cond_resched+0x9/0x19
2014-03-31T11:40:51+02:00 ? mutex_lock+0xd/0x2a
2014-03-31T11:40:51+02:00 dbuf_read+0x39b/0x4c8 [zfs]
2014-03-31T11:40:51+02:00 dmu_spill_hold_by_dnode+0x75/0x9b [zfs]
2014-03-31T11:40:51+02:00 dmu_spill_hold_existing+0x6a/0xa7 [zfs]
2014-03-31T11:40:51+02:00 sa_get_spill.part.6+0x19/0x61 [zfs]
2014-03-31T11:40:51+02:00 sa_attr_op+0x118/0x2e7 [zfs]
2014-03-31T11:40:51+02:00 sa_lookup_impl+0xe/0x10 [zfs]
2014-03-31T11:40:51+02:00 sa_lookup+0x36/0x4b [zfs]
2014-03-31T11:40:51+02:00 zfs_dirent_lock+0x2ca/0x40a [zfs]
2014-03-31T11:40:51+02:00 ? xdr_dec_string+0x8d/0xb9 [spl]
2014-03-31T11:40:51+02:00 zfs_get_xattrdir+0x6e/0x15a [zfs]
2014-03-31T11:40:51+02:00 ? nvlist_common+0x195/0x1a0 [znvpair]
2014-03-31T11:40:51+02:00 ? should_resched+0x9/0x28
2014-03-31T11:40:51+02:00 ? _cond_resched+0x9/0x19
2014-03-31T11:40:51+02:00 ? mutex_lock+0xd/0x2a
2014-03-31T11:40:51+02:00 zfs_lookup+0x153/0x29a [zfs]
2014-03-31T11:40:51+02:00 __zpl_xattr_get+0x67/0x1af [zfs]
2014-03-31T11:40:51+02:00 zpl_xattr_get+0x57/0x93 [zfs]
2014-03-31T11:40:51+02:00 zpl_xattr_security_get+0x48/0x66 [zfs]
2014-03-31T11:40:51+02:00 generic_getxattr+0x47/0x59
2014-03-31T11:40:51+02:00 vfs_getxattr+0x90/0x9d
2014-03-31T11:40:52+02:00 getxattr+0xc5/0x18e
2014-03-31T11:40:52+02:00 ? final_putname+0x2f/0x32
2014-03-31T11:40:52+02:00 ? putname+0x22/0x24
2014-03-31T11:40:52+02:00 ? user_path_at_empty+0x84/0xad
2014-03-31T11:40:52+02:00 ? ptrace_notify+0x71/0x76
2014-03-31T11:40:52+02:00 SyS_lgetxattr+0x4b/0x86
2014-03-31T11:40:52+02:00 tracesys+0xe1/0xe6
2014-03-31T11:40:52+02:00 
2014-03-31T11:40:52+02:00 zio_buf_alloc+0xd/0x1f [zfs]
2014-03-31T11:40:52+02:00 <ffff8807e09d77d8>
2014-03-31T11:40:52+02:00 ffffffffa05fc0d8
2014-03-31T11:40:52+02:00 end trace 260e2e86d1b1abb7 ]---
2014-03-31T11:40:52+02:00 panic - not syncing: Fatal exception
2014-03-31T11:40:53+02:00 in 60 seconds..

@dweeezil
Copy link
Contributor

@akorn That pretty much confirms a corrupted SA. Could you please build ZFS from dweeezil/zfs@9888f3c which is a current master with some extra zdb SA debugging. Then run the zdb from that build (you can run it directly from the build area as cmd/zdb/zdb) with the same arguments and then post the results. NOTE: that's actually my "zdb-sadump-debug" branch which I just rebased to a current master.

@akorn
Copy link
Contributor Author

akorn commented Mar 31, 2014

This is with dweeezil@9888f3c:

# zdb -ddddd backup/thunderbolt/tbolt-hdd_srv_jenkins@zfsbackup-daily-2014-03-26-0643 161656
Dataset backup/thunderbolt/tbolt-hdd_srv_jenkins@zfsbackup-daily-2014-03-26-0643 [ZPL], ID 79835, cr_txg 940106, 20.0G, 199771 objects, rootbp DVA[0]=<0:17d2dcd8c000:4000> DVA[1]=<0:ec7b6cbc000:4000> [L0 DMU objset] fletcher4 lzjb LE contiguous unique double size=800L/200P birth=940106L/940106P fill=199771 cksum=16bd5c9686:7e33eb8e1ba:174f53f035fd0:3086c1dc6b8f7d

    Object  lvl   iblk   dblk  dsize  lsize   %full  type
    161656    1    16K    512  46.5K    512  100.00  ZFS directory
                                        284   bonus  System attributes
        dnode flags: USED_BYTES USERUSED_ACCOUNTED SPILL_BLKPTR
        dnode maxblkid: 0
        path    /userContent/foo-coverage-html
        uid     1116
        gid     550
        atime   Tue Mar 25 11:42:08 2014
        mtime   Thu Mar 20 13:37:38 2014
        ctime   Tue Mar 25 11:42:08 2014
        crtime  Tue Mar 25 11:42:03 2014
        gen     937659
        mode    42775
        size    6
        parent  18
        links   5
        pflags  40800000044
[1]    6583 segmentation fault (core dumped)  zdb -ddddd  161656

The kernel says the following about the segfault:

zdb[6583]: segfault at 7fe70e498238 ip 00007fe70e188e49 sp 00007fffd87ca190 error 4 in libzpool.so.2.0.0[7fe70e0ee000+119000]

A gdb backtrace looks like this:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7724e49 in zio_buf_alloc (size=<optimized out>) at ../../module/zfs/zio.c:276
warning: Source file is more recent than executable.
276             return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE | KM_NODEBUG));
(gdb) bt
#0  0x00007ffff7724e49 in zio_buf_alloc (size=<optimized out>) at ../../module/zfs/zio.c:276
#1  0x00007ffff76b6ed5 in arc_get_data_buf (buf=<optimized out>, buf=<optimized out>) at ../../module/zfs/arc.c:2617
#2  0x00007ffff76b8cb7 in arc_buf_alloc (spa=spa@entry=0x61d440, size=size@entry=33554432, tag=tag@entry=0x1b2adc0, type=<optimized out>)
    at ../../module/zfs/arc.c:1368
#3  0x00007ffff76b9c6a in arc_read (pio=pio@entry=0x1647c10, spa=spa@entry=0x61d440, bp=0x184d180, done=done@entry=0x7ffff76c01f0 <dbuf_read_done>, 
    private=private@entry=0x1b2adc0, priority=0, zio_flags=zio_flags@entry=64, arc_flags=arc_flags@entry=0x7fffffffb0cc, zb=zb@entry=0x7fffffffb0d0)
    at ../../module/zfs/arc.c:3099
#4  0x00007ffff76bf638 in dbuf_read_impl (flags=<synthetic pointer>, zio=0x1647c10, db=0x1b2adc0) at ../../module/zfs/dbuf.c:631
#5  dbuf_read (db=db@entry=0x1b2adc0, zio=0x1647c10, zio@entry=0x0, flags=flags@entry=6) at ../../module/zfs/dbuf.c:679
#6  0x00007ffff76c6458 in dmu_spill_hold_by_dnode (dn=dn@entry=0x19b7010, flags=flags@entry=6, tag=tag@entry=0x0, dbp=dbp@entry=0x1a93cc0)
    at ../../module/zfs/dmu.c:305
#7  0x00007ffff76c655b in dmu_spill_hold_existing (bonus=0x1a79d50, tag=tag@entry=0x0, dbp=dbp@entry=0x1a93cc0) at ../../module/zfs/dmu.c:331
#8  0x00007ffff76f76a8 in sa_get_spill (hdl=hdl@entry=0x1a93c80) at ../../module/zfs/sa.c:328
#9  0x00007ffff76f8af8 in sa_get_spill (hdl=0x1a93c80) at ../../module/zfs/sa.c:382
#10 sa_attr_op (hdl=hdl@entry=0x1a93c80, bulk=bulk@entry=0x7fffffffb230, count=count@entry=1, data_op=data_op@entry=SA_LOOKUP, tx=tx@entry=0x0)
    at ../../module/zfs/sa.c:372
#11 0x00007ffff76f8b3a in sa_lookup_impl (hdl=hdl@entry=0x1a93c80, bulk=bulk@entry=0x7fffffffb230, count=count@entry=1) at ../../module/zfs/sa.c:1467
#12 0x00007ffff76f8b75 in sa_lookup (hdl=0x1a93c80, attr=<optimized out>, buf=buf@entry=0x7fffffffb290, buflen=buflen@entry=8) at ../../module/zfs/sa.c:1483
#13 0x00000000004075e9 in dump_znode (os=0x17eb200, object=<optimized out>, data=<optimized out>, size=<optimized out>) at ../../cmd/zdb/zdb.c:1510
#14 0x00000000004087c0 in dump_object (os=os@entry=0x17eb200, object=161656, verbosity=verbosity@entry=5, print_header=print_header@entry=0x7fffffffd784)
    at ../../cmd/zdb/zdb.c:1665
#15 0x0000000000408d51 in dump_dir (os=0x17eb200) at ../../cmd/zdb/zdb.c:1765
#16 0x0000000000404b7a in main (argc=<optimized out>, argv=0x7fffffffde70) at ../../cmd/zdb/zdb.c:3362

@dweeezil
Copy link
Contributor

@akorn It looks like I'm going to have to improve my SA debugging version of zdb a bit more. We're trying to get a dump of the corrupted SA which would allow me to manually decode it and, hopefully, figure out what it's corrupted. I'll try to get a more robust debugging zdb prepared today and will send a note to this issue when it's ready.

@akorn
Copy link
Contributor Author

akorn commented Mar 31, 2014

I tried a build with --enable-debug and yes, I do hit an ASSERT() before the crash:

2014-03-31T17:43:33+02:00 7322:0:(zio.c:274:zio_buf_alloc()) ASSERTION(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT) failed
kern: user.emerg: Mar 31 17:43:33 kernel: SPLError: 7322:0:(zio.c:274:zio_buf_alloc()) ASSERTION(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT) failed
2014-03-31T17:43:33+02:00 7322:0:(zio.c:274:zio_buf_alloc()) SPL PANIC
2014-03-31T17:43:33+02:00 Showing stack for process 7322
2014-03-31T17:43:33+02:00 3 PID: 7322 Comm: ls Tainted: P           O 3.10.16-vs2.3.6.6-superguppy #1
2014-03-31T17:43:33+02:00 name: Supermicro H8SGL/H8SGL, BIOS 3.0        08/31/2012
2014-03-31T17:43:33+02:00 
kern: user.emerg: Mar 31 17:43:33 kernel: SPLError: 7322:0:(zio.c:274:zio_buf_alloc()) SPL PANIC
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 
2014-03-31T17:43:33+02:00 Trace:
2014-03-31T17:43:33+02:00 dump_stack+0x19/0x1b
2014-03-31T17:43:33+02:00 spl_debug_dumpstack+0x2b/0x2d [spl]
kern: user.notice: Mar 31 17:43:33 kernel: SPL: Showing stack for process 7322
2014-03-31T17:43:33+02:00 spl_debug_bug+0x80/0xc5 [spl]
2014-03-31T17:43:33+02:00 zio_buf_alloc+0x5a/0x70 [zfs]
2014-03-31T17:43:33+02:00 arc_get_data_buf+0x2ae/0x5ec [zfs]
2014-03-31T17:43:33+02:00 arc_buf_alloc+0x191/0x221 [zfs]
2014-03-31T17:43:33+02:00 arc_read+0x452/0xc97 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel: CPU: 3 PID: 7322 Comm: ls Tainted: P           O 3.10.16-vs2.3.6.6-superguppy #1
2014-03-31T17:43:33+02:00 ? mutex_lock+0xd/0x2a
2014-03-31T17:43:33+02:00 ? refcount_add_many+0x121/0x131 [zfs]
2014-03-31T17:43:33+02:00 ? dbuf_rele_and_unlock+0x2d2/0x2d2 [zfs]
2014-03-31T17:43:33+02:00 dbuf_read+0x69a/0x970 [zfs]
2014-03-31T17:43:33+02:00 dmu_spill_hold_by_dnode+0x10c/0x135 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel: Hardware name: Supermicro H8SGL/H8SGL, BIOS 3.0        08/31/2012
2014-03-31T17:43:33+02:00 dmu_spill_hold_existing+0x77/0x102 [zfs]
2014-03-31T17:43:33+02:00 sa_get_spill.part.4+0x1b/0x80 [zfs]
2014-03-31T17:43:33+02:00 sa_attr_op+0x1c4/0x396 [zfs]
2014-03-31T17:43:33+02:00 ? kmalloc_nofail+0x2a/0x3a [spl]
kern: user.notice: Mar 31 17:43:33 kernel:  0000000000000000 ffff8807d80536e8 ffffffff814eb2db ffff8807d80536f8
2014-03-31T17:43:33+02:00 sa_lookup_impl+0xc1/0xc9 [zfs]
2014-03-31T17:43:33+02:00 sa_lookup+0xe0/0xf5 [zfs]
2014-03-31T17:43:33+02:00 zfs_dirent_lock+0x42f/0x56f [zfs]
2014-03-31T17:43:33+02:00 ? xdr_dec_string+0x8d/0xb9 [spl]
2014-03-31T17:43:33+02:00 zfs_get_xattrdir+0x6e/0x15a [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  ffffffffa012d3f8 ffff8807d8053720 ffffffffa012e513 ffffffffa013ef05
2014-03-31T17:43:33+02:00 ? should_resched+0x9/0x28
2014-03-31T17:43:33+02:00 ? mutex_lock+0xd/0x2a
2014-03-31T17:43:33+02:00 ? refcount_add_many+0x121/0x131 [zfs]
2014-03-31T17:43:33+02:00 ? nvlist_common+0x195/0x1a0 [znvpair]
2014-03-31T17:43:33+02:00 ? refcount_add+0x11/0x13 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  0000000000000001 000000000000ffff ffff8807d8053740 ffffffffa038720e
2014-03-31T17:43:33+02:00 ? rrw_enter_read+0x267/0x274 [zfs]
2014-03-31T17:43:33+02:00 zfs_lookup+0x153/0x29a [zfs]
2014-03-31T17:43:33+02:00 __zpl_xattr_get+0xb9/0x2fd [zfs]
2014-03-31T17:43:33+02:00 ? kvasprintf+0x64/0x74
2014-03-31T17:43:33+02:00 zpl_xattr_get+0x57/0xe0 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel: Call Trace:
2014-03-31T17:43:33+02:00 zpl_xattr_security_get+0x48/0x66 [zfs]
2014-03-31T17:43:33+02:00 generic_getxattr+0x47/0x59
2014-03-31T17:43:33+02:00 vfs_getxattr+0x90/0x9d
2014-03-31T17:43:33+02:00 getxattr+0xc5/0x18e
2014-03-31T17:43:33+02:00 ? final_putname+0x2f/0x32
2014-03-31T17:43:33+02:00 ? putname+0x22/0x24
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff814eb2db>] dump_stack+0x19/0x1b
2014-03-31T17:43:33+02:00 ? user_path_at_empty+0x84/0xad
2014-03-31T17:43:33+02:00 ? SYSC_newlstat+0x25/0x2e
2014-03-31T17:43:33+02:00 SyS_lgetxattr+0x4b/0x86
2014-03-31T17:43:33+02:00 system_call_fastpath+0x1a/0x1f
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa012d3f8>] spl_debug_dumpstack+0x2b/0x2d [spl]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa012e513>] spl_debug_bug+0x80/0xc5 [spl]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa038720e>] zio_buf_alloc+0x5a/0x70 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa02c68bd>] arc_get_data_buf+0x2ae/0x5ec [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa02c91b7>] arc_buf_alloc+0x191/0x221 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa02ca332>] arc_read+0x452/0xc97 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff814ed71f>] ? mutex_lock+0xd/0x2a
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa031bd72>] ? refcount_add_many+0x121/0x131 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa02d44b2>] ? dbuf_rele_and_unlock+0x2d2/0x2d2 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa02d5e36>] dbuf_read+0x69a/0x970 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa02e2776>] dmu_spill_hold_by_dnode+0x10c/0x135 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa02e2816>] dmu_spill_hold_existing+0x77/0x102 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa031ef52>] sa_get_spill.part.4+0x1b/0x80 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa031ffc3>] sa_attr_op+0x1c4/0x396 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa013096f>] ? kmalloc_nofail+0x2a/0x3a [spl]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa0320b71>] sa_lookup_impl+0xc1/0xc9 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa0320c59>] sa_lookup+0xe0/0xf5 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa035d255>] zfs_dirent_lock+0x42f/0x56f [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa013af68>] ? xdr_dec_string+0x8d/0xb9 [spl]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa035ecf4>] zfs_get_xattrdir+0x6e/0x15a [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8108147b>] ? should_resched+0x9/0x28
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff814ed71f>] ? mutex_lock+0xd/0x2a
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa031bd72>] ? refcount_add_many+0x121/0x131 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa00e70f4>] ? nvlist_common+0x195/0x1a0 [znvpair]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa031bd93>] ? refcount_add+0x11/0x13 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa031c510>] ? rrw_enter_read+0x267/0x274 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa0372ace>] zfs_lookup+0x153/0x29a [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa0393c2f>] __zpl_xattr_get+0xb9/0x2fd [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8128506f>] ? kvasprintf+0x64/0x74
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa03941c6>] zpl_xattr_get+0x57/0xe0 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffffa0394394>] zpl_xattr_security_get+0x48/0x66 [zfs]
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8114cc06>] generic_getxattr+0x47/0x59
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8114cf9c>] vfs_getxattr+0x90/0x9d
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8114d37e>] getxattr+0xc5/0x18e
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8113b4b2>] ? final_putname+0x2f/0x32
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8113b617>] ? putname+0x22/0x24
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8113d987>] ? user_path_at_empty+0x84/0xad
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff811363e2>] ? SYSC_newlstat+0x25/0x2e
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff8114db40>] SyS_lgetxattr+0x4b/0x86
kern: user.notice: Mar 31 17:43:33 kernel:  [<ffffffff814efd56>] system_call_fastpath+0x1a/0x1f

(Some of the lines are sent by syslog, some by netconsole, but they end up on the same logserver, hence the duplication.)

Instead of crashing, my ls(1) process now hangs in spl_debug_bug.

@dweeezil
Copy link
Contributor

It's starting to look like your SA got sufficiently large that a spill block was needed. Since you've got the name of the corrupted file, have you got any idea what operations may have been performed on it over its lifetime? I'm looking to be able to reproduce this locally if possible.

EDIT: Do you know if these files have also got or are supposed to have selinux xattrs?

@akorn
Copy link
Contributor Author

akorn commented Mar 31, 2014

This specific corrupted entry is a directory with the following ACL:

setfacl -m u:1234:rw,d:u:1234:rwx,d:g::rwx

Other than the ACL, it is not supposed to have any other extended attributes, selinux or otherwise.

@dweeezil
Copy link
Contributor

dweeezil commented Apr 1, 2014

@akorn Could you please try reproducing this by hand in a fresh filesystem? Make one with something like zfs create pool/fs and then create the directory there and run the setfactl on it and see whether it's corrupted. I was able to do this with no problem on one of my test systems running a 3.13 kernel. I'm going to try it on some older kernels but I have a feeling there's a bit more to it.

Here was my test:

# mkdir testdir
# setfacl -m u:1234:rw,d:u:1234:rwx,d:g::rwx testdir
# getfattr -d -m - testdir
# file: testdir
system.posix_acl_access=0sAgAAAAEABwD/////AgAGANIEAAAEAAUA/////xAABwD/////IAAFAP////8=
system.posix_acl_default=0sAgAAAAEABwD/////AgAHANIEAAAEAAcA/////xAABwD/////IAAFAP////8=

# ls -di testdir
10 testdir
# zdb -ddddd test/fs 10
Dataset test/fs [ZPL], ID 40, cr_txg 8, 36.0K, 9 objects, rootbp DVA[0]=<0:46e00:200> DVA[1]=<0:78046c00:200> [L0 DMU objset] fletcher4 lzjb LE contiguous unique double size=800L/200P birth=195L/195P fill=9 cksum=14e08d9ca4:75598392ef5:15acf3386a785:2cacc61dfac0ea

    Object  lvl   iblk   dblk  dsize  lsize   %full  type
        10    1    16K    512     2K    512  100.00  ZFS directory
                                        192   bonus  System attributes
    dnode flags: USED_BYTES USERUSED_ACCOUNTED SPILL_BLKPTR
    dnode maxblkid: 0
    path    /testdir
    uid     0
    gid     0
    atime   Mon Mar 31 22:12:19 2014
    mtime   Mon Mar 31 22:12:19 2014
    ctime   Mon Mar 31 22:12:25 2014
    crtime  Mon Mar 31 22:12:19 2014
    gen 194
    mode    40775
    size    2
    parent  4
    links   2
    pflags  40800000144
    SA xattrs: 196 bytes, 2 entries

        system.posix_acl_access = \002\000\000\000\001\000\007\000\377\377\377\377\002\000\006\000\322\004\000\000\004\000\005\000\377\377\377\377\020\000\007\000\377\377\377\377 \000\005\000\377\377\377\377
        system.posix_acl_default = \002\000\000\000\001\000\007\000\377\377\377\377\002\000\007\000\322\004\000\000\004\000\007\000\377\377\377\377\020\000\007\000\377\377\377\377 \000\005\000\377\377\377\377
    microzap: 512 bytes, 0 entries

Indirect blocks:
               0 L0 0:40200:200 200L/200P F=1 B=194/194

        segment [0000000000000000, 0000000000000200) size   512

I then proceeded to remove the first xattr with setfattr -x system.posix_acl_access testdir and re-ran the ZDB and saw that the bonus was reduced and no longer had SPILL_BLKPTR set and then removed the remaining xattr and everything looked OK.

I've not yet gotten a chance to re-work my debugging version of zdb but at the very least, under a 3.13 kernel with current master code (and the kthread_create fix), it's not a problem in an of itself to create a directory and apply the ACL you mentioned.

I will try this same test under a 3.10 kernel but I'll have to build it first.

@akorn
Copy link
Contributor Author

akorn commented Apr 1, 2014

My directory wasn't immediately corrupted either, just some time (hours, but less than a day) later, for an unknown reason; however, it kept happening again when I restored from backup and re-applied the ACL.

Also, I don't know if it's relevant at all, but all inodes on the fs had a similar ACL, created by:

find . -type f -exec setfacl -m u:289:rw {} +; find . -type d -exec setfacl -m u:289:rw,d:u:289:rwx,d:g::rwx {} +

There are/were about 220k inodes in use in total.

I will try to re-create the problem under controlled circumstances but I'm not very hopeful.

behlendorf pushed a commit that referenced this issue May 19, 2014
In the case where a variable-sized SA overlaps the spill block pointer and
a new variable-sized SA is being added, the header size was improperly
calculated to include the to-be-moved SA.  This problem could be
reproduced when xattr=sa enabled as follows:

	ln -s $(perl -e 'print "x" x 120') blah
	setfattr -n security.selinux -v blahblah -h blah

The symlink is large enough to interfere with the spill block pointer and
has a typical SA registration as follows (shown in modified "zdb -dddd"
<SA attr layout obj> format):

	[ ... ZPL_DACL_COUNT ZPL_DACL_ACES ZPL_SYMLINK ]

Adding the SA xattr will attempt to extend the registration to:

	[ ... ZPL_DACL_COUNT ZPL_DACL_ACES ZPL_SYMLINK ZPL_DXATTR ]

but since the ZPL_SYMLINK SA interferes with the spill block pointer, it
must also be moved to the spill block which will have a registration of:

	[ ZPL_SYMLINK ZPL_DXATTR ]

This commit updates extra_hdrsize when this condition occurs, allowing
hdrsize to be subsequently decreased appropriately.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Issue #2214
Issue #2228
Issue #2316
Issue #2343
@behlendorf
Copy link
Contributor

A potential fix for this has been merged. Please let us know if you're able to recreate this issue using a pool created from the latest master source which includes commit 83021b4.

@behlendorf behlendorf modified the milestones: 0.6.4, 0.6.5 May 19, 2014
FransUrbo pushed a commit to FransUrbo/zfs that referenced this issue May 20, 2014
In the case where a variable-sized SA overlaps the spill block pointer and
a new variable-sized SA is being added, the header size was improperly
calculated to include the to-be-moved SA.  This problem could be
reproduced when xattr=sa enabled as follows:

	ln -s $(perl -e 'print "x" x 120') blah
	setfattr -n security.selinux -v blahblah -h blah

The symlink is large enough to interfere with the spill block pointer and
has a typical SA registration as follows (shown in modified "zdb -dddd"
<SA attr layout obj> format):

	[ ... ZPL_DACL_COUNT ZPL_DACL_ACES ZPL_SYMLINK ]

Adding the SA xattr will attempt to extend the registration to:

	[ ... ZPL_DACL_COUNT ZPL_DACL_ACES ZPL_SYMLINK ZPL_DXATTR ]

but since the ZPL_SYMLINK SA interferes with the spill block pointer, it
must also be moved to the spill block which will have a registration of:

	[ ZPL_SYMLINK ZPL_DXATTR ]

This commit updates extra_hdrsize when this condition occurs, allowing
hdrsize to be subsequently decreased appropriately.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Issue openzfs#2214
Issue openzfs#2228
Issue openzfs#2316
Issue openzfs#2343
@behlendorf
Copy link
Contributor

Closing issue. This is believed to have been resolved in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants