Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Random Segfaults [with sound]
@ 1998-10-21 12:25 Andrew Hobgood
  1998-10-21 15:10 ` Bob McElrath
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Hobgood @ 1998-10-21 12:25 UTC (permalink / raw)
  To: axp-list

Well...

I've found what's causing my box to segfault somewhat randomly.  It turns out,
any time that I play MIDI or PCM audio on my AWE64 Gold, with the OSS/Linux 
drivers and kernel 2.0.35, things will randomly die from segfaults... last 
night, I was playing a bunch of .wav files (copying a MiniDisc), and I was 
doing *nothing else* on the system, and my X session just fell over, and all
of the apps in it segfaulted first.  Everything disappeared from my screen in
a sort of shimmering cascade of dying windows.

So, I must ask --- is there some kind of nutty conflict here?  Has anyone 
gotten the OSS/Linux drivers to work reliably on an Alpha system?  I'm on a 
164LX, 533MHz (Aspen Durango II), running a RedHat 5.1 base (so it's glibc,
egcs, and all that nonsense).

My bets are that there's a memory leak in either the kernel or the OSS driver
when it mmap()'s memory to drive the PCM audio, but that's only a hunch.  

Suggestions welcome,

/Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Random Segfaults [with sound]
  1998-10-21 12:25 Random Segfaults [with sound] Andrew Hobgood
@ 1998-10-21 15:10 ` Bob McElrath
  1998-10-21 16:07   ` Andrew Hobgood
  0 siblings, 1 reply; 7+ messages in thread
From: Bob McElrath @ 1998-10-21 15:10 UTC (permalink / raw)
  To: axp-list

On Wed, 21 Oct 1998, Andrew Hobgood wrote:

> Well...
> 
> I've found what's causing my box to segfault somewhat randomly.  It turns out,
> any time that I play MIDI or PCM audio on my AWE64 Gold, with the OSS/Linux 
> drivers and kernel 2.0.35, things will randomly die from segfaults... last 
> night, I was playing a bunch of .wav files (copying a MiniDisc), and I was 
> doing *nothing else* on the system, and my X session just fell over, and all
> of the apps in it segfaulted first.  Everything disappeared from my screen in
> a sort of shimmering cascade of dying windows.
> 
> So, I must ask --- is there some kind of nutty conflict here?  Has anyone 
> gotten the OSS/Linux drivers to work reliably on an Alpha system?  I'm on a 
> 164LX, 533MHz (Aspen Durango II), running a RedHat 5.1 base (so it's glibc,
> egcs, and all that nonsense).
> 
> My bets are that there's a memory leak in either the kernel or the OSS driver
> when it mmap()'s memory to drive the PCM audio, but that's only a hunch.  

I have a 164LX as well, and have seen problems with sound.  Not segfaults
though.  I think you're probably correct in your assessment of a memory
leak.  I've played with both a Pro Audio Spectrum 16 and a Sound Blaster Pro
now (both ISA), and have gotten the SB working, but not the PAS (not even
the SB portion of the PAS).  The PAS works as I've tested it on another
nearby system.

The SB Pro works, however, there is a significant hang whenever
disconnecting or connecting to the device, as if interrupts are disabled for
a few seconds to do the disconnect.  (Disconnect shouldn't take this
long...and I'll look at the SB code prolly this weekend).

All the sound I've been playing is through mpg123 though, which *DOESN'T*
used mmap().  It's supposed to, but fails somehow, and I haven't figured out
why yet.

Is the AWE64 Gold an ISA or PCI Card?  I suspect some problems with the
IRQ/DMA code, or possibly some problem in initializing the PCI/ISA bridge.

I also get low (400k/s max) rates with my PCI 3Com ethernet card, while
nearby Intel boxes can get 1M/s on the same network.  Possibly this is
related?

-- Bob

  ./'^`\._./'~`\._./'~`\._./'~`\._./'#`\._./'~`\._./'~`\._./'~`\._./'^`\.
 / Rube Goldberg? Bah! Amateur! I give you..Windows 98! Linux everywhere \ 
| Linux, because everyone's work is mission critical.   ANYTHING inside.  |
|_Bob McElrath (mcelrath@wisconsin.cern.ch) Univ. of Wisconsin at Madison_|
  \.___________________________________________________________________./


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Random Segfaults [with sound]
  1998-10-21 15:10 ` Bob McElrath
