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
> the write end of the pipe().
>
> What could go wrong here?
>
> Not much, really.
>
> Tia, Wilfried Goesgens
hm, the thread i've atached is main according to the threadinfo struct:
(gdb) print *threadinfo
$3 = {self = 2974619232, name = 0xb1a3b49c "main", func = 0,
number = 0, wakefd_recv = 4, wakefd_send = 5, joiners = 0x0,
pid = -1}
(gdb)
so it might be, gdb just ataches the main thread?
So again, how do i change threads?
Or find out, which one of those is the bad guy and what he's doing there?
Wilfried Goesgens