Turns out lots of functions call eachother, thereby producing a race. The =
trick seems to be to ONLY lock the sections of code dealing directly with m=
acro_x and not just the entire function dealing with macro_x itself.
I'm going to give it 12hrs of run time and then I'll get a patch up for te=
sting.
Sincerely,
Steven D. Morrey
________________________________________
From: Alessandro Ren [[email protected]]
Sent: Wednesday, August 19, 2009 2:34 PM
To: Nagios Developers List
Subject: Re: [Nagios-devel] Multithreading Segfaults
On 8/19/2009 5:25 PM, Steven D. Morrey wrote:
> I've got the code complete for multi-threading the main event loop.
>
> It looks like the system is now segfaulting at various rather random plac=
es, but they all seem to be related to macros.
> First time it happened it was get_service_macros, next time was clear_vol=
atile_macros.
> It looks to me like the macro_x stuff is being accessed by multiple threa=
ds and we're getting a train wreck because of it.
>
> Normally I'd just put up a mutex on all the places that use the macro_x s=
tuff. But it looks like it's used in 617 different places in code, thats a=
lot of mutexes.
> I'll probably just put one on each function that deals with the macro_x s=
tuff unless someone has a better idea.
>
I had similar problems when I tried to add threads to the event
loop some months ago.
> Sincerely,
> Steve
>
>
> NOTICE: This email message is for the sole use of the intended recipien=
t(s) and may contain confidential and privileged information. Any unauthori=
zed review, use, disclosure or distribution is prohibited. If you are not t=
he intended recipient, please contact the sender by reply email and destroy=
all copies of the original message.
>
>
>
> -------------------------------------------------------------------------=
-----
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-D=
ay
> trial. Simplify your report design, integration and deployment - and focu=
s on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>
---------------------------------------------------------------------------=
---
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus =
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/lis ... gios-devel
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: lessandro Ren [[email protected]