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

System hang #3445

Closed
roedie opened this issue May 27, 2015 · 23 comments
Closed

System hang #3445

roedie opened this issue May 27, 2015 · 23 comments
Labels
Status: Inactive Not being actively updated

Comments

@roedie
Copy link

roedie commented May 27, 2015

I'm not sure if this is a kernel bug, or if it is ZFS related. Debian Stock kernel 3.2.68 + ZFS 0.6.4-1.1-1-wheezy

508906] general protection fault: 0000 [#1] SMP
[530350.508927] CPU 5
[530350.508934] Modules linked in: 8021q garp stp bonding nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc dm_service_time dm_multipath scsi_dh loop coretemp crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 psmouse aes_generic snd_pcm serio_raw snd_page_alloc snd_timer snd cryptd soundcore pcspkr joydev hpilo hpwdt sb_edac edac_core evdev iTCO_wdt iTCO_vendor_support ioatdma dca zfs(P) zunicode(P) zavl(P) zcommon(P) znvpair(P) spl(O) zlib_deflate container acpi_power_meter button processor ext4 crc16 jbd2 mbcache dm_mod microcode ses enclosure ata_generic usbhid hid uhci_hcd sg sd_mod crc_t10dif mpt2sas raid_class scsi_transport_sas ata_piix ehci_hcd libata usbcore bnx2x usb_common hpsa mdio thermal scsi_mod tg3 crc32c thermal_sys libcrc32c libphy [last unloaded: scsi_wait_scan]
[530350.509486]
[530350.509505] Pid: 46221, comm: nfsd Tainted: P W O 3.2.0-4-amd64 #1 Debian 3.2.68-1+deb7u1 HP ProLiant DL360p Gen8
[530350.509553] RIP: 0010:[] [] dbuf_free_range+0xd5/0x4af [zfs]
[530350.509612] RSP: 0018:ffff88174ce69b00 EFLAGS: 00010282
[530350.509635] RAX: dead000000100008 RBX: dead000000100008 RCX: dead000000100008
[530350.509671] RDX: 00000000000000f8 RSI: ffff880392ae5388 RDI: ffff880392ae5350
[530350.509706] RBP: ffff880a5ac6c878 R08: ffff880a8eca23e0 R09: ffff880a8eca23e0
[530350.509742] R10: ffff8810249b01d0 R11: ffff8810249b01d0 R12: 0000000000000000
[530350.509778] R13: 0000000000000eb8 R14: ffff88109ac500c0 R15: ffff88176d802300
[530350.509814] FS: 0000000000000000(0000) GS:ffff88183faa0000(0000) knlGS:0000000000000000
[530350.509851] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[530350.509874] CR2: 00007fd215dfc000 CR3: 00000017d53aa000 CR4: 00000000000406e0
[530350.509910] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[530350.509946] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[530350.509983] Process nfsd (pid: 46221, threadinfo ffff88174ce68000, task ffff88176ea9c040)
[530350.510019] Stack:
[530350.510037] 0000000000000000 ffffffffa0636f90 ffff880a5ac6cac8 0000000000000000
[530350.510090] ffff88176ea9c040 0100000000000248 0000000000fde037 ffff880a5ac6cb08
[530350.510143] 0000000000fde037 dead000000100008 ffff88176ea9c040 ffff88176ea9c040
[530350.510195] Call Trace:
[530350.510235] [] ? range_tree_add+0x20c/0x21f [zfs]
[530350.510273] [] ? dnode_free_range+0x40e/0x44b [zfs]
[530350.510308] [] ? dmu_free_long_range+0x183/0x1db [zfs]
[530350.510335] [] ? should_resched+0x5/0x23
[530350.510374] [] ? zfs_rmnode+0x61/0x2b8 [zfs]
[530350.510413] [] ? zfs_zinactive+0xb3/0x139 [zfs]
[530350.510452] [] ? zfs_inactive+0x130/0x169 [zfs]
[530350.510488] [] ? zpl_evict_inode+0x3e/0x4c [zfs]
[530350.510514] [] ? evict+0x96/0x148
[530350.510537] [] ? d_delete+0xdc/0xff
[530350.510561] [] ? vfs_unlink+0xb0/0xbb
[530350.510588] [] ? nfsd_unlink+0xea/0x145 [nfsd]
[530350.510616] [] ? nfsd3_proc_remove+0x76/0xbc [nfsd]
[530350.510643] [] ? nfsd_dispatch+0xd7/0x1ba [nfsd]
[530350.510672] [] ? svc_process_common+0x2c3/0x4c4 [sunrpc]
[530350.510698] [] ? try_to_wake_up+0x197/0x197
[530350.510725] [] ? svc_process+0x110/0x12c [sunrpc]
[530350.510751] [] ? nfsd+0xe3/0x127 [nfsd]
[530350.510776] [] ? 0xffffffffa04cffff
[530350.510800] [] ? kthread+0x76/0x7e
[530350.510825] [] ? kernel_thread_helper+0x4/0x10
[530350.510851] [] ? kthread_worker_fn+0x139/0x139
[530350.510875] [] ? gs_change+0x13/0x13
[530350.510897] Code: 8d 90 02 00 00 31 db 48 89 4c 24 38 48 39 c8 0f 84 98 03 00 00 48 89 c3 48 2b 9d 88 02 00 00 e9 89 03 00 00 48 8b 95 88 02 00 00 <48> 8b 04 13 48 89 c1 48 29 d1 48 3b 44 24 38 b8 00 00 00 00 48
[530350.511212] RIP [] dbuf_free_range+0xd5/0x4af [zfs]
[530350.511248] RSP
[530350.511659] ---[ end trace 3eb43d768f339f85 ]---

@roedie
Copy link
Author

roedie commented May 29, 2015

Happened again...

May 29 14:33:52 zhead01 kernel: [202149.014855] general protection fault: 0000 [#1] SMP
May 29 14:33:52 zhead01 kernel: [202149.014896] CPU 8
May 29 14:33:52 zhead01 kernel: [202149.014913] Modules linked in: nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc 8021q garp stp bonding dm_service_time dm_multipath loop scsi_dh sb_edac edac_core coretemp psmouse crc32c_intel ghash_clmulni_intel serio_raw aesni_intel aes_x86_64 aes_generic cryptd snd_pcm snd_page_alloc snd_timer hpilo snd soundcore evdev joydev pcspkr hpwdt iTCO_wdt ioatdma iTCO_vendor_support dca zfs(P) zunicode(P) zavl(P) zcommon(P) znvpair(P) spl(O) zlib_deflate acpi_power_meter container processor button ext4 crc16 jbd2 mbcache dm_mod microcode ses enclosure ata_generic usbhid hid uhci_hcd sg sd_mod crc_t10dif ehci_hcd usbcore mpt2sas ata_piix raid_class libata usb_common scsi_transport_sas bnx2x hpsa scsi_mod mdio thermal crc32c thermal_sys tg3 libcrc32c libphy [last unloaded: scsi_wait_scan]
May 29 14:33:52 zhead01 kernel: [202149.015713]
May 29 14:33:52 zhead01 kernel: [202149.015743] Pid: 10971, comm: nfsd Tainted: P W O 3.2.0-4-amd64 #1 Debian 3.2.68-1+deb7u1 HP ProLiant DL360p Gen8
May 29 14:33:52 zhead01 kernel: [202149.015805] RIP: 0010:[] [] dbuf_free_range+0xd5/0x4af [zfs]
May 29 14:33:52 zhead01 kernel: [202149.015893] RSP: 0018:ffff88176eb5fb00 EFLAGS: 00010282
May 29 14:33:52 zhead01 kernel: [202149.015928] RAX: dead000000100008 RBX: dead000000100008 RCX: dead000000100008
May 29 14:33:52 zhead01 kernel: [202149.015996] RDX: 00000000000000f8 RSI: ffff88133816b220 RDI: ffff88133816b1e8
May 29 14:33:52 zhead01 kernel: [202149.016058] RBP: ffff880c58158198 R08: ffff8816328edbb8 R09: ffff8816328edbb8
May 29 14:33:52 zhead01 kernel: [202149.016104] R10: ffff8816328edbb8 R11: ffff8816328edbb8 R12: 0000000000000000
May 29 14:33:52 zhead01 kernel: [202149.016161] R13: 000000000006eb7f R14: ffff88109924c310 R15: ffff882c27225800
May 29 14:33:52 zhead01 kernel: [202149.016208] FS: 0000000000000000(0000) GS:ffff88303f200000(0000) knlGS:0000000000000000
May 29 14:33:52 zhead01 kernel: [202149.024700] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
May 29 14:33:52 zhead01 kernel: [202149.024730] CR2: 00007f785f46b3f0 CR3: 00000017ad85a000 CR4: 00000000000406e0
May 29 14:33:52 zhead01 kernel: [202149.024776] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
May 29 14:33:52 zhead01 kernel: [202149.024832] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
May 29 14:33:52 zhead01 kernel: [202149.024878] Process nfsd (pid: 10971, threadinfo ffff88176eb5e000, task ffff88176e34f7c0)
May 29 14:33:52 zhead01 kernel: [202149.024926] Stack:
May 29 14:33:52 zhead01 kernel: [202149.024956] 0000000000000000 ffffffffa09a9f90 ffff880c581583e8 0000000000064b80
May 29 14:33:52 zhead01 kernel: [202149.025020] ffff88176e34f7c0 0100000000000248 0000000000ffe3cd ffff880c58158428
May 29 14:33:52 zhead01 kernel: [202149.025083] 0000000000ffe3cd dead000000100008 ffff88176e34f7c0 ffff88176e34f7c0
May 29 14:33:52 zhead01 kernel: [202149.025154] Call Trace:
May 29 14:33:52 zhead01 kernel: [202149.025201] [] ? range_tree_add+0x20c/0x21f [zfs]
May 29 14:33:52 zhead01 kernel: [202149.025246] [] ? dnode_free_range+0x40e/0x44b [zfs]
May 29 14:33:52 zhead01 kernel: [202149.025309] [] ? dmu_free_long_range+0x183/0x1db [zfs]
May 29 14:33:52 zhead01 kernel: [202149.025357] [] ? zfs_rmnode+0x61/0x2b8 [zfs]
May 29 14:33:52 zhead01 kernel: [202149.025401] [] ? zfs_zinactive+0xb3/0x139 [zfs]
May 29 14:33:52 zhead01 kernel: [202149.025446] [] ? zfs_inactive+0x130/0x169 [zfs]
May 29 14:33:52 zhead01 kernel: [202149.025504] [] ? zpl_evict_inode+0x3e/0x4c [zfs]
May 29 14:33:52 zhead01 kernel: [202149.025538] [] ? evict+0x96/0x148
May 29 14:33:52 zhead01 kernel: [202149.025567] [] ? d_delete+0xdc/0xff
May 29 14:33:52 zhead01 kernel: [202149.025597] [] ? vfs_unlink+0xb0/0xbb
May 29 14:33:52 zhead01 kernel: [202149.025631] [] ? nfsd_unlink+0xea/0x145 [nfsd]
May 29 14:33:52 zhead01 kernel: [202149.025665] [] ? nfsd3_proc_remove+0x76/0xbc [nfsd]
May 29 14:33:52 zhead01 kernel: [202149.025698] [] ? nfsd_dispatch+0xd7/0x1ba [nfsd]
May 29 14:33:52 zhead01 kernel: [202149.025736] [] ? svc_process_common+0x2c3/0x4c4 [sunrpc]
May 29 14:33:52 zhead01 kernel: [202149.025768] [] ? try_to_wake_up+0x197/0x197
May 29 14:33:52 zhead01 kernel: [202149.025802] [] ? svc_process+0x110/0x12c [sunrpc]
May 29 14:33:52 zhead01 kernel: [202149.025834] [] ? nfsd+0xe3/0x127 [nfsd]
May 29 14:33:52 zhead01 kernel: [202149.025865] [] ? 0xffffffffa04c3fff
May 29 14:33:52 zhead01 kernel: [202149.025897] [] ? kthread+0x76/0x7e
May 29 14:33:52 zhead01 kernel: [202149.025929] [] ? kernel_thread_helper+0x4/0x10
May 29 14:33:52 zhead01 kernel: [202149.025960] [] ? kthread_worker_fn+0x139/0x139
May 29 14:33:52 zhead01 kernel: [202149.025991] [] ? gs_change+0x13/0x13
May 29 14:33:52 zhead01 kernel: [202149.026019] Code: 8d 90 02 00 00 31 db 48 89 4c 24 38 48 39 c8 0f 84 98 03 00 00 48 89 c3 48 2b 9d 88 02 00 00 e9 89 03 00 00 48 8b 95 88 02 00 00 <48> 8b 04 13 48 89 c1 48 29 d1 48 3b 44 24 38 b8 00 00 00 00 48
May 29 14:33:52 zhead01 kernel: [202149.026401] RIP [] dbuf_free_range+0xd5/0x4af [zfs]
May 29 14:33:52 zhead01 kernel: [202149.026445] RSP
May 29 14:33:52 zhead01 kernel: [202149.026880] ---[ end trace ffbf600c473945a9 ]---

@kernelOfTruth
Copy link
Contributor

What were you doing when this happened ?

zfs send or receive ?

Are you using NFS ? how ?

Please post more details for easier understanding and reproducibility

Thanks

@roedie
Copy link
Author

roedie commented May 29, 2015

This is an server with 60 sas disks attached in 6 disk raidz2, ~130TB pool. The server has 2 Xeon E5-2650's with 192GB of ram. The disks are connected through 2 LSI2905's. We are running zfs 0.6.4.1 but the pool is not upgraded yet with the new features.

There are 69 volumes on this server which are exported with NFS3. The volumes contain various stuff like kvm images, storage for databases, and just big image files. We have about 2150 snapshots.

Backups are running continously using zfs send, and no volumes are received. So it's hard to say what exactly was happening when the hang/crash happened. Every hour snapshots which are not transfered are created, most of the zfs send's run every 3 hours, just a handful are running hourly.

Looking at the timestamp of the last 2 crashes, the hourly zfs send was running and had done a couple of volumes. The volume it was currently receiving is a 1.8T volume with lz4 compression and 16K recordsize. But, before these 2 I had one more crash during which no zfs send was running.

Prevously the server was running kernel 3.2.65 with zfs 0.6.3-34-417104 (snapshot) happily without crashing.

Hope this helps, or if more or other stuff is needed please ask.

@kernelOfTruth
Copy link
Contributor

@roedie:

Are you using any zvols ?

Are swaps available on that server ?

First I thought that it would be related to 6102d03

but it more looks like something else,

referencing
#1761

the more recent changes could help ... not sure though
#3240 (superseded) , #3254

CC: @chrisrd , @behlendorf

@roedie
Copy link
Author

roedie commented May 31, 2015

@kernelOfTruth

No zvols. Swap space is available, but it is not on zfs. It is on 'normal' disks.

Ofcourse within the vm images that are exported through nfs there is swapspace, but I figure that might not be of any influence.

Importing the pool after the hang took rather long. This kernel message was show while importing the pool:

[202277.281763] SPL: using hostid 0x007f0101
[202472.744162] INFO: task l2arc_feed:1786 blocked for more than 120 seconds.
[202472.744182] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[202472.744199] l2arc_feed D ffff88183fad27c0 0 1786 2 0x00000000
[202472.744224] ffff882faf87f740 0000000000000046 ffff882f00000000 ffff8817de84e840
[202472.744258] 00000000000127c0 ffff882faa397fd8 ffff882faa397fd8 ffff882faf87f740
[202472.744290] 0000000000000286 0000000100000000 ffffffffa0477548 ffffffffa04d7860
[202472.744323] Call Trace:
[202472.744348] [] ? __mutex_lock_common.isra.5+0xff/0x164
[202472.744366] [] ? _raw_spin_unlock_irqrestore+0xe/0xf
[202472.744382] [] ? mutex_lock+0x1a/0x2d
[202472.744407] [] ? l2arc_feed_thread+0x142/0xac6 [zfs]
[202472.744426] [] ? __default_send_IPI_dest_field.constprop.0+0x38/0x4d
[202472.744473] [] ? __switch_to+0x101/0x265
[202472.744502] [] ? update_curr+0xbd/0xd7
[202472.744531] [] ? virt_to_slab+0x6/0x16
[202472.744564] [] ? l2arc_evict+0x396/0x396 [zfs]
[202472.744596] [] ? thread_generic_wrapper+0x6a/0x75 [spl]
[202472.744628] [] ? __thread_create+0x11c/0x11c [spl]
[202472.744658] [] ? kthread+0x76/0x7e
[202472.744687] [] ? kernel_thread_helper+0x4/0x10
[202472.744716] [] ? kthread_worker_fn+0x139/0x139
[202472.744745] [] ? gs_change+0x13/0x13

@roedie
Copy link
Author

roedie commented May 31, 2015

Are #3240 and #3254 already in zfs 0.6.4.1 or are the new fixes only available in master? It's a bit unclear to me.

Would it be wise to see if the lockup happens with zfs master?

@kernelOfTruth
Copy link
Contributor

As of April 29th it's in zfs master ( 6186e29 , 0c66c32 )

There's also a NFS-related fix in the latest tree: 79065ed which might not be entirely related

It's definitely worth a try to see whether that also occurs with all those fixes since 0.6.4 applied

@roedie
Copy link
Author

roedie commented Jun 1, 2015

@kernelOfTruth
Rebooted into v0.6.4-16-544f71-wheezy a couple of minutes ago. Lets see what happens...

@roedie
Copy link
Author

roedie commented Jun 7, 2015

@kernelOfTruth
Drats, it just happened again. The pool seems to go into instant crawl mode. It does respond but is realy slow.

This time a zfs snapshot was running when the pool hang.

[540840.061790] INFO: task zfs:7850 blocked for more than 120 seconds.
[540840.061822] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[540840.061867] zfs D ffff88303f2727c0 0 7850 7848 0x00000000
[540840.061907] ffff8815ae57a7c0 0000000000000082 6b63616200000000 ffff8817de89b7c0
[540840.061968] 00000000000127c0 ffff8812b819ffd8 ffff8812b819ffd8 ffff8815ae57a7c0
[540840.062029] 0000000000000202 00000001813510c9 ffff8817db32bac8 ffff8817db32ba10
[540840.062089] Call Trace:
[540840.062130] [] ? cv_wait_common+0xb5/0x117 [spl]
[540840.062164] [] ? add_wait_queue+0x3c/0x3c
[540840.062193] [] ? should_resched+0x5/0x23
[540840.062240] [] ? txg_wait_synced+0x66/0xb9 [zfs]
[540840.062282] [] ? dsl_dataset_snapshot_check_impl+0x147/0x147 [zfs]
[540840.070597] [] ? dsl_dataset_snapshot_sync_impl+0x54c/0x54c [zfs]
[540840.070657] [] ? dsl_sync_task+0x1c2/0x20f [zfs]
[540840.070697] [] ? dsl_dataset_snapshot_check_impl+0x147/0x147 [zfs]
[540840.070752] [] ? dsl_dataset_snapshot_sync_impl+0x54c/0x54c [zfs]
[540840.070806] [] ? dsl_dataset_snapshot+0x172/0x202 [zfs]
[540840.070838] [] ? spl_kmem_alloc_debug+0x9/0x36 [spl]
[540840.070870] [] ? nv_mem_zalloc.isra.12+0xa/0x21 [znvpair]
[540840.070902] [] ? nvlist_remove_all+0x3d/0x83 [znvpair]
[540840.070933] [] ? kmem_cache_alloc_node_trace+0x96/0x10a
[540840.070963] [] ? kmem_cache_alloc_node_trace+0x96/0x10a
[540840.070995] [] ? spl_kmem_alloc_impl+0xb6/0x111 [spl]
[540840.071037] [] ? zfs_ioc_snapshot+0x22e/0x278 [zfs]
[540840.071077] [] ? zfsdev_ioctl+0x21e/0x3e2 [zfs]
[540840.071107] [] ? mmap_region+0x353/0x44a
[540840.071138] [] ? do_vfs_ioctl+0x459/0x49a
[540840.071166] [] ? sys_ioctl+0x4b/0x72
[540840.071196] [] ? system_call_fastpath+0x16/0x1b

@roedie
Copy link
Author

roedie commented Jun 7, 2015

Just noticed, this time scrub was running as well.

@roedie
Copy link
Author

roedie commented Jun 7, 2015

Just went back to v0.6.3-34-417104-wheezy which is my last known working version. One big difference I discovered is that importing the pool with this version takes ~30 seconds, while importing with zfs 0.6.4 and higher takes minutes.

@roedie
Copy link
Author

roedie commented Jun 17, 2015

Have been running 10 days with v0.6.3-34-417104-wheezy now and still no crashes (knock on wood). So, it seems like a regression between commit 417104 and 0.6.4.1-release to me.

@kernelOfTruth
Copy link
Contributor

CC'ing @dweeezil and @behlendorf on this issue

I'm currently out of ideas but will look further - from time to time

@roedie
Copy link
Author

roedie commented Jul 2, 2015

Today I had a problem which was similar to the previous problems I had. But now with v0.6.3-34-417104.

This time an 2 day old snapshot got destroyed. The 'zfs destroy' command took about 20 minutes to get back to the prompt. All this time it was in 'D' state and pool IO almost grinded to an halt. Data could be read from the pool, but it was dreadfully slow. When the 'zfs destroy' command ended everything was back to normal.

@roedie
Copy link
Author

roedie commented Jul 6, 2015

Tested with 0.6.4.2 and after 2 days zfs crashed again.

[161884.389839] general protection fault: 0000 [#1] SMP
[161884.389872] CPU 7
[161884.389879] Modules linked in: nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc joydev usbhid hid 8021q garp stp bonding dm_service_time loop dm_multipath scsi_dh coretemp crc32c_intel ghash_clmulni_intel psmouse aesni_intel aes_x86_64 aes_generic cryptd snd_pcm snd_page_alloc snd_timer snd soundcore serio_raw pcspkr sb_edac edac_core iTCO_wdt hpwdt iTCO_vendor_support hpilo ioatdma dca evdev zfs(P) zunicode(P) zavl(P) zcommon(P) znvpair(P) spl(O) zlib_deflate container acpi_power_meter button processor ext4 crc16 jbd2 mbcache dm_mod microcode ses enclosure ata_generic sg sd_mod crc_t10dif uhci_hcd mpt2sas raid_class scsi_transport_sas ehci_hcd ata_piix libata usbcore bnx2x hpsa mdio usb_common scsi_mod crc32c thermal thermal_sys libcrc32c tg3 libphy [last unloaded: scsi_wait_scan]
[161884.390442]
[161884.390470] Pid: 10807, comm: nfsd Tainted: P W O 3.2.0-4-amd64 #1 Debian 3.2.68-1+deb7u2 HP ProLiant DL360p Gen8
[161884.390518] RIP: 0010:[] [] dbuf_free_range+0xd5/0x4af [zfs]
[161884.390575] RSP: 0018:ffff88177e5c3b00 EFLAGS: 00010282
[161884.390598] RAX: dead000000100008 RBX: dead000000100008 RCX: dead000000100008
[161884.390633] RDX: 00000000000000f8 RSI: ffff8806b1272388 RDI: ffff8806b1272350
[161884.390669] RBP: ffff88105a7bc118 R08: ffff88177e5c2000 R09: 0000000000100000
[161884.398663] R10: 0000000000100000 R11: 0000000000100000 R12: 0000000000000000
[161884.398699] R13: 000000000002d0ff R14: ffff8815573411e8 R15: ffff880cb400a080
[161884.398735] FS: 0000000000000000(0000) GS:ffff88183fae0000(0000) knlGS:0000000000000000
[161884.398772] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[161884.398795] CR2: 00007f5ad1400710 CR3: 00000017977b1000 CR4: 00000000000406e0
[161884.398831] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[161884.398867] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[161884.398904] Process nfsd (pid: 10807, threadinfo ffff88177e5c2000, task ffff8817db2158c0)
[161884.398940] Stack:
[161884.398959] 0000000000000036 ffffffffa0609f90 ffff88105a7bc368 0000000000023100
[161884.399011] ffff8817db2158c0 01ffffff810713c9 000000000116d628 ffff88105a7bc3a8
[161884.399063] 000000000116d628 dead000000100008 ffff8817db2158c0 ffff8817db2158c0
[161884.399115] Call Trace:
[161884.399155] [] ? range_tree_add+0x20c/0x21f [zfs]
[161884.399194] [] ? dnode_free_range+0x40e/0x44b [zfs]
[161884.399229] [] ? dmu_free_long_range+0x183/0x1db [zfs]
[161884.399269] [] ? zfs_rmnode+0x61/0x2b8 [zfs]
[161884.399307] [] ? zfs_zinactive+0xb3/0x139 [zfs]
[161884.399345] [] ? zfs_inactive+0x130/0x169 [zfs]
[161884.399382] [] ? zpl_evict_inode+0x3e/0x4c [zfs]
[161884.399408] [] ? evict+0x96/0x148
[161884.399432] [] ? d_delete+0xdc/0xff
[161884.399456] [] ? vfs_unlink+0xb0/0xbb
[161884.399483] [] ? nfsd_unlink+0xea/0x145 [nfsd]
[161884.399511] [] ? nfsd3_proc_remove+0x76/0xbc [nfsd]
[161884.399537] [] ? nfsd_dispatch+0xd7/0x1ba [nfsd]
[161884.399568] [] ? svc_process_common+0x2c3/0x4c4 [sunrpc]
[161884.399595] [] ? try_to_wake_up+0x197/0x197
[161884.399622] [] ? svc_process+0x110/0x12c [sunrpc]
[161884.399647] [] ? nfsd+0xe3/0x127 [nfsd]
[161884.399673] [] ? 0xffffffffa04cefff
[161884.399698] [] ? kthread+0x76/0x7e
[161884.399723] [] ? kernel_thread_helper+0x4/0x10
[161884.399748] [] ? kthread_worker_fn+0x139/0x139
[161884.399772] [] ? gs_change+0x13/0x13
[161884.399794] Code: 8d 90 02 00 00 31 db 48 89 4c 24 38 48 39 c8 0f 84 98 03 00 00 48 89 c3 48 2b 9d 88 02 00 00 e9 89 03 00 00 48 8b 95 88 02 00 00 <48> 8b 04 13 48 89 c1 48 29 d1 48 3b 44 24 38 b8 00 00 00 00 48
[161884.400109] RIP [] dbuf_free_range+0xd5/0x4af [zfs]
[161884.400145] RSP
[161884.400603] ---[ end trace 80a3f5979bf43e7a ]---

@behlendorf
Copy link
Contributor

@roedie thanks for the update. I took a look at this and it appears that somehow the dnode_hold succeeded yet returned a NULL dnode. I don't see how that can happen but the following patch should convert the panic in to just an IO error any may be a sufficient workaround until the root cause can be determined.

diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
index 7e8328e..dc993fa 100644
--- a/module/zfs/dmu.c
+++ b/module/zfs/dmu.c
@@ -644,9 +644,13 @@ static int
 dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset,
     uint64_t length)
 {
-       uint64_t object_size = (dn->dn_maxblkid + 1) * dn->dn_datablksz;
+       uint64_t object_size;
        int err;

+       if (dn == NULL)
+               return (SET_ERROR(EINVAL));
+
+       object_size = (dn->dn_maxblkid + 1) * dn->dn_datablksz;
        if (offset >= object_size)
                return (0);

@roedie
Copy link
Author

roedie commented Jul 10, 2015

Great! I will apply this on top of 0.6.4.2, wait for a small maintenance window and see what happens.

@roedie
Copy link
Author

roedie commented Jul 14, 2015

@behlendorf I've rebooted the server into 0.6.4.2 with your patch. Lets see what happens.

@roedie
Copy link
Author

roedie commented Jul 24, 2015

@behlendorf The server has been running longer than before. Should something be logged when the bug is hit?

@kernelOfTruth
Copy link
Contributor

@roedie

something along

 INFO: task zfs:7850 blocked for more than 120 seconds.

or your previous error messages

if nothing's coming up - it appears to work =)

any stalls, hangs, etc. that you observe during operation ?

behlendorf added a commit to behlendorf/zfs that referenced this issue Jul 24, 2015
A NULL should never be passed as the dnode_t pointer to the function
dmu_free_long_range_impl().  Regardless, because we have a reported
occurrence of this let's add some error handling to catch this.
Better to report a reasonable error to caller than panic the system.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3445
@behlendorf
Copy link
Contributor

@roedie an error will be logged to the internal tracepoint buffer but that will be all. In your case, when the error is hit the offending object will just be skipped and left on the unlinked set. That's pretty benign. At worst it will cost you a little free space assuming the error is persistent. If it was transient then it will be cleaned up properly like all the other files you've removed.

I've opened #3627 with the patch.

FransUrbo pushed a commit to FransUrbo/zfs that referenced this issue Jul 24, 2015
…mpl()

A NULL should never be passed as the dnode_t pointer to the function
dmu_free_long_range_impl().  Regardless, because we have a reported
occurrence of this let's add some error handling to catch this.
Better to report a reasonable error to caller than panic the system.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3445
kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Jul 25, 2015
A NULL should never be passed as the dnode_t pointer to the function
dmu_free_long_range_impl().  Regardless, because we have a reported
occurrence of this let's add some error handling to catch this.
Better to report a reasonable error to caller than panic the system.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3445
FransUrbo pushed a commit to FransUrbo/zfs that referenced this issue Jul 26, 2015
…mpl()

A NULL should never be passed as the dnode_t pointer to the function
dmu_free_long_range_impl().  Regardless, because we have a reported
occurrence of this let's add some error handling to catch this.
Better to report a reasonable error to caller than panic the system.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3445
FransUrbo pushed a commit to FransUrbo/zfs that referenced this issue Jul 26, 2015
…mpl()

A NULL should never be passed as the dnode_t pointer to the function
dmu_free_long_range_impl().  Regardless, because we have a reported
occurrence of this let's add some error handling to catch this.
Better to report a reasonable error to caller than panic the system.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3445
FransUrbo pushed a commit to FransUrbo/zfs that referenced this issue Jul 27, 2015
…mpl()

A NULL should never be passed as the dnode_t pointer to the function
dmu_free_long_range_impl().  Regardless, because we have a reported
occurrence of this let's add some error handling to catch this.
Better to report a reasonable error to caller than panic the system.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3445
behlendorf added a commit to behlendorf/zfs that referenced this issue Jul 28, 2015
A NULL should never be passed as the dnode_t pointer to the function
dmu_free_long_range_impl().  Regardless, because we have a reported
occurrence of this let's add some error handling to catch this.
Better to report a reasonable error to caller than panic the system.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#3445
@roedie
Copy link
Author

roedie commented Oct 21, 2015

@behlendorf After months of uptime I suddenly hit this bug again. The system was still running 0.6.4.2 with your patch applied. The only new thing is is the 'Firmware does not respond in time'. which is probably not ZFS related.

Oct 21 06:41:35 zhead02 kernel: [8529224.577324] general protection fault: 0000 [#1] SMP 
Oct 21 06:41:35 zhead02 kernel: [8529224.577365] CPU 15 
Oct 21 06:41:35 zhead02 kernel: [8529224.577373] Modules linked in: nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc 8021q garp stp bonding dm_service_time loop dm_multipath scsi_dh hpilo psmouse coretemp crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 aes_generic serio_raw snd_pcm snd_page_alloc snd_timer snd hpwdt cryptd soundcore joydev pcspkr sb_edac edac_core ioatdma iTCO_wdt dca iTCO_vendor_support evdev zfs(P) zunicode(P) zavl(P) zcommon(P) znvpair(P) spl(O) zlib_deflate container acpi_power_meter button processor ext4 crc16 jbd2 mbcache dm_mod microcode ses enclosure ata_generic usbhid hid sg sd_mod crc_t10dif uhci_hcd ata_piix libata hpsa mpt2sas raid_class ehci_hcd scsi_transport_sas bnx2x usbcore usb_common scsi_mod mdio crc32c thermal thermal_sys tg3 libcrc32c libphy [last unloaded: scsi_wait_scan]
Oct 21 06:41:35 zhead02 kernel: [8529224.578018] 
Oct 21 06:41:35 zhead02 kernel: [8529224.578041] Pid: 13235, comm: nfsd Tainted: P        W  O 3.2.0-4-amd64 #1 Debian 3.2.68-1+deb7u2 HP ProLiant DL360p Gen8
Oct 21 06:41:35 zhead02 kernel: [8529224.578102] RIP: 0010:[<ffffffffa0336c01>]  [<ffffffffa0336c01>] dbuf_free_range+0xd5/0x4af [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.578172] RSP: 0018:ffff882f77165b00  EFLAGS: 00010282
Oct 21 06:41:35 zhead02 kernel: [8529224.578200] RAX: dead000000100008 RBX: dead000000100008 RCX: dead000000100008
Oct 21 06:41:35 zhead02 kernel: [8529224.578246] RDX: 00000000000000f8 RSI: ffff880bde89aed8 RDI: ffff880bde89aea0
Oct 21 06:41:35 zhead02 kernel: [8529224.578291] RBP: ffff8806d021b578 R08: ffff882fde061ec0 R09: ffff882fde061ec0
Oct 21 06:41:35 zhead02 kernel: [8529224.578337] R10: ffff882402bc80a8 R11: ffff882402bc80a8 R12: 0000000000000000
Oct 21 06:41:35 zhead02 kernel: [8529224.578383] R13: 000000000002577a R14: ffff882d2b8117f0 R15: ffff8828d1e8b200
Oct 21 06:41:35 zhead02 kernel: [8529224.578430] FS:  0000000000000000(0000) GS:ffff88303f2e0000(0000) knlGS:0000000000000000
Oct 21 06:41:35 zhead02 kernel: [8529224.578478] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Oct 21 06:41:35 zhead02 kernel: [8529224.578507] CR2: 00007f57c5602f28 CR3: 0000002f9d831000 CR4: 00000000000406e0
Oct 21 06:41:35 zhead02 kernel: [8529224.578553] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Oct 21 06:41:35 zhead02 kernel: [8529224.578599] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Oct 21 06:41:35 zhead02 kernel: [8529224.578645] Process nfsd (pid: 13235, threadinfo ffff882f77164000, task ffff882f77def080)
Oct 21 06:41:35 zhead02 kernel: [8529224.578693] Stack:
Oct 21 06:41:35 zhead02 kernel: [8529224.578715]  0000000000000000 ffffffffa0363fa0 ffff8806d021b7c8 000000000001b780
Oct 21 06:41:35 zhead02 kernel: [8529224.578780]  ffff882f77def080 0100000000000248 00000000015df367 ffff8806d021b808
Oct 21 06:41:35 zhead02 kernel: [8529224.578843]  00000000015df367 dead000000100008 ffff882f77def080 ffff882f77def080
Oct 21 06:41:35 zhead02 kernel: [8529224.578906] Call Trace:
Oct 21 06:41:35 zhead02 kernel: [8529224.578949]  [<ffffffffa0363fa0>] ? range_tree_add+0x20c/0x21f [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.578994]  [<ffffffffa0349f49>] ? dnode_free_range+0x40e/0x44b [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.579036]  [<ffffffffa033b306>] ? dmu_free_long_range+0x18c/0x1ec [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.579084]  [<ffffffffa0391f1e>] ? zfs_rmnode+0x61/0x2b8 [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.579128]  [<ffffffffa03ac676>] ? zfs_zinactive+0xb3/0x139 [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.579173]  [<ffffffffa03a2563>] ? zfs_inactive+0x130/0x169 [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.579216]  [<ffffffffa03b9689>] ? zpl_evict_inode+0x3e/0x4c [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.579250]  [<ffffffff8110dfb4>] ? evict+0x96/0x148
Oct 21 06:41:35 zhead02 kernel: [8529224.579279]  [<ffffffff8110af3e>] ? d_delete+0xdc/0xff
Oct 21 06:41:35 zhead02 kernel: [8529224.579309]  [<ffffffff8110579d>] ? vfs_unlink+0xb0/0xbb
Oct 21 06:41:35 zhead02 kernel: [8529224.579344]  [<ffffffffa06c2c78>] ? nfsd_unlink+0xea/0x145 [nfsd]
Oct 21 06:41:35 zhead02 kernel: [8529224.579378]  [<ffffffffa06c7dfb>] ? nfsd3_proc_remove+0x76/0xbc [nfsd]
Oct 21 06:41:35 zhead02 kernel: [8529224.579412]  [<ffffffffa06be7cd>] ? nfsd_dispatch+0xd7/0x1ba [nfsd]
Oct 21 06:41:35 zhead02 kernel: [8529224.579447]  [<ffffffffa0561c3f>] ? svc_process_common+0x2c3/0x4c4 [sunrpc]
Oct 21 06:41:35 zhead02 kernel: [8529224.579481]  [<ffffffff8103f72d>] ? try_to_wake_up+0x197/0x197
Oct 21 06:41:35 zhead02 kernel: [8529224.579515]  [<ffffffffa0562050>] ? svc_process+0x110/0x12c [sunrpc]
Oct 21 06:41:35 zhead02 kernel: [8529224.579547]  [<ffffffffa06be0e3>] ? nfsd+0xe3/0x127 [nfsd]
Oct 21 06:41:35 zhead02 kernel: [8529224.579577]  [<ffffffffa06be000>] ? 0xffffffffa06bdfff
Oct 21 06:41:35 zhead02 kernel: [8529224.579609]  [<ffffffff8105f805>] ? kthread+0x76/0x7e
Oct 21 06:41:35 zhead02 kernel: [8529224.579641]  [<ffffffff813582f4>] ? kernel_thread_helper+0x4/0x10
Oct 21 06:41:35 zhead02 kernel: [8529224.579672]  [<ffffffff8105f78f>] ? kthread_worker_fn+0x139/0x139
Oct 21 06:41:35 zhead02 kernel: [8529224.579703]  [<ffffffff813582f0>] ? gs_change+0x13/0x13
Oct 21 06:41:35 zhead02 kernel: [8529224.579730] Code: 8d 90 02 00 00 31 db 48 89 4c 24 38 48 39 c8 0f 84 98 03 00 00 48 89 c3 48 2b 9d 88 02 00 00 e9 89 03 00 00 48 8b 95 88 02 00 00 <48> 8b 04 13 48 89 c1 48 29 d1 48 3b 44 24 38 b8 00 00 00 00 48 
Oct 21 06:41:35 zhead02 kernel: [8529224.580072] RIP  [<ffffffffa0336c01>] dbuf_free_range+0xd5/0x4af [zfs]
Oct 21 06:41:35 zhead02 kernel: [8529224.580114]  RSP <ffff882f77165b00>
Oct 21 06:41:35 zhead02 kernel: [8529224.580566] ---[ end trace 50687cf8e2a6c7b2 ]---
Oct 21 06:41:35 zhead02 kernel: [8529224.585454] [Firmware Warn]: ERST: Firmware does not respond in time

@roedie
Copy link
Author

roedie commented Oct 27, 2015

@behlendorf And again today...

I've got a hunch this has something to do with running solr/lucene over NFSv3 on a volume with 16K recordsize. But not sure yet.

I'm a bit hesitant to upgrade to 0.6.5.3 since I have other hangs on servers using that version...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Inactive Not being actively updated
Projects
None yet
Development

No branches or pull requests

4 participants
@behlendorf @roedie @kernelOfTruth and others