ata2 errors with CDRW drive renders drive inaccessible

Bug #99018 reported by Soner Tari
2
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Nanley Chery

Bug Description

As dual boot, I've installed Ubuntu 7.04, Feisty Fawn, with recent
updates (Linux laptop 2.6.20-13-generic #2 SMP Sun Mar 25 00:21:25 UTC
2007 i686 GNU/Linux). I also have Fedora Core 5 for almost a year now, I
have no problems on FC5.

I'm happy with Ubuntu except a very annoying problem: I cannot blank or
record any CDs. Well, I was able to blank a CDRW, 2 out of 50 times,
which I consider by chance. For example, I run the command "wodim -v
dev=/dev/sr0 blank=fast", if wodim is going to fail (which is almost
each time), it spends a lot of time trying something, then spits out the
messages you can find below, and fails. When this happens I cannot
access to the CDRW/DVDROM drive anymore (wodim cannot find any
accessible CD drive, and I cannot use the CD drive even for reading). At
that point, since I don't know how to reinitialize the drive, I have to
reboot the system.

I tried many things, including downloading and installing the latest
version of the original cdrecord, to see if the problem is related with
wodim, but cdrecord behaves the same. I also tried some options and
different device names like /dev/sg1, /dev/cdrw, 1,0,0, etc., without
success. I've also set the environment variable CDR_NODMATEST, stopped
udevd and hald (to see if they interfere with wodim), etc., again
without success.

"wodim --devices" gives:
wodim: Overview of accessible drives (1 found) :
0 dev='/dev/sr0' rwrw-- : 'SAMSUNG' 'CDRW/DVD SN-308B'

Since I have no problems on FC5 using this same CD writer, I don't think
the issue is related with the hardware.

I tend to believe that this is probably related with the device drivers
on Ubuntu (just a wild guess). And another difference between Ubuntu and
FC5 is the SMP kernel (among many other differences of course).

Among other output messages, the following is what I see on the root
console:

ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata2.00: (BMDMA stat 0x5)
ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x5a data 2
in
ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata2.00: (BMDMA stat 0x5)
ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x5a data 8
in
ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata2.00: (BMDMA stat 0x4)
ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x55 data 16
in
ata2.00: revalidation failed (errno=-2)
ata2.00: revalidation failed (errno=-2)
ata2.00: revalidation failed (errno=-2)
Errno: 5 (Input/output error), prevent/allow medium removal scsi
sendcmd: fatal error
CDB: 1E 00 00 00 00 00

Also, the messages log has the following lines when this error occurs:

Mar 29 12:21:01 laptop kernel: [ 4295.256000] ata2.00: 12 bytes trailing
data
Mar 29 12:21:01 laptop kernel: [ 4295.256000] res
51/51:03:00:00:00/00:00:00:00:00/a0 Emask 0x3 (HSM violation)
Mar 29 12:21:01 laptop kernel: [ 4295.256000] ata2: soft resetting port
Mar 29 12:21:02 laptop kernel: [ 4295.568000] ata2: failed to recover
some devices, retrying in 5 secs
Mar 29 12:21:07 laptop kernel: [ 4300.572000] ata2: soft resetting port
Mar 29 12:21:07 laptop kernel: [ 4300.884000] ata2: failed to recover
some devices, retrying in 5 secs
Mar 29 12:21:12 laptop kernel: [ 4305.888000] ata2: soft resetting port
Mar 29 12:21:12 laptop kernel: [ 4306.200000] ata2.00: disabled
Mar 29 12:21:13 laptop kernel: [ 4306.704000] ata2: EH complete

I guess the device ata2 fails to recover is the CD drive, and that's
probably why it becomes inaccessible after this error.

I tried cdrskin cd burner too, and after the first scan the device becomes inaccessible again, and cdrskin reports random characters as device name.

This issue may be related with a similar bug report and comments here: http://bugzilla.kernel.org/show_bug.cgi?id=8244#c15

I believe the issue is related with the new libata, but what could be the reason for these errors? Is there any fix? What can I do? Can I at least reinitialize the inaccessbile CD drive without a reboot?

Thanks,

ProblemType: Bug
Architecture: i386
Date: Fri Mar 30 16:27:39 2007
DistroRelease: Ubuntu 7.04
Uname: Linux laptop 2.6.20-13-generic #2 SMP Sun Mar 25 00:21:25 UTC 2007 i686 GNU/Linux

Revision history for this message
Soner Tari (comixwall) wrote :

Thanks to Albert my problem is fixed, see http://bugzilla.kernel.org/show_bug.cgi?id=8244#c71

Revision history for this message
Soner Tari (comixwall) wrote :

It turns out that thanks to the new kernel I've compiled this problem seems to be fixed on the command line, but graphical tools still cause the same problem, such as CD Creator or K3b.

Thinking that probably Albert's patch works around my problem but perhaps does not really solve my problem, I will open a bug report at kernel.org.

Revision history for this message
Nanley Chery (nanoman) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Revision history for this message
Soner Tari (comixwall) wrote : Re: [Bug 99018] Re: ata2 errors with CDRW drive renders drive inaccessible

This issue had been fixed thanks to Albert and Tejun in June:
http://bugzilla.kernel.org/show_bug.cgi?id=8605#c26

And I see that Tejun's patch has been incorporated into the kernel in
Ubuntu 7.10 also, because I don't have any issues now.

Thanks,

On Sat, 2007-12-08 at 03:33 +0000, Nanley Chery wrote:
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. You reported this bug a while ago and there hasn't been
> any activity in it recently. We were wondering is this still an issue
> for you? Can you try with latest Ubuntu release? Thanks in advance.
>
> ** Changed in: ubuntu
> Assignee: (unassigned) => Nanley Chery (nanoman)
> Status: New => Incomplete
>

Revision history for this message
Nanley Chery (nanoman) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at [WWW] https://wiki.ubuntu.com/Bugs/Status . Thank you again for taking the time to report this bug and helping to make Ubuntu better. Feel free to submit any future bugs you may find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.