Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Sep 1998 04:08:02 +0200
From:      =?iso-8859-1?Q?Alexander_Hav=E4ng?= <eel@musiknet.se>
To:        current@FreeBSD.ORG
Subject:   Soundcard bestows nice kernel panic
Message-ID:  <19980918040802.A4814@ryd.student.liu.se>

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

Not sure if this is the right media for this.. but... 

I'm running 3.0 SNAP (19980831), with Voxware sound thingy in the kernel,
and a Gravis Ultrasound 3.7 (512k) (the one with ICS2101 mixer), on a 
DX4-100.
I recently switched from linux to freebsd (never to late to do the right thing, right?), and I must say almost everything has been much to fbsd's advantage, except for the console, moused just doesn't cut and paste right, and.. well.. all that's a different story.

Since my 486 isn't powerful enough to play mp3's, I decode them on my friend's PII, and a while back I wrote a client/server application for this, called rpl (and then I found out solaris already has a rpld daemon.. woops).

The usage goes like:
mpg123 -s song.mp3 | rpl myhost.com

and then rpld is started from inetd on myhost.com, reads pcm-audio-data from stdin and pukes it out on /dev/audio. Nothing fancy, I just wrote it for my own use.

So when I switched to FreeBSD, I ported rpl, (just a switch from <linux/soundcard.h> to <machine/soundcard.h> in the C-code), and it seemed to work fine.
Doing: cat song.pcm | rpld  on my machine works just fine.
But when I try to run it over our network from my friends machine, all I get is random noise, really confusing.

I did some debugging, and tried to increase the sound and network buffers.
Then.. when I tried something like
ioctl (audiofd, SNDCTL_DSP_SETBLKSIZE, &abuf_size), where abuf_size == 65536,
POOOF, there goes the kernel. Kernel panic, and before I knew what was happening, (first kernel panic for me on a bsd system), something about rebooting in 15 seconds.. and then the machine rebooted.

To be honest.. I haven't got a clue what I was doing there, the reported blocksize was 4096, I was just running out on options.

But.. no matter how stupid the programmer is, a user program, run by a user,
should not be able to crash the kernel, spank me if I'm wrong.

Any ideas, comments, questions and so forth? 
(please continue this somewhere else if it's out of place)

The rpl and rpld programs can be found at http://sargasso.flum.org/rpl/

Regards

Eel

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



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