Re: [gamin] 100% CPU in gam_server
- From: Daniel Veillard <veillard redhat com>
- To: Benjamin Lee <benjamin lee realthought net>
- Cc: gamin-list gnome org
- Subject: Re: [gamin] 100% CPU in gam_server
- Date: Wed, 10 Nov 2004 08:43:45 -0500
On Thu, Nov 11, 2004 at 12:30:55AM +1100, Benjamin Lee wrote:
> Greets list,
>
> Unfortunately, it is possible for gam_server to go 100% CPU crazy in
> gam_poll.c:remove_directory_subscription().
>
> It seems the GList *children can sometimes contain a next-> loop and
> therefore the program will loop forever in:
>
> 545 for (l = children; l; l = l->next) {
>
> Bummer eh.
>
> (gdb) list remove_directory_subscription
> Line 535 of "gam_poll.c" starts at address 0x804c6ad <remove_directory_subscription> and ends at 0x804c6b3 <remove_directory_subscription+6>.
> (gdb)
>
> I have seen this 100% CPU issue several times now... but I have not yet
> determined the steps to reproduce it. I just thought I'd give the list a
> heads up.
>
> As for debugging, in the past I've macro-ed a GList check function that is
> run for *every* list action. It checks that the list has no loops... but
> traversing the list until next == NULL or 'n' and if 'n' is reached (where
> n is large like 100000) then we have a loop.
>
> Other ideas?
yeah, I know, it's really really anoying. I intend to make a complete
reread of that part of the code and add the same loop checking to
remove_directory_subscription() as I did in gam_poll_scan_directory_internal()
(which uses 2 pointer, it is an exact check and is faster than the solution
you suggest to catch them).
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]