Subject: Re: Gnome2, Nautilus and pthreads
To: None <netbsd@ns.purk.ee>
From: Rene Hexel <r.hexel@griffith.edu.au>
List: current-users
Date: 06/26/2003 20:41:53
On Thursday, June 26, 2003, at 04:24  AM, netbsd@ns.purk.ee wrote:

> Nautilus just hangs and eats cpu high as 98%.I'm not going to whine ;-)
> What is the best way to debug this issue?

   The best way is probably to compile a debug version, then run it from 
gdb.
You need to tell gdb to ignore SIGUSR1, otherwise it will stop the 
program
at every context switch.  Then run the program, wait until it consumes 
98%
CPU, Control-C it from within gdb and see where the program stopped.  
This
is usually the thread that suffers from non-preemptive scheduling under 
pth.

   How to fix this is a different question.  Often, a periodic 
sched_yield()
will do the trick, but you should try to find out what the reason was 
for
that thread not to give up the CPU.

   Cheers
       ,
    Rene