fdisk hangs after "Calling ioctl() to re-read partition table" message.
Issue
- When trying to write the partition table on the new disk fdisk went into "D" state, as shown below:
# fdisk /dev/sdh
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x2252db2b.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table. <======== Hung
Following traces are seen in dmesg:
INFO: task fdisk:3985 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
fdisk D 0000000000000009 0 3985 3959 0x00000080
ffff88083431bb08 0000000000000086 ffff88083431bbd8 ffffffff81055b84
ffff8804335ec138 ffff8804335ec048 ffff880432342f20 ffff880432342f20
ffff8805da922638 ffff88083431bfd8 000000000000fb88 ffff8805da922638
Call Trace:
[<ffffffff81055b84>] ? find_busiest_group+0x244/0x9f0
[<ffffffff8109b669>] ? ktime_get_ts+0xa9/0xe0
[<ffffffff8110ffe0>] ? sync_page+0x0/0x50
[<ffffffff814ea7a3>] io_schedule+0x73/0xc0
[<ffffffff8111001d>] sync_page+0x3d/0x50
[<ffffffff814eb15f>] __wait_on_bit+0x5f/0x90
[<ffffffff81110253>] wait_on_page_bit+0x73/0x80
[<ffffffff81090c20>] ? wake_bit_function+0x0/0x50
[<ffffffff81126665>] ? pagevec_lookup_tag+0x25/0x40
[<ffffffff811106cb>] wait_on_page_writeback_range+0xfb/0x190
[<ffffffff811257e4>] ? generic_writepages+0x24/0x30
[<ffffffff81125811>] ? do_writepages+0x21/0x40
[<ffffffff8111081b>] ? __filemap_fdatawrite_range+0x5b/0x60
[<ffffffff8111078f>] filemap_fdatawait+0x2f/0x40
[<ffffffff81110db4>] filemap_write_and_wait+0x44/0x60
[<ffffffff811af8d4>] __sync_blockdev+0x24/0x50
[<ffffffff811af913>] sync_blockdev+0x13/0x20
[<ffffffff811b0308>] fsync_bdev+0x58/0x70
[<ffffffff81257abe>] invalidate_partition+0x2e/0x60
[<ffffffff811e798f>] rescan_partitions+0x5f/0x410
[<ffffffff81090f9c>] ? remove_wait_queue+0x3c/0x50
[<ffffffff812566ac>] blkdev_ioctl+0x5bc/0x6e0
[<ffffffff81052223>] ? __wake_up+0x53/0x70
[<ffffffff811ae83c>] block_ioctl+0x3c/0x40
[<ffffffff811892d2>] vfs_ioctl+0x22/0xa0
[<ffffffff81310f2e>] ? tty_ldisc_deref+0xe/0x10
[<ffffffff81309ea3>] ? tty_write+0x233/0x2a0
[<ffffffff81189474>] do_vfs_ioctl+0x84/0x580
[<ffffffff81176842>] ? vfs_write+0x132/0x1a0
[<ffffffff811899f1>] sys_ioctl+0x81/0xa0
[<ffffffff810d3c95>] ? __audit_syscall_exit+0x265/0x290
[<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
Environment
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.