From: "George Spelvin" Subject: 2.6.25-rc4 oops using hdparm --write-sector Date: Mon, 10 Mar 2008 03:46:42 -0400 Message-ID: <20080310074642.19448.qmail@science.horizon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from science.horizon.com ([192.35.100.1]:13952 "HELO science.horizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750800AbYCJHqr (ORCPT ); Mon, 10 Mar 2008 03:46:47 -0400 Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: linux-ide@vger.kernel.org I was using --write-sector a lot to clean up some bad spots on a drive (actually, I locally hacked hdparm to take a sector range, so it was executing thousands). It would periodically pause for a second while writing a sector, and occasionally spit out: hdi: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest } ide: failed opcode was: 0x30 I think those were just timeouts (I have write cacheing disabled for better error reporting) and I was ignoring them, but then I got the appended puke in the syslog. I can't say if this is a regression; it's not something I do regularly. (I can say that repeating the operation seems to be succeeding so far.) Other things I've learned with hdparm: - hdparm -R actually seems to work to re-scan an IDE bus that had nothing connected at boot. - hdparm -U makes the kernel very unhappy. - A subsequent hdparm -R will fill the screen with scrolling oops messages. - I wish there was a cleaner (and less dangerous) way to do IDE coldplug. Anyway, in case it helps anyone, here's the oops. The drive is connected to a PDC20268 PCI IDE controller. Thank you for all your hard work. hdi: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest } ide: failed opcode was: 0x30 hdi: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest } ide: failed opcode was: 0x30 hdi: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest } ide: failed opcode was: 0x30 hdi: task_out_intr: status=0x58 { DriveReady SeekComplete DataRequest } ide: failed opcode was: 0x30 BUG: unable to handle kernel NULL pointer dereference at 00000000 IP: [] sg_next+0x2/0x1a *pde = 00000000 Oops: 0000 [#1] Pid: 17734, comm: hdparm Not tainted (2.6.25-rc4 #47) EIP: 0060:[] EFLAGS: 00010246 CPU: 0 EIP is at sg_next+0x2/0x1a EAX: 00000000 EBX: e9fcd800 ECX: 00000000 EDX: d1ba2000 ESI: b0452414 EDI: efaa3000 EBP: b0452460 ESP: d1ba2bb8 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 Process hdparm (pid: 17734, ti=d1ba2000 task=e9f68ff0 task.ti=d1ba2000) Stack: b0248bb2 00000001 d1ba2ca8 b0452460 00000001 d1ba2ca8 b0248c6c 010000a1 d1ba2ca8 b0452460 000000a1 b0248ff7 00000000 00000000 d1ba2d9c b0452460 00000000 b0245394 4088c8a0 d1ba2c24 ffffffff ef8e0080 b0452414 00000000 Call Trace: [] ide_pio_sector+0x99/0xdf [] ide_pio_datablock+0x74/0x80 [] do_rw_taskfile+0x10c/0x1bb [] ide_do_request+0x45c/0x7d3 [] __blk_end_request+0x30/0x37 [] elv_queue_empty+0x1d/0x1e [] getnstimeofday+0x2b/0xac [] elv_insert+0x64/0x134 [] ide_do_drive_cmd+0x8a/0xc4 [] ide_raw_taskfile+0x83/0x8e [] blk_end_sync_rq+0x0/0x24 [] ide_taskfile_ioctl+0x354/0x419 [] generic_ide_ioctl+0x1d2/0x495 [] idedisk_ioctl+0xb9/0x126 [] idedisk_ioctl+0x0/0x126 [] blkdev_driver_ioctl+0x39/0x3f [] blkdev_ioctl+0x65e/0x68d [] atomic_notifier_call_chain+0x9/0xc [] do_con_write+0x1777/0x17c0 [] generic_writepages+0x1a/0x21 [] write_chan+0x283/0x298 [] __wake_up+0xf/0x15 [] tty_ldisc_deref+0x43/0x49 [] block_ioctl+0x0/0x13 [] block_ioctl+0x10/0x13 [] vfs_ioctl+0x16/0x48 [] do_vfs_ioctl+0x1e7/0x1f3 [] sys_ioctl+0x2c/0x45 [] sysenter_past_esp+0x5f/0x85 ======================= Code: eb ff 54 24 04 8b 4f 08 85 c9 75 d0 c7 07 00 00 00 00 83 c4 0c 5b 5e 5f 5d c3 b9 58 9e 1d b0 ba 00 01 00 00 e9 8d ff ff ff 31 c9 00 02 75 10 8d 48 10 8b 40 10 89 c2 83 e2 fc a8 01 0f 45 ca EIP: [] sg_next+0x2/0x1a SS:ESP 0068:d1ba2bb8 ---[ end trace 011499e041e7beb2 ]--- note: hdparm[17734] exited with preempt_count 1 BUG: scheduling while atomic: hdparm/17734/0x10000001 Pid: 17734, comm: hdparm Tainted: G D 2.6.25-rc4 #47 [] schedule+0x3d/0x225 [] __cond_resched+0x13/0x2f [] _cond_resched+0x21/0x2a [] put_files_struct+0x5a/0x96 [] do_exit+0x198/0x4de [] die+0xe3/0xe8 [] do_page_fault+0x430/0x4da [] irq_exit+0x3c/0x53 [] do_page_fault+0x0/0x4da [] error_code+0x6a/0x70 [] sg_next+0x2/0x1a [] ide_pio_sector+0x99/0xdf [] ide_pio_datablock+0x74/0x80 [] do_rw_taskfile+0x10c/0x1bb [] ide_do_request+0x45c/0x7d3 [] __blk_end_request+0x30/0x37 [] elv_queue_empty+0x1d/0x1e hdi: task_out_intr: status=0x50 { DriveReady SeekComplete } ide: failed opcode was: 0x30 [] getnstimeofday+0x2b/0xac [] elv_insert+0x64/0x134 [] ide_do_drive_cmd+0x8a/0xc4 [] ide_raw_taskfile+0x83/0x8e [] blk_end_sync_rq+0x0/0x24 [] ide_taskfile_ioctl+0x354/0x419 [] generic_ide_ioctl+0x1d2/0x495 [] idedisk_ioctl+0xb9/0x126 [] idedisk_ioctl+0x0/0x126 [] blkdev_driver_ioctl+0x39/0x3f [] blkdev_ioctl+0x65e/0x68d [] atomic_notifier_call_chain+0x9/0xc [] do_con_write+0x1777/0x17c0 [] generic_writepages+0x1a/0x21 [] write_chan+0x283/0x298 [] __wake_up+0xf/0x15 [] tty_ldisc_deref+0x43/0x49 [] block_ioctl+0x0/0x13 [] block_ioctl+0x10/0x13 [] vfs_ioctl+0x16/0x48 [] do_vfs_ioctl+0x1e7/0x1f3 [] sys_ioctl+0x2c/0x45 [] sysenter_past_esp+0x5f/0x85 =======================