@ 1998-10-21 16:07   ` Andrew Hobgood
       [not found]     ` <chaos@strange.net>
  1998-10-21 18:44     ` Bob McElrath
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Hobgood @ 1998-10-21 16:07 UTC (permalink / raw)
  To: axp-list

> The SB Pro works, however, there is a significant hang whenever
> disconnecting or connecting to the device, as if interrupts are disabled for
> a few seconds to do the disconnect.  (Disconnect shouldn't take this
> long...and I'll look at the SB code prolly this weekend).

How long are these "hangs"?  I get about a 100ms or so delay, which is pretty
trivial (and also, the same sort of delay has always been present for audio
on ANY platform that I've ever worked with, so I think that's just load time
for the audio).

> All the sound I've been playing is through mpg123 though, which *DOESN'T*
> used mmap().  It's supposed to, but fails somehow, and I haven't figured out
> why yet.

Hmm.... my problem exists if I'm using mpg123, play [from the OSS package], 
mikmod, gmod, xpe, whatever.  If it uses /dev/dsp or /dev/sequencer, it croaks.

The oddest part is, it's not the app itself that falls over.  Granted, it 
usually does, but yesterday, I wrote a quick little shell script (at my 
prompt) to play a sequence of WAV files... after the Eterm which had the 
script running, a few other Eterms, my mixer, and my X server all fell over,
the audio was *still playing*, and the script didn't end until it finished 
playing all of the audio.  The 'play' process was running in unpriveleged user
space (yeah, I know... /dev/dsp is world writeable.  I was testing. =P), so 
there really shouldn't have been any way for it to cause OTHER programs to 
segfault unless it's mucking with kernel memory.  That's what's pointing me at
the OSS driver.

> Is the AWE64 Gold an ISA or PCI Card?  I suspect some problems with the
> IRQ/DMA code, or possibly some problem in initializing the PCI/ISA bridge.

It's ISA... the PCI/ISA initialization stuff sounds interesting... but I don't
think it's related to my problem... though it might be...

> I also get low (400k/s max) rates with my PCI 3Com ethernet card, while
> nearby Intel boxes can get 1M/s on the same network.  Possibly this is
> related?

I haven't had any network problems at all... I get consistently higher transfer
rates than all of my Intel bound friends on my network segment.  I'm only 
running a 3c900 Boomerang in one of my 64 bit PCI slots, and it works fine, 
though I haven't tried it in a 32 bit slot yet.  Have you tried moving it 
around?  I don't think it should make a difference, but it might.

Cheers,

/Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Random Segfaults [with sound]
       [not found]     ` <chaos@strange.net>
@ 1998-10-21 17:41       ` xeno
  1998-10-21 18:21         ` Andrew Hobgood
  1998-10-21 18:24       ` xeno
  1 sibling, 1 reply; 7+ messages in thread
From: xeno @ 1998-10-21 17:41 UTC (permalink / raw)
  To: axp-list

> > The SB Pro works, however, there is a significant hang whenever 
> > disconnecting or connecting to the device, as if interrupts are disabled for 
> > a few seconds to do the disconnect.  (Disconnect shouldn't take this 
> > long...and I'll look at the SB code prolly this weekend). 
>  
> How long are these "hangs"?  I get about a 100ms or so delay, which is pretty 
> trivial (and also, the same sort of delay has always been present for audio 
> on ANY platform that I've ever worked with, so I think that's just load time 
> for the audio). 

  Yeah, I've got a soundblaster running on my as 200. It works fine. 

> > All the sound I've been playing is through mpg123 though, which *DOESN'T* 
> > used mmap().  It's supposed to, but fails somehow, and I haven't figured out 
> > why yet. 
>  
> Hmm.... my problem exists if I'm using mpg123, play [from the OSS package],  
> mikmod, gmod, xpe, whatever.  If it uses /dev/dsp or /dev/sequencer, it croaks. 

  THe mmap problem might be due to the small size delegated in the kernel
when compiled. You might want to change this size. I forget which file
does this, but if you look on the axp redhat list for "shmget errors" and
cdrecord you'll find the solution for it. 
  By the way, amp works fine and seems to buffer as well. 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Random Segfaults [with sound]
  1998-10-21 17:41       ` xeno
@ 1998-10-21 18:21         ` Andrew Hobgood
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Hobgood @ 1998-10-21 18:21 UTC (permalink / raw)
  To: axp-list

>   THe mmap problem might be due to the small size delegated in the kernel
> when compiled. You might want to change this size. I forget which file
> does this, but if you look on the axp redhat list for "shmget errors" and
> cdrecord you'll find the solution for it. 

Are you using OSS/Free or OSS/Linux?  Does OSS/Free even work on the Alpha?

/Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Random Segfaults [with sound]
       [not found]     ` <chaos@strange.net>
  1998-10-21 17:41       ` xeno
@ 1998-10-21 18:24       ` xeno
  1 sibling, 0 replies; 7+ messages in thread
