[nas] nasd outputs only part of a sample, client stalls -- exceptunder strace

Erik Auerswald auerswal at unix-ag.uni-kl.de
Sun Oct 14 15:51:01 MDT 2007


Hi,

On Sat, Oct 13, 2007 at 07:16:59PM -0600, Jon Trulson wrote:
> 
>   I was able to load a 2.6.22.6 kernel on a laptop using a Pentium-M
>   (Centrino) processor at 1.7Ghz.  I had the dynticks/tickless stuff
>   enabled (though I tried disabled as well w/o effect).
> 
>   Unfortunately I was not able to duplicate the problem with current
>   svn nas (r264).  I did not try virgin 1.9 nas.

Version 1.9 of NAS hangs almost instantly on "my" system (debian
unstable with kernel 2.6.22). Current svn (264) hangs after a while,
i.e. short sounds work most of the time, but listening to music is
impossible.

>   However, I was able to almost-duplicate it by removing the
>   enable/disableIntervalProc calls in intervalProc - the server would
>   hang after playing a couple of seconds of audio.  In reality I don't
>   think we should be calling those in intervalProc anyway, as then we
>   provide an excellent opportunity to lose signals.
> 
>   So...
> 
>   Attached is a patch to current svn (r264) that removes these calls
>   from intervalProc and replaces them with SetTimer() calls.  This
>   will eliminate the timer interrupts (without disabling the handler)
>   while intervalProc is running; then schedule at least one more
>   interrupt before returning, by resetting the timer to the current
>   sample rate, so the spice can continue to flow :)
> 
>   This should ensure that there is no possibility that we will miss a
>   signal.  In theory.  :)
> 
>   It does work fine here on 2.6.22.6 now, as well as on a 2.4.33 kernel on
>   another machine.  Perhaps it will work for you guys as well?
> 
>   It's not committed yet, so let me know if it changes anything for
>   better or worse.

Thanks! This seems to do the trick. Normal music files play fine, at
least as far as I had time to test (about 30 minutes). The real test
will be during the week, when the NAS server will be used for hours...

Erik
-- 
Memory, of course, is never true.
                        -- Ernest Hemingway



More information about the Nas mailing list