mdraid panic on shutdown due to device being marked readonly
Issue
- Some version of RHEL (found on 6.2, 6.3 and 5.9) crash in a kernel panic during shutdown at
md_write_start()
- Installation a RHEL 6.3 machine using our kickstart and mdraid fails or panics at reboot.
- The following trace is seen (RHEL6 trace is shown below):
------------[ cut here ]------------
kernel BUG at drivers/md/md.c:6942!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/block/md2/md/safe_mode_delay
CPU 0
Modules linked in: ext4 jbd2 fcoe libfcoe libfc scsi_transport_fc scsi_tgt xts lrw gf128mul sha256_generic cbc dm_crypt dm_round_robin dm_multipath dm_snapshot dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx raid1 raid0 ext2 mbcache mlx4_ib mlx4_en mlx4_core ib_ipoib ib_cm ib_sa ib_mad ib_core ipv6 tg3 sg sd_mod crc_t10dif forcedeth pata_amd ata_generic pata_acpi sata_nv iscsi_ibft iscsi_boot_sysfs pcspkr edd iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi squashfs cramfs [last unloaded: scsi_wait_scan]
Pid: 2082, comm: jbd2/dm-0-8 Not tainted 2.6.32-279.el6.x86_64 #1 Sun Microsystems Sun Fire X2100 M2/S40
RIP: 0010:[<ffffffff813fab8b>] [<ffffffff813fab8b>] md_write_start+0x1bb/0x1c0
RSP: 0018:ffff8801024c19d0 EFLAGS: 00010246
RAX: 0000000000000001 RBX: ffff880118606400 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff8800d1951380 RDI: ffff880118606400
RBP: ffff8801024c1a20 R08: 0000000000000246 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000441
R13: ffff8801004f9c00 R14: 0000000000478e08 R15: 0000000000000000
FS: 00007f96b1108720(0000) GS:ffff880028200000(0000) knlGS:00000000095c0830
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00007f96b1399c5c CR3: 000000011bf9b000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process jbd2/dm-0-8 (pid: 2082, threadinfo ffff8801024c0000, task ffff8801181e1540)
Stack:
0000000000000000 0000000000000246 0000000000000000 ffff8801021a77c0
<d> 0000000000011210 ffff88011cce0d40 ffff880118147940 ffff880118606400
<d> 0000000000000441 ffff8801004f9c00 ffff8801024c1b50 ffffffffa021eafa
Call Trace:
[<ffffffffa021eafa>] make_request+0x4a/0xd20 [raid1]
[<ffffffffa02946fd>] ? __map_bio+0xad/0x130 [dm_mod]
[<ffffffff813f6265>] md_make_request+0xd5/0x210
[<ffffffff81256dbe>] generic_make_request+0x25e/0x530
[<ffffffff81116855>] ? mempool_alloc_slab+0x15/0x20
[<ffffffffa033d4fe>] ? jbd2_journal_file_buffer+0x4e/0x90 [jbd2]
[<ffffffff8125711d>] submit_bio+0x8d/0x120
[<ffffffff811acd46>] submit_bh+0xf6/0x150
[<ffffffffa033ec18>] jbd2_journal_commit_transaction+0x598/0x14b0 [jbd2]
[<ffffffff810096f0>] ? __switch_to+0xd0/0x320
[<ffffffff8107eabb>] ? try_to_del_timer_sync+0x7b/0xe0
[<ffffffffa0344f78>] kjournald2+0xb8/0x220 [jbd2]
[<ffffffff810920d0>] ? autoremove_wake_function+0x0/0x40
[<ffffffffa0344ec0>] ? kjournald2+0x0/0x220 [jbd2]
[<ffffffff81091d66>] kthread+0x96/0xa0
[<ffffffff8100c14a>] child_rip+0xa/0x20
[<ffffffff81091cd0>] ? kthread+0x0/0xa0
[<ffffffff8100c140>] ? child_rip+0x0/0x20
Code: c7 83 b4 01 00 00 00 00 00 00 f0 80 4b 28 02 f0 80 4b 28 04 48 8b bb 40 01 00 00 41 bc 01 00 00 00 e8 ba 5f ff ff e9 5e ff ff ff <0f> 0b eb fe 90 55 48 89 e5 48 83 ec 20 48 89 5d e8 4c 89 65 f0
RIP [<ffffffff813fab8b>] md_write_start+0x1bb/0x1c0
RSP <ffff8801024c19d0>
---[ end trace 674ae3b1a9ea9059 ]---
Environment
- Red Hat Enterprise Linux (RHEL) version 6 and 5 (currently seen on 5.9, 6.2 and 6.3)
- Software RAID via mdadm
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.