Hi Chris,

Would be great if: 1) you can upgrade to something more recent than that,
ie. issue could be related to timestamps and fix might well be in some
other parts of the code (pkt_handlers.c pops to mind) and/or 2) manage
to reproduce the issue. 

Apart of the above, agree 100% with your thoughts about cleaning up a
bit; i have that on my todo list (along with other related things, ie.
creating a sql_cache_free_entries() routine).

Cheers,
Paolo


On Sun, Nov 27, 2011 at 05:15:51PM +0200, Chris Wilson wrote:
> Hi all,
>
> I just caught my copy of pmacct on my laptop in an infinite loop in  
> sql_cache_insert, burning 100% CPU.
>
> Unfortunately I don't know what traffic could have caused this. I have 
> the process in a debugger right now, but without debug symbols I can't 
> tell very much. It's 0.12.1 from Ubuntu Oneiric. I've tried rebuilding 
> the same package from source and the resulting binary has debug symbols 
> but the addresses don't match.
>
> This function appears untouched in 0.14.0rc2, so I assume the bug is 
> still present. It's full of gotos, and it's not at all obvious that it 
> makes progress in every case, because it's difficult to untangle.
>
> Might I suggest rewriting this code to avoid use of global variables  
> (for example, keep state such as pqq_ptr in a data buffer struct along  
> with the data) and make it guarantee to make progress and terminate? (for 
> example, using a for loop over buffer entries with a fixed step, and  
> functions for safe actions, insert and update)?
>
> Cheers, Chris.
> -- 
> Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
> The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES
>
> Aptivate is a not-for-profit company registered in England and Wales
> with company number 04980791.
>
>
> _______________________________________________
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to