Bug 29495

Summary: System crash on mounting a CD
Product: Base System Reporter: Ernst Terhardt <terhardt>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-RELEASE   
Hardware: Any   
OS: Any   

Description Ernst Terhardt 2001-08-07 13:40:00 UTC
There are conditions for which FreeBSD crashes on invoking the command

	mount -t cd9660 /dev/acd0c /cdrom

This is what may happen:

	There appear error messages such as 

	acd0: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=00

	fatal trap 12

	page fault while in kernel mode

	... reboot ...

	and the FreeBSD system indeed crashes and reboots.

CONDITIONS

On my system (see above) the crash __consistently__ happens when the
mounted CD disk previously was burnt __without fixation__,  e.g., with
the command

	burncd -f /dev/acd0c data image.iso

where image.iso is an image file created with mkisofs. I have tested 
this several times with a CDRW disk.

The same type of crash occurred when I had put in a CDRW disk
that previously had been burnt __under Win98__ as an __audio__ disk. I have
previously reported on this problem, thinking that it was the disk
carrying an __audio__ record that caused the problem; but this does no
longer seem to be the whole truth (Mounting an intact commercial audio
disk does not seem to cause a system crash.) So the "audio case" of crash
is not consistently reproducible, as opposed to the "non-fixation case"
mentioned above.

Another case of cd-mounting system crash with restricted reproducibility
occurred when a CDRW disk previously merely had been blanked, using burncd.
This seems to happen only occasionally, depending on conditions
unkown to me.

RELATED OBSERVATIONS

1. Concerning 'burncd':

I have repeatedly tested burncd on my system by both
blanking, and writing data (iso 9660) on, a CDRW disk. This
essentially works, i.e., at the end the disk is in the desired state.
However, at the end of the burning process there consistently appears the
somewhat alarming message

	acd0: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=00

This message appears - with some delay - several times, and burncd does
not properly return to the command line prompt; a CR from the 
keyboard is required to get burncd returning to the shell command line.

2. Behavior under Win98 and Linux:

Can also boot Win98 and Linux 2.2.13 on the same hardware. No problems
with attempts to read/mount the non-fixated cdrom (i.e., no crash or
hanging). So a hardware problem appears unlikely.

How-To-Repeat: 
1. Write an iso9660 file system on a CDRW disk __without fixating__, e.g.,
		burncd -f /dev/acd0c data image.iso
   (omitting 'fixate' at the end).

2. Mount that disk, i.e.,
		mount -t cd9660 /dev/acd0c /cdrom
   !!! be prepared that the system may crash !!!
Comment 1 Peter Pentchev 2001-08-07 13:55:05 UTC
On Tue, Aug 07, 2001 at 02:43:40PM +0200, Ernst Terhardt wrote:
> 
> >Number:         29495
> >Category:       bin
> >Synopsis:       System crash on mounting a CD
> >Originator:     Ernst Terhardt
> >Release:        FreeBSD 4.3-RELEASE i386
> >Organization:
> >Environment:
> System: FreeBSD pluto.etemer.de 4.3-RELEASE FreeBSD 4.3-RELEASE #8: Mon Aug 6 15:56:32 CEST 2001 root@pluto.etemer.de:/usr/src/sys/compile/KPLUTO i386
> 
> Kernel actually used in tests: GENERIC
[snip hardware list]
> >Description:
> 
> There are conditions for which FreeBSD crashes on invoking the command
> 
> 	mount -t cd9660 /dev/acd0c /cdrom
[snip]
> 
> CONDITIONS
> 
> On my system (see above) the crash __consistently__ happens when the
> mounted CD disk previously was burnt __without fixation__,  e.g., with
> the command
> 
> 	burncd -f /dev/acd0c data image.iso
> 
> where image.iso is an image file created with mkisofs. I have tested 
> this several times with a CDRW disk.

Thanks for the detailed analysis!

Hmm.. ISTR this problem coming up before, and I think it is believed
to be fixed in 4.3-STABLE after 4.3-RELEASE.  Can you try updating
your system as described in http://www.FreeBSD.org/handbook/synching.html
and http://www.FreeBSD.org/handbook/makeworld.html, and see if the problem
persists?

When updating your system to -stable, make sure you read and follow
the Handbook instructions on reading the src/UPDATING file, and
follow the src/UPDATING instructions on buildworld/buildkernel,
mergemaster and installkernel/installworld - this will save both
you and us many problems and much time spent tracking down other
problems before we get to the gist :)

G'luck,
Peter

-- 
If I were you, who would be reading this sentence?
Comment 2 ashp freebsd_committer freebsd_triage 2002-01-15 17:53:32 UTC
State Changed
From-To: open->closed

Problem was reported solved, and there's been no feedback since.