[linux-audio-dev] gettimeofday() freeze?

From: Steve <radarsat1@email-addr-hidden>
Date: Fri Jun 16 2006 - 07:11:45 EEST

Hi,

Tonight I actually for once got around to working a bit on my pet
audio project, and thought I'd finally try to tackle my issues with a
processor-intensive audio loop. So I started writing a simple timing
class (C++) to do some profiling...

Unfortunately, instead I've found myself wasting my time because my
computer (or at least X) keeps freezing!

It seems that whenever I put a call to gettimeofday() in my audio loop
(which gets called about every 40-or-so milliseconds, a latency I'd
like to reduce), and run the program, everything just freezes... no
mouse, keyboard, no screen updates, etc. Reboot required.

(I tried using ssh from another computer but got no response...
strangely I did get a ping response however.)

To be more specific, the loop is actually a callback from PortAudio.
With gettimeofday commented out, there is no freeze, the software runs
as expected.

Originally I thought it might be a priority problem, but I tried
running it without a priority boost and using "nice -n 19", but still
I get a system freeze. It's strange, because I was under the
impression that a user process should never be able to hang my whole
system if not running as root.

Has anyone else had issues with this?
Is there a better way to profile my code?

Unfortunately it's a GUI program (using SDL for graphics) so it's
difficult to run it in text mode. I might try figuring out how to
comment out all the graphics stuff though, to see if it has the same
effect without X running.

I'm using Ubuntu Dapper, up-to-date:

$ uname -a
Linux hal9000 2.6.15-22-686 #1 SMP PREEMPT Sun May 7 16:37:57 UTC 2006
i686 GNU/Linux

Thanks,
Steve
Received on Fri Jun 16 08:15:03 2006

This archive was generated by hypermail 2.1.8 : Fri Jun 16 2006 - 08:15:04 EEST