Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2001 18:11:26 +0900
From:      Mamoru Iwaki <iwaki@bc.niigata-u.ac.jp>
To:        freebsd-stable@FreeBSD.ORG
Subject:   sound driver kills kernel silently
Message-ID:  <20010224091128.3809.qmail@pikachu.bsp.bc.niigata-u.ac.jp>

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

My FreeBSD 4.2-STABLE box suddenly and silently downs and reboots
when the following sound program runs.  

This simple program opens /dev/dsp with two file descriptors, one
for read and the other for write, then simply copy data from
read-device to write-one.  This program was running this December
without such panics.  

Someone else have a similar experiance?
Anybody knows how to solve it?

Thanks.

[ENVIRONMENT]
% uname -a
FreeBSD mi000.merlin.gs.niigata-u.ac.jp 4.2-STABLE FreeBSD 4.2-STABLE #0: Sat Feb 24 09:08:31 JST 2001     root@mi000.merlin.gs.niigata-u.ac.jp:/usr/obj/amd/mi004/home2/FreeBSD-src/stable4/src/sys/MI  i386
% dmesg | grep sbc
sbc0: <Creative SB AWE64> at port 0x220-0x22f,0x330-0x331,0x388-0x38b irq 5 drq 1,5 on isa0
pcm0: <SB16 DSP 4.16> on sbc0
% cat /dev/sndstat
FreeBSD Audio Driver (newpcm) Feb 24 2001 09:07:03
Installed devices:
pcm0: <SB16 DSP 4.16> at io 0x220 irq 5 drq 1:5 (1p/1r channels duplex)

[PROGRAM]
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>

#define DEV_IN	"/dev/dsp"
#define DEV_OUT	DEV_IN
#define BUFLEN	1

int main(void) {
 int fdi, fdo;
 char x[BUFLEN];

 if ((fdi = open(DEV_IN, O_RDONLY)) == -1) {
    perror("File open failure for read: " DEV_IN);
    exit(1);
 }

 if ((fdo = open(DEV_IN, O_WRONLY)) == -1) {
    perror("File open failure for write: " DEV_IN);
    exit(1);
 }

 while (read(fdi, &x, sizeof(x)) > 0) write(fdo, &x, sizeof(x));

 return 0;
}
---
-----
Mamoru IWAKI   (iwaki@bc.niigata-u.ac.jp)
Graduate School of Science and Technology, Niigata University

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




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