Bug 130576 - 2.6.8-1.521 kernel breaks cdrecord
2.6.8-1.521 kernel breaks cdrecord
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
:
: 130414 130577 130864 131014 131031 131085 131692 131789 133367 136066 136851 136968 (view as bug list)
Depends On:
Blocks: FC3Target FC4Target
  Show dependency treegraph
 
Reported: 2004-08-21 23:27 EDT by Andre Robatino
Modified: 2015-01-04 17:09 EST (History)
26 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-28 03:33:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
this patch fixes the issue witch cdrecord but not with k3b (1.73 KB, patch)
2004-08-27 04:48 EDT, drago01
no flags Details | Diff
cdrecord -v -dummy -audio MY_WAV_FILES 2>&1 > cdr.log (13.19 KB, text/plain)
2004-09-29 22:47 EDT, Ed Levitch
no flags Details

  None (edit)
Description Andre Robatino 2004-08-21 23:27:59 EDT
Description of problem:
  The following command fails to write the home.iso file to a CD-RW. 
The same command works with the 2.6.7 kernel on the same hardware.

cdrecord -v blank=fast dev=/dev/cdrom home.iso

  The last two lines of output are:

cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.

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

How reproducible:
always

Steps to Reproduce:
1.  Use the above command to attempt writing an ISO file to a CD-RW
while running the 2.6.8-1.521 kernel.
  
Actual results:
  Error message claiming that drive doesn't support TAO recording.

Expected results:
  Should write ISO file.

Additional info:

[andre@localhost tmp]$ cdrecord -v blank=fast dev=/dev/cdrom home.iso
cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive
dependent defaults.
cdrecord: Continuing in 5 seconds...
Cdrecord-Clone 2.01a27-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004
Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to
<warly@mandrakesoft.com>.
Note: The author of cdrecord should not be bothered with problems in
this version.
TOC Type: 1 = CD-ROM
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version
(schily - Red Hat-scsi-linux-sg.c-1.80-RH '@(#)scsi-linux-sg.c       
1.80 04/03/08 Copyright 1997 J. Schilling').
SCSI buffer size: 64512
atapi: 1
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : '_NEC    '
Identifikation : 'DVD_RW ND-2510A '
Revision       : '2.05'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes:
FIFO size      : 4194304 = 4096 KB
cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.
[andre@localhost tmp]$
Comment 1 Adam Bowns 2004-08-22 19:16:40 EDT
I can confirm this, as I have had the same problem since upgrading to
kernel-2.6.8-1.521

Before the upgrade I could record disks in SAO / DAO mode without a
problem, but now I get the error message

“cdrecord: Drive does not support SAO recording.”
“cdrecord: Illegal write mode for this drive.”

I have a scsi YAMAHA CRW2100S writer connected to an Adaptec 19160
controller (AIC7XXX). I can still read disks in the drive, it's just
writing them that is giving me problems.
Comment 2 Adam Bowns 2004-08-22 19:29:27 EDT
I think bugs 130577 and 130414 are duplicates of this bug... or vice
versa :-)

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130577

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130414
Comment 3 Andre Robatino 2004-08-22 19:35:27 EDT
  Well, since k3b and xcdroast just invoke cdrecord, I thought the
cleanest way to show the underlying bug was by calling cdrecord directly.
Comment 4 Adam Bowns 2004-08-22 21:01:13 EDT
I wasn't being critical of you, I was just listing all the bugs in one
place so whoever fixes it can resolve the problem for them as well.

While I'm at it, here is another thread on the matter

http://lkml.org/lkml/2004/8/15/189

sounds like our problem. I tried executing cdrecord as root and I can
confirm that it does work as it should, the problem is only when
cdrecord is executed as a normal user.
Comment 5 Andre Robatino 2004-08-22 21:22:44 EDT
  Sorry for the misunderstanding, I didn't think you were being
critical.  I can verify the behavior with the -checkdrive option,
which is interesting since I set the setuid bit on my cdrecord
executable.  Apparently the real UID has to be root as well.
  P.S. I forgot about growisofs.  I suppose 130576 and 130577 could be
