[Nagios-devel] Multithreading Segfaults :(
Posted: Wed Aug 19, 2009 7:25 pm
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 places=
, but they all seem to be related to macros.
First time it happened it was get_service_macros, next time was clear_volat=
ile_macros.
It looks to me like the macro_x stuff is being accessed by multiple threads=
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 stu=
ff. But it looks like it's used in 617 different places in code, thats a l=
ot of mutexes.
I'll probably just put one on each function that deals with the macro_x stu=
ff unless someone has a better idea.
Sincerely,
Steve
NOTICE: This email message is for the sole use of the intended recipient(s=
) and may contain confidential and privileged information. Any unauthorized=
review, use, disclosure or distribution is prohibited. If you are not the =
intended recipient, please contact the sender by reply email and destroy al=
l copies of the original message.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
It looks like the system is now segfaulting at various rather random places=
, but they all seem to be related to macros.
First time it happened it was get_service_macros, next time was clear_volat=
ile_macros.
It looks to me like the macro_x stuff is being accessed by multiple threads=
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 stu=
ff. But it looks like it's used in 617 different places in code, thats a l=
ot of mutexes.
I'll probably just put one on each function that deals with the macro_x stu=
ff unless someone has a better idea.
Sincerely,
Steve
NOTICE: This email message is for the sole use of the intended recipient(s=
) and may contain confidential and privileged information. Any unauthorized=
review, use, disclosure or distribution is prohibited. If you are not the =
intended recipient, please contact the sender by reply email and destroy al=
l copies of the original message.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]