From: xeno @ 1998-10-21 18:24 UTC (permalink / raw)
  To: axp-list

> Are you using OSS/Free or OSS/Linux?  Does OSS/Free even work on the Alpha? 
>  

  OSS/Linux. Under the newer kernels. (2.1.123 to be exact)

Eric


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Random Segfaults [with sound]
  1998-10-21 16:07   ` Andrew Hobgood
       [not found]     ` <chaos@strange.net>
@ 1998-10-21 18:44     ` Bob McElrath
  1 sibling, 0 replies; 7+ messages in thread
From: Bob McElrath @ 1998-10-21 18:44 UTC (permalink / raw)
  To: axp-list

On Wed, 21 Oct 1998, Andrew Hobgood wrote:

> > The SB Pro works, however, there is a significant hang whenever
> > disconnecting or connecting to the device, as if interrupts are disabled for
> > a few seconds to do the disconnect.  (Disconnect shouldn't take this
> > long...and I'll look at the SB code prolly this weekend).
> 
> How long are these "hangs"?  I get about a 100ms or so delay, which is pretty
> trivial (and also, the same sort of delay has always been present for audio
> on ANY platform that I've ever worked with, so I think that's just load time
> for the audio).

Hangs are about 1-2 seconds.  Mouse stops, processes stop...It's definitely
an I/O related delay, probably interrupt blocking.

> > All the sound I've been playing is through mpg123 though, which *DOESN'T*
> > used mmap().  It's supposed to, but fails somehow, and I haven't figured out
> > why yet.
> 
> Hmm.... my problem exists if I'm using mpg123, play [from the OSS package], 
> mikmod, gmod, xpe, whatever.  If it uses /dev/dsp or /dev/sequencer, it croaks.
> 
> The oddest part is, it's not the app itself that falls over.  Granted, it 
> usually does, but yesterday, I wrote a quick little shell script (at my 
> prompt) to play a sequence of WAV files... after the Eterm which had the 
> script running, a few other Eterms, my mixer, and my X server all fell over,
> the audio was *still playing*, and the script didn't end until it finished 
> playing all of the audio.  The 'play' process was running in unpriveleged user
> space (yeah, I know... /dev/dsp is world writeable.  I was testing. =P), so 
> there really shouldn't have been any way for it to cause OTHER programs to 
> segfault unless it's mucking with kernel memory.  That's what's pointing me at
> the OSS driver.

Have you tried 'cat blah.wav > /dev/audio'?  Will your system hang when you
play wav files this way?  If it does you can probably isolate the problem to
the kernel.

> > Is the AWE64 Gold an ISA or PCI Card?  I suspect some problems with the
> > IRQ/DMA code, or possibly some problem in initializing the PCI/ISA bridge.
>
> It's ISA... the PCI/ISA initialization stuff sounds interesting... but I don't
> think it's related to my problem... though it might be...

Hmmm, ok then, does anyone else on the list have problems with a 164LX and
ISA devices?  Perhaps we can narrow down the problem if we can find other
devices with problems?
 
> > I also get low (400k/s max) rates with my PCI 3Com ethernet card, while
> > nearby Intel boxes can get 1M/s on the same network.  Possibly this is
> > related?
> 
> I haven't had any network problems at all... I get consistently higher transfer
> rates than all of my Intel bound friends on my network segment.  I'm only 
> running a 3c900 Boomerang in one of my 64 bit PCI slots, and it works fine, 
> though I haven't tried it in a 32 bit slot yet.  Have you tried moving it 
> around?  I don't think it should make a difference, but it might.

Thanks, I'll try that.

-- Bob

  ./'^`\._./'~`\._./'~`\._./'~`\._./'#`\._./'~`\._./'~`\._./'~`\._./'^`\.
 / Rube Goldberg? Bah! Amateur! I give you..Windows 98! Linux everywhere \ 
| Linux, because everyone's work is mission critical.   ANYTHING inside.  |
|_Bob McElrath (mcelrath@wisconsin.cern.ch) Univ. of Wisconsin at Madison_|
  \.___________________________________________________________________./


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-10-21 18:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-10-21 12:25 Random Segfaults [with sound] Andrew Hobgood
1998-10-21 15:10 ` Bob McElrath
1998-10-21 16:07   ` Andrew Hobgood
     [not found]     ` <chaos@strange.net>
1998-10-21 17:41       ` xeno
1998-10-21 18:21         ` Andrew Hobgood
1998-10-21 18:24       ` xeno
1998-10-21 18:44     ` Bob McElrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox