Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2000 22:17:03 -0700 (PDT)
From:      beaupran@iro.umontreal.ca
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/21438: Sox recording in 16 bits creates a panic: no feed
Message-ID:  <20000921051703.B032D37B422@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         21438
>Category:       kern
>Synopsis:       Sox recording in 16 bits creates a panic: no feed
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 20 22:20:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Antoine Beaupre
>Release:        FreeBSD 4.1-RELEASE
>Organization:
Nada
>Environment:
FreeBSD shall.anarcat.yi.org 4.1-RELEASE FreeBSD 4.1-RELEASE #33: Wed Sep 20 21:33:35 EDT 2000     root@shall.anarcat.yi.org:/usr/src/sys/compile/SHALL  i386

Current kernel config:

########################################################################
#
# S H A L L
#


########################################################################
# CPU & kernel options

ident		SHALL
maxusers	32

machine		i386

cpu		I586_CPU		#Pentium MMX
options		CPU_FASTER_5X86_FPU	#Faster FPU exception handler

# FPU onboard, do not need this
#options 	MATH_EMULATE		#Support for x87 emulation

#####################################################################
# DEBUGGING OPTIONS

options         DDB	# Enable the kernel debugger.

#options         DDB_UNATTENDED # It's important to put this back on

makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols

########################################################################
# Compatibility options

options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]

options 	SYSVSHM			#SYSV-style shared memory
options 	SYSVMSG			#SYSV-style message queues
options 	SYSVSEM			#SYSV-style semaphores

########################################################################
# Networking options
options 	INET			#InterNETworking
#options 	INET6			#IPv6 communications protocols
options		ICMP_BANDLIM		#Rate limit bad replies

# Pseudo devices - the number indicates how many units to allocated.
pseudo-device	loop		# Network loopback
pseudo-device	ether		# Ethernet support
#pseudo-device	sl	1	# Kernel SLIP
#pseudo-device	ppp	1	# Kernel PPP
pseudo-device	tun		# Packet tunnel.
#pseudo-device	gif	4	# IPv6 and IPv4 tunneling
#pseudo-device	faith	1	# IPv6-to-IPv4 relaying (translation)

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device	bpf		#Berkeley packet filter

########################################################################
# Filesystem options
options 	FFS			#Berkeley Fast Filesystem
options 	FFS_ROOT		#FFS usable as root device [keep this!]
options 	SOFTUPDATES		#Enable FFS soft updates support
#options 	MFS			#Memory Filesystem
#options 	MD_ROOT			#MD is a potential root device
options 	MSDOSFS			#MSDOS Filesystem
options 	CD9660			#ISO 9660 Filesystem
options 	CD9660_ROOT		#CD-ROM usable as root, CD9660 required
options 	PROCFS			#Process filesystem
options		QUOTA			#Enable disk quotas

#options 	NFS			#Network Filesystem
#options 	NFS_ROOT		#NFS usable as root device, NFS required
#options	NFS_NOSERVER		#Disable the NFS server code

########################################################################
# POSIX P1003.1B
options 	P1003_1B		#Posix P1003_1B real-time extensions
options 	_KPOSIX_PRIORITY_SCHEDULING

########################################################################
# SCSI device configuration
options 	SCSI_DELAY=2000		#Delay (in ms) before probing SCSI

# SCSI Controllers
device		ahc		# AHA2940 and onboard AIC7xxx devices

# SCSI peripherals
device		scbus		# SCSI bus (required)
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct SCSI access)
device		pt		#Scanner

########################################################################
# Miscellaneous devices and options

pseudo-device	pty		# Pseudo-ttys (telnet etc)
pseudo-device	md		# Memory "disks"

options 	UCONSOLE		#Allow users to grab the console
options 	USERCONFIG		#boot -c editor
options 	VISUAL_USERCONFIG	#visual boot -c editor
options 	KTRACE			#ktrace(1) support

########################################################################
# Hardware device configuration
device		isa
device		eisa
device		pci

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc0	at isa? port IO_KBD
device		atkbd0	at atkbdc? irq 1 flags 0x1

device 		psm0	at atkbdc? irq 12
device		vga0	at isa?

options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? flags 0x100

# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
#device		vt0	at isa?
#options 	XSERVER			# support for X server on a vt console
#options 	FAT_CURSOR		# start with block cursor
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
#options 	PCVT_SCANSET=2		# IBM keyboards are non-std

# splash screen/screen saver
pseudo-device	splash

# Floating point support - do not disable.
device		npx0	at nexus? port IO_NPX irq 13

# ATA and ATAPI devices
device		ata0	at isa? port IO_WD1 irq 14
device		ata1	at isa? port IO_WD2 irq 15
device		ata
device		atadisk			# ATA disk drives
device		atapicd			# ATAPI CDROM drives
device		atapifd			# ATAPI floppy drives
#device		atapist			# ATAPI tape drives
options 	ATA_STATIC_ID		#Static device numbering
options 	ATA_ENABLE_ATAPI_DMA	#Enable DMA on ATAPI devices

# Floppy drives
device		fdc0	at isa? port IO_FD1 irq 6 drq 2
device		fd0	at fdc0 drive 0
#device		fd1	at fdc0 drive 1

# Power management support (see LINT for more options)
device		apm0    at nexus? disable flags 0x20 # Advanced Power Management

# Serial (COM) ports
device		sio0	at isa? port IO_COM1 flags 0x10 irq 4
device		sio1	at isa? port IO_COM2 irq 5
#device		sio2	at isa? port IO_COM3 irq 5
#device		sio3	at isa? disable port IO_COM4 irq 9

# Parallel port
device		ppc0	at isa? irq 7
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer
device		plip		# TCP/IP over parallel
device		ppi		# Parallel port interface device
#device		vpo		# Requires scbus and da

