I have been investigating a puzzling SMP/ALSA bug for a while now.
It showed up in the 2.1 series SMP kernels and is present in the 2.2
series kernels when compiled for SMP.  This happens with both the most
recent CVS ALSA version as well as older versions.

When the kernel is not compiled for SMP and the alsa-driver is compiled
with-smp=no, this bug does not manifest itself.

The symptom is that the system time jumps into the future about 90-100
minutes for a fraction of a second, and then returns to normal time.
I have also seen the system clock advance at an accelerated rate, at
about a minute every 10-15 seconds real time.

This becomes immediatly evident as the X window inactivity timer goes
off and the screen blanks.  I have to run X in SMP with inactivity timer
disabled to keep the screen from blanking continuously.  In addition,
the clock also flips between two times, dwelling on the correct one
mostly, and flashing the incorrect one intermittently.  There is no
discernible periodicity to the time change.

Installing the alsa modules does not cause the bug.  Opening the pcm
device or oss-pcm 1 device immediately begins the clock anomaly.  I
typically start mpg123 and see the hiccups within 5 seconds.  This does
not affect sound, and I hear no interruptions, clicks, pops, etc.

Shutting down the application writing to pcm does not stop the time
hiccup.  rmmod-ing the alsa modules does not stop the time hiccup.

I counted /proc/interrupts for the timer int, and while elapsed time
varied, the total number of ints on each CPU added up to almost exactly
100 per second.  (cat /proc/interrupts; sleep 10; cat /proc/interrupts)
and manually note deltas in CPU 0 and CPU 1 timer ints; almost exactly
1000 in both buggy mode and normal operation.  The buggy mode always took
longer real time, and that varied from 12-15 seconds.

I suspect that there is some manipulation of the system timer in the
alsa-driver kernel pcm code that is not SMP safe.  Does any one have any
ideas on approaches to isolate this behavior?  Has anyone else with an
SMP system and ALSA seen anything like this?

--------------------------------------------------------------------------------
   Sam Chessman              "E Pluribus Linux"              [EMAIL PROTECTED]


------
To unsubscribe from <[EMAIL PROTECTED]> mailing list send message
'unsubscribe' in the body of message to <[EMAIL PROTECTED]>.

Reply via email to