considered "primary", and 130414 could be considered a dupe of both of
these jointly (is that possible?).  But the next kernel update should
fix all of them at once, so it probably doesn't matter.
Comment 6 Bastien Nocera 2004-08-25 06:44:00 EDT
*** Bug 130577 has been marked as a duplicate of this bug. ***
Comment 7 Bastien Nocera 2004-08-25 06:45:28 EDT
*** Bug 130414 has been marked as a duplicate of this bug. ***
Comment 8 drago01 2004-08-25 07:51:45 EDT
this seems still not fixed in 2.6.9-rc1
Comment 9 Adam Bowns 2004-08-25 15:52:14 EDT
From what I've gathered on the subject I think the problem is due to
new security features in 2.6.8.1 which have tightened up the command
filtering in order to stop some potential security risks such as any
user being able to overwrite your cd-r's firmware.

For more information on the matter there is a thread on the lkml at

http://lkml.org/lkml/2004/8/15/159

Also, if you havn't read what I wrote in bug 130414 here it is again
because its important.

Don't try to record audio cd's as root with this kernel because there
is a memory leak that will eventually crash your system.

If you need to burn audio cd's you need the following patches.

http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.8.1/2.6.8.1-mm3/broken-out/bio_uncopy_user-mem-leak.patch

http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.8.1/2.6.8.1-mm3/broken-out/bio_uncopy_user-mem-leak-fix.patch

There is more info on this at the lkml at

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&th=dbce4a618e91ea4&seekm=2vbef-2oe-11%40gated-at.bofh.it#link10

I can confirm that these patches fix the mem leak and the audio cd's
produced are not corrupt.
Comment 10 drago01 2004-08-27 04:48:03 EDT
Created attachment 103156 [details]
this patch fixes the issue witch cdrecord but not with k3b

This patch fixes cdrecord so it can burn with 2.6.8.1 as normal user.
by default cdrecord drops it root privilleges befor burning this patch lets
cdrecord don't do this.It keeps its root privilleges.
Comment 11 David Juran 2004-08-28 04:44:42 EDT
Could it be this problem that hits cdrdao as well? When trying to run
cdrdao-1.1.9-2 (from rawhide) I'm getting the error message
ERROR: Cannot prevent/allow medium removal.
and then it just exits.
Comment 12 Harald Hoyer 2004-08-30 04:16:35 EDT
*** Bug 130864 has been marked as a duplicate of this bug. ***
Comment 13 Harald Hoyer 2004-08-30 04:16:47 EDT
*** Bug 131085 has been marked as a duplicate of this bug. ***
Comment 14 Harald Hoyer 2004-08-30 04:19:28 EDT
*** Bug 131014 has been marked as a duplicate of this bug. ***
Comment 15 Boris Glawe 2004-08-31 05:58:46 EDT
I can confirm the problem with the memory leak and the system crash,
when trying to burn an audio CD. The crash is always reproducible.
With my -521 Kernel on FC2 only root can convince cdrecord to do
anything at all. 
Comment 16 drago01 2004-08-31 06:20:01 EDT
The memory leak should be fixed in 2.6.8-1.533, because its based on
2.6.9-rc1-bk4.
Comment 17 Ralf Ertzinger 2004-08-31 14:46:27 EDT
This seems partially fixed in kernel 2.6.8-1.533.
I can use cdrecord as a normal user on my IDE-DVD-writer again. Did
not try growisofs, though.

k3b still claims that the drive does not support any writing modes,
and my SCSI-writer is still listed as a reader.
Comment 18 drago01 2004-09-01 01:55:00 EDT
I tested this kernel (2.6.8-1.533) witb a modifized k3b version.
i changed this :
------------------
int K3bCdDevice::openDevice( const char* name )
{
  int fd = -1;
#ifdef HAVE_RESMGR
  // first try resmgr
  fd = ::rsm_open_device( name, O_RDONLY | O_NONBLOCK );
  kdDebug() << "(K3bCdDevice) resmgr open: " << fd << endl;
#endif

  if( fd < 0 )
    fd = ::open( name, O_RDONLY | O_NONBLOCK );

  if( fd < 0 )
    fd = -1;

  return fd;
}
-------------
to
--------------
int K3bCdDevice::openDevice( const char* name )
{
  int fd = -1;
#ifdef HAVE_RESMGR
  // first try resmgr
  fd = ::rsm_open_device( name, O_RDWR | O_NONBLOCK );
  kdDebug() << "(K3bCdDevice) resmgr open: " << fd << endl;
#endif

  if( fd < 0 )
    fd = ::open( name, O_RDWR | O_NONBLOCK );

  if( fd < 0 )
    fd = -1;

  return fd;
}
--------------
recompiled and it worked!
Comment 19 drago01 2004-09-01 04:33:48 EDT
i forgot to say that the file was src/device/k3bdevice.cpp
Comment 20 David Juran 2004-09-05 12:55:38 EDT
With kernel-smp-2.6.8-1.541 using cdrdao, I get lots of lines like
ERROR: Read buffer capacity failed.
printed by cdrdao, but it seems like the CD burned works after all...
Comment 21 Hardy Mayer 2004-09-08 17:08:09 EDT
I have had similar problems with both the 2.6.8-1.541 kernel, and a 
compiled 2.6.8.1 kernel. 
However, if you load the ide-scsi module and run the dvd+rw (in my
case) via scsi emulation, things work again, but at about 1/10-th of
the speed. 

