Bug 426903 - System crashes upon inserting media into CD/DVD-ROM drive
System crashes upon inserting media into CD/DVD-ROM drive
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-12-28 04:12 EST by Joachim Frieben
Modified: 2008-02-05 09:37 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-05 09:37:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output of dmesg for kernel (24.06 KB, text/plain)
2007-12-28 04:12 EST, Joachim Frieben
no flags Details
Excerpt from messages log file for kernel (862 bytes, text/plain)
2007-12-28 04:31 EST, Joachim Frieben
no flags Details

  None (edit)
Description Joachim Frieben 2007-12-28 04:12:04 EST
Description of problem:
Upon inserting a CD or a DVD into the DVD-ROM drive, the latter shows
some activity druring a couple od seconds. Then, the screen turns blank
and the system restarts.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Boot Fedora 8.
2. Login to GNOME desktop.
3. Insert media into DVD-ROM drive.
Actual results:
System crashes and reboots.

Expected results:
Media gets mounted and nautilus opens up a new window.

Additional info:
- No problems under Windows 2000 Professional .
- Both x86 and x86_64 versions of the F8 rescue CD boot correctly.
- Problem seems to be a generic x86_64 one. When I boot current
  Ubuntu 8.04 AMD64 live CD, it aborts similarly during start-up
  whereas the x86 version boots correctly.
- The board is of type Tyan S2865AG2NRF sporting an NForce4 Ultra
  chipset, and both DVD-ROM drive and system hard disk are
  connected by means of IDE channels.
Comment 1 Joachim Frieben 2007-12-28 04:12:04 EST
Created attachment 290484 [details]
Output of dmesg for kernel
Comment 2 Joachim Frieben 2007-12-28 04:31:44 EST
Created attachment 290485 [details]
Excerpt from messages log file for kernel
Comment 3 Chuck Ebbert 2008-01-02 19:19:42 EST
Does disabling DMA for the CD/DVD drive help?

Try adding this line to /etc/modprobe.conf:

  options libata dma=1

Then either rebuild the initrd or uninstall/reinstall the kernel to get an
updated initrd.
Comment 4 Joachim Frieben 2008-01-03 14:08:59 EST
I have tried adding "[options] libata dma=0/1" to both modprobe.conf and
the kernel boot options [even adding "ide=nodma", too]. It looks as if
for kernel [on system otherwise upgraded to "rawhide"]
has no effect [the original report was for F8 with updates].
For both hard disk and DVD drive, 'hdparm -d /dev/..' returns nil,
and 'hdparm -t /dev/sda' reports about 60 MB/s which seems to indicate
operation in UDMA/133 mode which should have been disabled though.
The system still crashes when inserting a disk media. When booting with
an already inserted media, it's usually at the point of starting the
'hal' daemon that the system aborts. Even without any media inserted, it
aborts about 1 out of 2 times after entering the "udev" start-up section
and before loading the default keymap.
The Ubuntu 8.04 problem has turned out to be related to "usplash" and
not to the present issue. After removing "splash" from the boot options,
the live CD successfully boots into the desktop environment.
Comment 5 Joachim Frieben 2008-01-03 18:35:25 EST
The problem seems to be due to the "pata_amd" module [v0.3.9] which
handles both ATA drives. For this module, it's impossible to display
or change the DMA settings:

 "hdparm -d0 /dev/sda/dev/sda:
   setting using_dma to 0 (off)
   HDIO_SET_DMA failed: Inappropriate ioctl for device"

for both kernel- and kernel-2.6.24-0.133.rc6.git8.fc9.

For the current Ubuntu 8.04 AMD64 live CD mentioned above, things work
as expected, but in contrast with Fedora, a different module named
"pata_acpi" and absent from the Fedora kernels is loaded. In turn, the
Ubuntu kernel does not include "pata_amd".
Comment 6 Joachim Frieben 2008-01-03 19:17:32 EST
(In reply to comment #3)
Following the prescription of comment #3, the DVD drive is now controlled
without using DMA:

  ata2.00: ATAPI: SONY DVD-ROM DDU1612, DYS3, max UDMA/33
  ata2.00: configured for PIO4

and booting the system with inserted media or inserting a media within a
GNOME session works essentially correctly, in particular, without causing
the crashes reported earlier.
Comment 7 Chuck Ebbert 2008-01-04 18:18:18 EST
So it reboots right after printing these messages when DMA is enabled, right?

 ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
 ata1.00: cmd a0/00:00:00:00:20/00:00:00:00:00/a0 tag 0 cdb 0x0 data 0 
          res 00/01:01:01:14:eb/00:00:00:00:00/a0 Emask 0x2 (HSM violation)
 ata1: soft resetting port
 ata1.00: configured for UDMA/33
 ata1: EH complete
Comment 8 Joachim Frieben 2008-01-05 05:14:47 EST
Actually no but these were the last lines in "messages" with a leading
"kernel: ata1" before the crash. Operation went on for a while with a
mixed DVD/network yum transaction during which all of a sudden the
system started over.
Note that this infamous "HSM violation" complaint also appears
occasionally when the DVD drive has been configured for PIO4 operation.
Anyway, "rawhide" is moving pretty fast, and from what appears today
it looks as if this crash is less likely to happen than some days ago.
Also annoying is that I cannot even print out basic DVD drive
information since this is what I obtain from 'hdparm -I /dev/sr0'

  HDIO_DRIVE_CMD(identify) failed: Input/output error
Comment 9 Joachim Frieben 2008-01-06 09:29:44 EST
Upgrading to kernel-2.6.24-0.136.rc6.git12.fc9 improves the situation
significantly. Both drives are using DMA again, and in general, media
are mounted correctly. I happened to trigger a crash once by 'hdparm -t
/dev/sr0' but afterwards, benchmarking succeeded a couple of times
without incident. Note that with the current "rawhide" kernel, it's
possible again to retrieve drive information by means of 'hdparm -I
/dev/sr0' in contrast with earlier results reported in comment #8:

hdparm -I /dev/sr0


ATAPI CD-ROM, with removable media
	Model Number:       SONY DVD-ROM DDU1612                    
	Serial Number:      
	Firmware Revision:  DYS3    
	Used: ATAPI for CD-ROMs, SFF-8020i, r2.5
	Supported: CD-ROM ATAPI-2 
	DRQ response: 50us.
	Packet size: 12 bytes
	LBA, IORDY(cannot be disabled)
	DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 
	     Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	     Cycle time: no flow control=227ns  IORDY flow control=120ns

However, it's still impossible to change the DMA setting on the fly:

hdparm -d1 /dev/sr0

 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Inappropriate ioctl for device
Comment 10 Joachim Frieben 2008-02-05 09:37:38 EST
Issue has completely disappeared for current "rawhide".

Note You need to log in before you can comment on or make changes to this bug.