#controller		pnp0	# Why has this disappeared in 4.x?

# ISA el'cheapo NIC 
#ep0: <3Com 3C509-TPO EtherLink III> at port 0x200-0x20f irq 5 on isa0
#ep0: Ethernet address 00:10:5a:aa:51:33
device		ep

########################################################################
# Sound devices

device pcm
device sbc # at isa? port 0x220 irq 10 drq 1 flags 0x15
#device snd0
#device sb0	at isa? port 0x220 irq 9	drq 3
#device sbxvi0	at isa? 			drq 7
#device sbmidi0	at isa? port 0x300
#device awe0	at isa? port 0x620
device speaker
device pca0	at isa? port IO_TIMER1
device joy0	at isa? port IO_GAME	#this conflicts with NIC

########################################################################
# USB Support
device uhci
#device ohci
device usb		#USB bus
#device ugen		#Generic

>Description:
Recording a wave file in hi-fi (16 bits) with sox makes FreeBSD 4.1 panic.

shall# gdb -k /sys/compile/SHALL/kernel.debug 
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...core
(kgdb) core-file /usr/crash/vmcore.10048 
IdlePTD 3313664
initial pcb at 2a9480
panicstr: from debugger
panic messages:
---
panic: no feed


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x833d6628
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc01cebc0
stack pointer           = 0x10:0xc3dc9b9c
frame pointer           = 0x10:0xc3dc9bc8
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 246 (sox)
interrupt mask          = tty 
tot = 51732 (active = 108, free = 51624 (reserved = 46224, slush = 5400))


panic: from debugger
panic: from debugger
Uptime: 6m27s

dumping to dev #da/0x20001, offset 36864
dump 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 
---
#0  boot (howto=260) at ../../kern/kern_shutdown.c:302
302                     dumppcb.pcb_cr3 = rcr3();
#0  boot (howto=260) at ../../kern/kern_shutdown.c:302
#1  0xc0159a11 in panic (fmt=0xc0236a54 "from debugger")
    at ../../kern/kern_shutdown.c:552
#2  0xc012ffb1 in db_panic (addr=-1071579165, have_addr=0, count=-1, 
    modif=0xc3dc9bf8 "") at ../../ddb/db_command.c:433
#3  0xc012ff51 in db_command (last_cmdp=0xc0266e1c, cmd_table=0xc0266c7c, 
    aux_cmd_tablep=0xc02a5818) at ../../ddb/db_command.c:333
#4  0xc0130016 in db_command_loop () at ../../ddb/db_command.c:455
#5  0xc0132123 in db_trap (type=10, code=0) at ../../ddb/db_trap.c:71
#6  0xc020fd7e in kdb_trap (type=10, code=0, regs=0xc3dc9d00)
    at ../../i386/i386/db_interface.c:158
#7  0xc021bf28 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, tf_edi = 2, 
      tf_esi = 256, tf_ebp = -1008951992, tf_isp = -1008952020, 
      tf_ebx = -1071310752, tf_edx = 0, tf_ecx = 6489242, tf_eax = 18, 
      tf_trapno = 10, tf_err = 0, tf_eip = -1071579165, tf_cs = 8, 
      tf_eflags = 838, tf_esp = -1071277089, tf_ss = -1071394717})
    at ../../i386/i386/trap.c:552
#8  0xc020ffe3 in Debugger (msg=0xc023d063 "panic")
    at ../../i386/i386/db_interface.c:319
#9  0xc0159a08 in panic (fmt=0xc0251860 "no feed")
    at ../../kern/kern_shutdown.c:550
#10 0xc01edb23 in chn_rdfeed2nd ()
#11 0xc01edc83 in chn_read ()
#12 0xc01eeb84 in dsp_read ()
#13 0xc01f0b55 in sndread ()
#14 0xc0190333 in spec_read ()
#15 0xc01c52fc in ufsspec_read ()
#16 0xc01c5849 in ufs_vnoperatespec ()
#17 0xc018aac8 in vn_read ()
#18 0xc0166a49 in dofileread ()
#19 0xc016693f in read ()
#20 0xc021c869 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, 
      tf_edi = 1965, tf_esi = 672307616, tf_ebp = -1077937540, 
      tf_isp = -1008951340, tf_ebx = 672240036, tf_edx = 672307704, 
      tf_ecx = 0, tf_eax = 3, tf_trapno = 12, tf_err = 2, tf_eip = 672199776, 
      tf_cs = 31, tf_eflags = 663, tf_esp = -1077937584, tf_ss = 47})
    at ../../i386/i386/trap.c:1126
#21 0xc02106c5 in Xint0x80_syscall ()
#22 0x280fd47e in ?? ()
#23 0x280dec0d in ?? ()
#24 0x8051f01 in ?? ()
#25 0x8052151 in ?? ()
#26 0x8049bbd in ?? ()
#27 0x80493d7 in ?? ()
#28 0x8048f61 in ?? ()

Obviously, this is not enough. :) The upper frames from #8 are in the
inline debugger. I thought I could use it, but somehow, I really don't 
know how this thing (DDB) works.

However, using the advice from the FAQ:

bash-2.04$ nm /kernel  | grep c01ceb 
c01ceb20 t vm_object_check
c01ceb84 t vm_object_print_static
bash-2.04$

Doesn't get us anywhere closer. I think the thing to look for is
"syscall2". I don't know how to decode the arg, though. I leave this
to you from here on.

>How-To-Repeat:
rec -w test.wav
panic: no feedYeah.

A personal program I wrote doesn't have this behavior. wavrec (from
the wavplay-1.4 package) either. However, it can't record anything
else than garbage. Same for my personal program.


>Fix:
Unknown

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000921051703.B032D37B422>