In my case the proble was not the inability to write, but the eventual
"out-of-memory" crash of the kernel when writing about 1/2 of a CD in 
ATAPI mode. 

I reverted to kernel 2.6.7 and things work fine. 
It is definitely a bug in the kernel and not in cdrecord, xcdroast, etc. 

I also had memory-leaks in Mozilla inder 2.6.8, (and not under 2.6.7). 
Comment 22 David Juran 2004-09-11 10:01:45 EDT
With kernel kernel-smp-2.6.8-1.541, growisofs (from
dvd+rw-tools-5.17.4.8.6-2) dies with the error message
:-( unable to PREVENT MEDIA REMOVAL: Operation not permitted
Comment 23 Ed Levitch 2004-09-29 22:47:45 EDT
Created attachment 104561 [details]
cdrecord -v -dummy -audio MY_WAV_FILES 2>&1 > cdr.log

cdrecord output
Comment 24 Ed Levitch 2004-09-29 23:00:59 EDT
Forgot to include in my comment #23
"cdrecord -v -dummy -audio MY_WAV_FILES 2>&1 > cdr.log" 
...
Running on FC2 Kernel 2.6.8-1.521
Always, after trying to write track 04, nothing but OOMs for me.
Comment 25 Adam Bowns 2004-09-30 04:08:21 EDT
Read Comment #9 and patch your kernel with the patches linked to...
this will fix the memory leak.
Comment 26 Ville Skyttä 2004-09-30 12:05:28 EDT
FYI: Harald's cdrecord, k3b-0.11.14-0.FC2.1 and friends updates for
FC2 as of today do _not_ fix this problem here (only k3b tested).

FWIW, I have a LG GSA-4120B (DVD{-RW,+RW,-RAM},CDRW).  And everything
seems to work when run as root; non-root remains borked.

Potential duplicates: bug 131031, bug 131692, bug 131789, bug 133367.
Comment 27 Harald Hoyer 2004-09-30 12:10:12 EDT
hmm, does FC3 .541 have anything different?
Comment 28 Ville Skyttä 2004-09-30 12:20:02 EDT
I cannot do a full FC3testX upgrade at the moment, but will see if I
can get FC2 to run the FC3 kernel if you think it's doable and worth
checking.
Comment 29 Harald Hoyer 2004-09-30 12:24:47 EDT
should do no harm... just ignore eventual mkinitrd deps when
installing the new kernel
Comment 30 Ville Skyttä 2004-09-30 13:35:32 EDT
Ok, results: does not work with 2.6.8-1.521, works with 2.6.8-1.541
and 2.6.8-1.590.

My simple test case was to run k3b, check the devices info from its
config UI for sanity, and try to erase a CDRW.

Correct device info from k3b (got this with .541 and .590):
- Writes CDs, CD/RWs, Reads DVDs, Writes DVD-R(W)s, DVD+R(W)s: all yes
Incorrect info from .521:
- Writes CDs and Writes DVD+R(W)s: no, others yes

When not working, k3b's "Tools->CD->Erase CD-RW" has an empty Burning
Device drop-down box.

Let me know if you need more info.

BTW, probably an upstream k3b bug, but being curious, clicking "Start"
in that dialog without burning devices anyway starts *something* and
displays a "Erasing CD-RW" dialog, but it certainly isn't erasing the
media nor seemingly touching the drive at all (and the dialog can't be
dismissed).
Comment 31 drago01 2004-09-30 14:47:46 EDT
The k3b fix only works with kernel 2.6.9x not with 2.6.8.
Because .540 and .590 are based on 2.6.9x it works. .521 is based on
2.6.8.
This means we also need an updated kernel.
Comment 32 Harald Hoyer 2004-10-01 04:11:59 EDT
*** Bug 131031 has been marked as a duplicate of this bug. ***
Comment 33 Harald Hoyer 2004-10-01 04:12:19 EDT
*** Bug 131692 has been marked as a duplicate of this bug. ***
Comment 34 Harald Hoyer 2004-10-01 04:12:31 EDT
*** Bug 131789 has been marked as a duplicate of this bug. ***
Comment 35 Harald Hoyer 2004-10-01 04:12:46 EDT
*** Bug 133367 has been marked as a duplicate of this bug. ***
Comment 36 David Juran 2004-10-02 07:17:53 EDT
Just out of curiosity, where do you find the .590 kernel? At
ftp://download.fedora.redhat.com:/pub/fedora/linux/core/development/SRPMS
all I can see is the .541 kernel.
Comment 37 Ville Skyttä 2004-10-02 13:30:40 EDT
No longer there either, but I got it from
http://www.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/core/development/i386/Fedora/RPMS/
Comment 38 David Juran 2004-10-03 07:35:45 EDT
Wonder why it was pulled...
Anyway, this discussion is trailing away and with the latest errata
releases of cdrtools, xcdroast, dvd+rw-tools, k3b and cdrdao I believe
the problem is fixed so maybe we should close this kernel bug.
Comment 39 Carlos Rodrigues 2004-10-03 09:52:34 EDT
The problem isn't fixed by the errata of cdrtools et al, it needs a
kernel update to work.
Comment 40 Emmanuel Druon 2004-10-04 16:08:19 EDT
There also seems to be a problem with the new k3b (and al) and kernel
2.6.8-1.521 when doing multi-session CDs. The burning process appears
to work but the CD is not usable. I'll try to confirm it tomorrow with
the original version of k3b from FC2 (which seemed to work as far as I
remember). Could anyone confirm the problem ? And if so, does anyone
know if kernel 2.6.8-1.541 solves this problem because I can't find
.590 version either ?
Comment 41 Emmanuel Druon 2004-10-05 07:55:45 EDT
I've checked my previous post by applying selective updates to a
scratch Fedora Core 2 distrib.
I've upgraded to mkisofs-2.01.1-0.FC2.1, everything still worked.
Then I tried to upgrade to cdrecord-2.01.1-0.FC2.1 and multi-session
is now broken : with k3b (ran as root), if you create a single session
CD with joliet extensions, it works ; if you try a multi-session CD
with joliet extensions, you can't use the resulting CD (you have an
"attempt to access beyond end of device" errors)
Updating to k3b-0.11.14-0.FC2.1 doesn't improve or change anything
except for the error messages where you can read things like "hdc:
media error (bad sector) : status=0x51 { DriveReady SeekComplete Error
}". Single session CDs still work.
Comment 42 Ralf Ertzinger 2004-10-05 08:22:58 EDT
I've filed Bug 134642 about this.
Comment 43 john bray 2004-10-09 20:56:52 EDT
I am completely unable to burn audio cds with the new version.  After
about 500 mb burned, it hangs up.  The cd burner light flashes
normally as in burning, while the hd led appears to stay on
continuously.  System response goes to zero.  The only recovery I've
been able to do is to punch out the system manually with the reset
button.  Not a good experience.  I did manage to write one data cd,
which paused similarly, but eventually recovered.
Comment 44 Mark Smulders 2004-10-20 07:12:42 EDT
After upgrading to 2.6.9 burning as a normal user functions properly
again.
'bug' solved?
Comment 45 drago01 2004-10-20 09:57:29 EDT
no we still need a kernel update for fc2
Comment 46 Harald Hoyer 2004-10-25 05:01:36 EDT
*** Bug 136851 has been marked as a duplicate of this bug. ***
Comment 47 Harald Hoyer 2004-10-25 05:18:06 EDT
*** Bug 136968 has been marked as a duplicate of this bug. ***
Comment 48 Harald Hoyer 2004-11-08 05:45:01 EST
*** Bug 136066 has been marked as a duplicate of this bug. ***
Comment 49 Denice 2004-11-19 14:16:52 EST
k3b now works for me with the 2.6.9 kernel released for FC 2 this
week.  I'm using the test 2.6.9-1.6_FC2 kernel from yesterday that
will, presumably, be released very soon (since it fixes a new SATA
bug). I have not tested multi-session cds, just cd and dvd writing.  I
have these versions of s/w:

