ocfs2-related kernel panic with Linux 4.1.6 kernels
Hi Alan,
It is caused by unlocking rw lock twice during dio.
I think it is the same bug fixed by commit aa1057b3dec4 ("ocfs2: direct write will call ocfs2_rw_unlock() twice when doing aio+dio").
Quoted 122 lines · Alan Hodgson
I have a couple of 2-node clusters running a bunch of KVM guests, they run DRBD active/active with OCFS2 as a cluster filesystem.
All the hosts run Gentoo Hardened.
I recently updated one of the hosts in the "test" cluster to kernel 4.1.6, first to the Gentoo Hardened sources, and when that crashed, I've just tried the equivalent gentoo-sources 4.1.6.
The panic trace seems to point to OCFS2 - both kernels crash immediately as soon as a single KVM guest starts to mount its root, with the following:
Sep 10 09:59:05 hades kernel: ------------[ cut here ]------------ Sep 10 09:59:05 hades kernel: kernel BUG at fs/ocfs2/dlmglue.c:775! Sep 10 09:59:05 hades kernel: invalid opcode: 0000 [#1] SMP Sep 10 09:59:05 hades kernel: Modules linked in: vhost_net vhost macvtapmacvlan tun drbd
lru_cacheip6t_REJECTnf_reject_ipv6ipt_REJECTnf_reject_ipv4nf_conntrack_ipv6nf_defrag_ipv6xt_conntrackxt_tcpudpbridgeip6table_filter8021q garp stp mrp llcip6_tablesiptable_filternf_conntrack_ftpnf_conntrack_ipv4nf_defrag_ipv4nf_conntrackip_tablesx_tablesosst ch st ipv6dm_zerodm_thin_pooldm_persistent_datadm_bio_prisondm_round_robindm_multipathscsi_dhvirtio_pcivirtio_balloonvirtio_ringvirtio xts gf128mulaes_x86_64cbcsha512_genericsha256_genericsha1_genericscsi_transport_iscsinfs lockd grace sunrpc multipath linear raid10 raid1 raid0dm_raidraid456async_raid6_recovasync_memcpyasync_pqasync_xorxorasync_txraid6_pqdm_snapshotdm_bufiodm_cryptdm_mirrordm_region_hashdm_logdm_modhid_sunplusSep 10 09:59:05 hades kernel: hid_sony led_class hid_samsung hid_pl
hid_petalynxhid_gyrationsl811_hcdxhci_pcixhci_hcdohci_pciohci_hcdusb_storagemegaraid_sasmegaraid_mboxmegaraid_mmmptsas mptfcscsi_transport_fcmptspiscsi_transport_spimptscsih mptbase sgpdc_admasata_inic162xsata_mvahci libahcisata_qstorsata_vscsata_ulisata_sissata_sx4sata_nvsata_viasata_svwsata_sil24sata_silsata_promisepata_sl82c105pata_viapata_marvellpata_sispata_netcellpata_pdc202xx_oldpata_triflexpata_atiixppata_optipata_amdpata_alipata_it8213pata_ns87415pata_ns87410pata_serverworkspata_artoppata_it821xpata_optidmapata_hpt3x2npata_hpt3x3pata_hpt37xpata_hpt366pata_cmd64xpata_efarpata_rz1000pata_sil680pata_radisyspata_pdc2027xpata_mpiixjoydev usbhiduhci_hcdcoretempkvm_intelkvmcrc32c_intelSep 10 09:59:05 hades kernel: microcode pcspkr pata_acpi ehci_pci ehci_hcd ixgbe ata_piix pata_jmicron arcmsr mdio i2c_i801 libata igb usbcore mpt2sas ptp usb_common raid_class pps_core i2c_algo_bit scsi_transport_sas ioatdma i2c_core dca button acpi_cpufreq processor thermal_sys Sep 10 09:59:05 hades kernel: CPU: 0 PID: 5363 Comm: drbd_a_drbd0 Tainted: G I 4.1.6-gentoo #1 Sep 10 09:59:05 hades kernel: Hardware name: Supermicro X8DAH/X8DAH, BIOS 2.0 06/01/2010 Sep 10 09:59:05 hades kernel: task: ffff88180cfe8050 ti: ffff88180bb58000 task.ti: ffff88180bb58000 Sep 10 09:59:05 hades kernel: RIP: 0010:[<ffffffff81227ab7>] [<ffffffff81227ab7>] __ocfs2_cluster_unlock.isra.43+0x40/0x9e Sep 10 09:59:05 hades kernel: RSP: 0018:ffff88180bb5bb88 EFLAGS: 00010046 Sep 10 09:59:05 hades kernel: RAX: 0000000000000000 RBX: ffff88180ef3a108 RCX: 00000000000000a4 Sep 10 09:59:05 hades kernel: RDX: 000000000000a4a4 RSI: ffff88180ef3a108 RDI: ffff88180ef3a174 Sep 10 09:59:05 hades kernel: RBP: ffff88180bb5bbb8 R08: ffffffff81211f6f R09: 0000000000000001 Sep 10 09:59:05 hades kernel: R10: 0000000000000000 R11: 000000000000d2e0 R12: ffff88180ef3a174 Sep 10 09:59:05 hades kernel: R13: 0000000000000005 R14: ffff88180c6d5000 R15: 0000000000000246 Sep 10 09:59:05 hades kernel: FS: 0000000000000000(0000) GS:ffff880c3fc00000(0000) knlGS:0000000000000000 Sep 10 09:59:05 hades kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b Sep 10 09:59:05 hades kernel: CR2: 0000000000509b2f CR3: 000000000161f000 CR4: 00000000000026f0 Sep 10 09:59:05 hades kernel: Stack: Sep 10 09:59:05 hades kernel: 0000000000000000 0000000000000005 ffff88180ef3a508 ffff88180c6d5000 Sep 10 09:59:05 hades kernel: 0000000af8310400 0000000000000001 ffff88180bb5bbf8 ffffffff81229141 Sep 10 09:59:05 hades kernel: 000000000000000a ffff880c0ea43f40 ffff880c0eedeb40 ffff880c035cf040 Sep 10 09:59:05 hades kernel: Call Trace: Sep 10 09:59:05 hades kernel: [<ffffffff81229141>] ocfs2_rw_unlock+0xbc/0xc7 Sep 10 09:59:05 hades kernel: [<ffffffff81211fc8>] ocfs2_dio_end_io+0x59/0x5e Sep 10 09:59:05 hades kernel: [<ffffffff81113bc4>] dio_complete+0x92/0x150 Sep 10 09:59:05 hades kernel: [<ffffffff81113d43>] dio_bio_end_aio+0xc1/0xca Sep 10 09:59:05 hades kernel: [<ffffffff812c0bc5>] bio_endio+0x61/0x68 Sep 10 09:59:05 hades kernel: [<ffffffffa1538ef4>] complete_master_bio+0x1f/0x145 [drbd] Sep 10 09:59:05 hades kernel: [<ffffffffa1533368>] validate_req_change_req_state+0xca/0xdb [drbd] Sep 10 09:59:05 hades kernel: [<ffffffffa1533623>] got_BlockAck+0x113/0x130 [drbd] Sep 10 09:59:05 hades kernel: [<ffffffffa1537ff9>] drbd_asender+0x58b/0x6c3 [drbd] Sep 10 09:59:05 hades kernel: [<ffffffffa153ed22>] ? drbd_destroy_connection+0xaf/0xaf [drbd] Sep 10 09:59:05 hades kernel: [<ffffffffa153ed68>] drbd_thread_setup+0x46/0x114 [drbd] Sep 10 09:59:05 hades kernel: [<ffffffffa153ed22>] ? drbd_destroy_connection+0xaf/0xaf [drbd] Sep 10 09:59:05 hades kernel: [<ffffffff81050497>] kthread+0xcd/0xd5 Sep 10 09:59:05 hades kernel: [<ffffffff810503ca>] ? kthread_create_on_node+0x16c/0x16c Sep 10 09:59:05 hades kernel: [<ffffffff81490b92>] ret_from_fork+0x42/0x70 Sep 10 09:59:05 hades kernel: [<ffffffff810503ca>] ? kthread_create_on_node+0x16c/0x16c Sep 10 09:59:05 hades kernel: Code: 6c 53 4c 89 e7 48 89 f3 51 e8 9e 89 26 00 48 85 db 75 02 0f 0b 41 83 fd 03 49 89 c7 74 16 41 83 fd 05 75 20 8b 43 5c 85 c0 75 02 <0f> 0b ff c8 89 43 5c eb 12 8b 53 58 85 d2 75 02 0f 0b ff ca 89 Sep 10 09:59:05 hades kernel: RIP [<ffffffff81227ab7>] __ocfs2_cluster_unlock.isra.43+0x40/0x9e Sep 10 09:59:05 hades kernel: RSP <ffff88180bb5bb88> Sep 10 09:59:05 hades kernel: ---[ end trace 42d7ee8da6efb352 ]---These hosts have all run 3.18.9 for the last 5 months with no issues, and previous 3.x kernels also with no problems since installation about a year ago.
If anyone has a clue what I'm doing wrong, I'd love to hear from you ... thanks for any help.
_______________________________________________
Ocfs2-users mailing list
Ocfs2-users at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-users.