Re: [gamin] 100% CPU in gam_server



On Thursday, 2004-11-11 at 12:43:45 AM, Daniel Veillard scribbled:

> 
>   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).

Oh yeah, the 2 pointer trick... except that that won't find a loop like:

[node1] -> [node2] -> [node3] --+
   ^                            |
   |----------------------------+

Anyway, I started with g_list_prepend... and it pulled out (almost
immediately)... a problem in gam_poll_add_subscription():




    gam_listener_add_subscription(gam_subscription_get_listener(sub), sub);

    G_LOCK(new_subs);
    
    /* ben. problem here 
    
    maybe new_subs == sub?
    or sub is a multi element list with common nodes in new_subs?
    
    */
    
    new_subs = g_list_prepend(new_subs, sub);
    G_UNLOCK(new_subs);


-- 
Benjamin Lee
Melbourne, AU         +61.4.16.BEN.LEE         http://www.realthought.net/
__________________________________________________________________________
And now for something completely different.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]