Bug 27745

Summary: burncd denies access to other CD drives
Product: Base System Reporter: kar_alerts <kar_alerts>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   

Description kar_alerts 2001-05-29 17:40:01 UTC
I have a CD-RW and a CD reader in my server. While burning CDs (in CDRW) using burncd program I was unable to access the CD in the CD reader. 

The kernel displayed this message:
** -- messages - start 
vm_fault: page read error, pid 3237 (cp)
...
sio0: 538 more interrupt-level buffer overflows (total 538)
... (please refer to the dmesg output for additional messages)
** -- messages - end 

I faced this problem when I started "burncd" while copying files from CD in the CD reader. The "cp" process (that was running) freezed and I was unable use ctrl+c to cancel (^C just printed). But when the burncd completed, the "cp" process resumed copying files.

During the "cp" freeze, the system was OK and I faced no lock-ups. Other processes were fine. In fact, I was running X and was fine. (I successfully reproduced the problem without X)

Here is my dmesg:

*-- dmesg start --*
...
FreeBSD 4.3-STABLE #0: Tue May 29 11:53:02 GMT 2001
    root@svr.mgsb.domain:/usr/src/sys/compile/SVRFW
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (548.74-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x673  Stepping = 3
  Features=0x387f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,PN,MMX,FXSR,SSE>
real memory  = 536870912 (524288K bytes)
avail memory = 517431296 (505304K bytes)
Preloaded elf kernel "kernel" at 0xc0462000.
Pentium Pro MTRR support enabled
....
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
...
ad0: 19531MB <Maxtor 92048D8> [39683/16/63] at ata0-master UDMA33
ad1: 38172MB <QUANTUM FIREBALLP AS40.0> [77557/16/63] at ata0-slave UDMA33
acd0: DVD-ROM <TOSHIBA DVD-ROM SD-M1212> at ata1-master using PIO4
acd1: CD-RW <CD-RW CRX100E> at ata1-slave using PIO4
Mounting root from ufs:/dev/ad0s1a
sigreturn: eflags = 0x13286
acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04
acd1: PREVENT_ALLOW - ILLEGAL REQUEST asc=64 ascq=00 error=04
..
acd1: READ_BIG - ILLEGAL REQUEST asc=c6 ascq=02 error=04
vm_fault: pager read error, pid 3229 (cp)
acd1: READ_BIG - ILLEGAL REQUEST asc=c6 ascq=02 error=04
vm_fault: pager read error, pid 3230 (cp)
acd1: READ_BIG - ILLEGAL REQUEST asc=c6 ascq=02 error=04
vm_fault: pager read error, pid 3237 (cp)
sio0: 538 more interrupt-level buffer overflows (total 538)
acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04
acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04
cd9660: RockRidge Extension
acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04
acd1: READ_TOC - ILLEGAL REQUEST asc=24 ascq=00 error=04

*-- dmesg- end --*

The message "vm_fault: pager read error, pid ... (cp)" can be seen in the dmesg output. Please ignore the repetitions as I was trying to reproduce the problem to make sure before filing the PR.

Please contact me for any other additional info.

Fix: 

don't know
How-To-Repeat: run burncd program when copying files from the other CD drive.
Comment 1 Søren Schmidt freebsd_committer freebsd_triage 2001-05-29 20:14:00 UTC
State Changed
From-To: open->closed

Your log shows that you are trying to read from *the burner* 
You cant read & write to a CDROM at the same time :)
Comment 2 kar_alerts 2001-05-30 12:59:45 UTC
There was some misunderstanding here (sorry for creating any confusion, 
anyway). Actually the message "READ_TOC - ILLEGAL REQUEST" usually appears 
after blanking (the command is "burncd -f /dev/acd1c blank") is complete.

The /dev/acd0c (CD-reader) can be  mounted on /cdrom and CD-writer can be 
mounted on /cdrom1 (all created by sysinstall).  I am not trying read the CD 
in the "burner" during blanking/burning process. I cannot even mount the 
/cdrom1 (cd-burner) when burncd is running which means I am not trying to 
read from the burner.

When I give "mount /cdrom1" when burncd is running, i get

---
cd9660: /dev/acd1c: Device busy
---


Here is the sequence of the commands.

(ttyv0)
# cd /disk2/tmp
# mount /cdrom
# cp -Rv /disk2/tmp/* .
(I can see the filenames being copied)

(switching to ttyv1)
# cd /disk2/tmp2
# mount
/dev/ad0s1a on / (ufs, local)
/dev/ad0s1f on /usr (ufs, local, soft-updates)
procfs on /proc (procfs, local)
/dev/ad1s1e on /disk2 (ufs, local, soft-updates)
/dev/acd0c on /cdrom (cd9660, local, read-only)
# burncd -f /dev/acd1c -s 4 data cd.iso fixate

(when burncd starts, in ttyv0 the filenames being displayed, stops, the 
light in the CD-reader (/dev/acd0c) stops glowing. But when burncd finishes 
then the "cp" process resumes and the CD-reader lights starts glowing)

Hope this helps.