$ rpm -q cdrecord mkisofs k3b
cdrecord-2.01.1-0.FC2.1
mkisofs-2.01.1-0.FC2.1
k3b-0.11.14-0.FC2.2
Comment 50 Jeremy Sanders 2004-11-24 06:55:21 EST
This problem is still occuring to me with kernel-2.6.9-1.6_FC2.
cdrecord is installed as chmod +s.

Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004
Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to
http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in
this version.
TOC Type: 1 = CD-ROM
scsidev: 'ATA:1,0,0'
devname: 'ATA'
scsibus: 1 target: 0 lun: 0
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version
(schily - Red Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c       
1.83 04/05/20 Copyright 1997 J. Schilling').
SCSI buffer size: 64512
cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.

xpc19:~> rpm -q cdrecord
cdrecord-2.01.1-0.FC2.1
xpc19:~> uname -a
Linux xpc19.ast.cam.ac.uk 2.6.9-1.6_FC2 #1 Thu Nov 18 22:03:19 EST
2004 i686 i686 i386 GNU/Linux
Comment 51 Dave Jones 2004-11-27 15:26:19 EST
mass update for old bugs:

Is this still a problem with the 2.6.9 based update kernel ?
Comment 52 drago01 2004-11-28 01:47:34 EST
I can burn without any problems as normal user....
2.6.9-1.681_FC3 and cdrecord-2.01.1-5
Comment 53 Ville Skyttä 2004-11-28 05:06:07 EST
Comment 52 mentions a FC3 kernel which, according to earlier comments
also, seems to not have this problem.  However, comment 50 mentions
things still being broken with the latest 2.6.9-based FC2 update
kernel.  I don't have FC2 any more so I can't test/verify (and will
remove myself from Cc), but it looks to me like this bug should be
reopened.
Comment 54 František Dvořák 2004-11-28 08:31:51 EST
On k3b.org is this in the news section:

"Cdrecord won't run anymore when configured suid root. The reason is that the
new kernel forbids suid root programs to use the SCSI subsystem (or something
like that, correct me if I am wrong :)
So Cdrecord needs to be configured without suid root and the next version of
K3bSetup will do that.
Cdrdao does not have this problem. I think that's becasue it drops the root
privileges in an earlier stage but I am not sure about that."

I have cdrecord without setuid root and it seems it works nice under normal user
(kernel 2.6.9-1.6_FC2, cdrecord 2.01.1-0.FC2.1).
Comment 55 Francois-Xavier 'FiX' KOWALSKI 2004-11-28 17:01:45 EST
I still have the problem with latest kernel update

# rpm -q cdrecord mkisofs kernel-smp
cdrecord-2.01.1-0.FC2.1
mkisofs-2.01.1-0.FC2.1
kernel-smp-2.6.9-1.6_FC2

the problem occurs with & without SUID on cdrecord.  I run cdrecord
from nautilus-cd-burner:


cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.
SCSI buffer size: 64512
cdrecord: Warning: using inofficial libscg transport code version
(schily - Red Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c    1.83
04/05/20 Copyright 1997 J. Schilling').
Linux sg driver version: 3.5.31
scsibus: 1 target: 0 lun: 0
scsidev: '1,0,0'
cdrecord: Continuing in 5 seconds...
cdrecord: Future versions of cdrecord may have different drive
dependent defaults.
cdrecord: Asuming -tao mode.
cdrecord: No write mode specified. 
Comment 56 Francois-Xavier 'FiX' KOWALSKI 2004-11-29 17:15:49 EST
Having fetched a 2.6.7-based kernel (the Stanford CCRMA one), I
confirm that the problem does not appear with 2.6.7.

Any bug-fix that may have come affecting the IDE layer in latest 2.6.9
is of no help for me, as I am using an USB CD Writer.

Can I hope in any way have some fix on FC2?  Looking at the mail
thread, I don't see why FC3 would be unaffected, so...

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