nagios 3.2.3 localtime deadlock

Lars Michelsen lars.lists at googlemail.com
Sat Oct 9 02:05:12 CEST 2010


Hello Andreas, Hello List,

> First try disabling environment macros. Then try without the
> mk-livestatus module. Seeing it happen in a pristine Nagios would mean
> we don't need to speculate about where the problem happens.
> 
> > Anyone seen this before?
> > 

Yes, happened to several users. This already has been debugged by Mathias
Kettner (Dev of Livestatus).

The problem from the start: When nagios is executing a check it performs a
fork(). The forked process contains only the thread which performed the fork().
The livestatus threads are not forked.
But if something is executing localtime() which is holding the lock the lock
will be forked with the state it is. And it will not be released.

The forked process runs into the lock while setting the environment macros and
hangs forever waiting for the lock to be released.

Disabling the environment macros solves the problem.

Maybe localtime_r could solve the problem?

The problem is that livestatus is not possible without threads.
It would be nice to have the problem solved since the amount of livestatus users
is growing.

> 
> I haven't, but very few bugs only happen to a single user so it's
> more than just possible.
> 

Kind regards,
Lars



------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb




More information about the Developers mailing list