On Tue, Oct 25, 2005 at 10:07:22AM +0100, Paul Keogh wrote:
>    I've atached to it with gdb to find out, that it starts consuming memory
>    and cpu while it is Sleeping!
> 
>    That does'nt sound right - are you sure you're looking at the right thread
>    ?
> 
>    Sometimes I think gdb gets confused around threads.
> 
>    the gwthread_sleep function, in the line where it actually
>    sleeps:
>        ret = poll(&pollfd, 1, milliseconds);
>    (line 750 in my case)
>    Because of i've not yet done much with the threadding
>    stuff, can somebody help me on that point?
>    What kind of file does it poll?
> 
>    It is, as far as I remember, polling the read end of a pipe(). The logic
>    being that you can wake up the thread using gwthread_wakeup() by writing
>    to
yes, it is. i've found that out in /proc.
lr-x------  1 kannel kannel 64 2005-10-25 11:06 4 -> pipe:[11351645]
l-wx------  1 kannel kannel 64 2005-10-25 11:06 5 -> pipe:[11351645]
these are the two of them.

if it's not the thread, that actually causes the mess (which i think is pretty
much the case, because of when i attach i think the active thread is atached, 
and if one eats cpu & mem, it should be active most likely?)

If i fire up bearerbox in gdb, it uses a special pthread version just 
simulating 
the threads, allso the threads don't have their own PID anymore like in 2.4...
so How do i change thread?

How do i find out, which is the threadid in the log?


>    the write end of the pipe().
> 
>    What could go wrong here?
> 
>    Not much, really.
> 
>    Tia, Wilfried Goesgens

Reply via email to