FreeBSD thread issues
Charles Sprickman
spork at bway.net
Wed Aug 10 04:22:08 CEST 2005
Hello all,
I was looking at the notes about Nagios 2.x and saw mention of the
problems some people were having with threads and FreeBSD. I'm no
programmer, but I figured the folks on the -hackers list are pretty
friendly to questions like that, so I asked over there.
The thread I started is here:
http://marc.theaimsgroup.com/?t=111930118000001&r=1&w=2
There are some very interesting replies, a few in particular note that
Nagios may be breaking POSIX spec in how it spawns/destroys threads:
http://marc.theaimsgroup.com/?l=freebsd-hackers&m=111944526323754&w=2
http://marc.theaimsgroup.com/?l=freebsd-hackers&m=111945035012258&w=2
Anyhow, I'm sure if Ethan were to post some more specific info to
freebsd-hackers at freebsd.org (it's an open list, no need to sub), this
issue could get banged out pretty quickly.
Shortly after this thread, I found another where the issue was brought up
by another curious poster, and he was using 5.4, which uses a newer
threading library:
http://marc.theaimsgroup.com/?t=112119712600002&r=1&w=2
This post again brings up the "fork without exec or exit" possibly not
following spec:
http://marc.theaimsgroup.com/?l=freebsd-hackers&m=112125883804481&w=2
"I don't know what Nagios does just after fork(2), it would be worth to
check. It appears that fork(2)ing without exec(2)ing or _exit(2)ing
in a pthreaded program is not a "valid" behaviour, regarding to
SUSv3 [1]. I don't want to avoid admitting there is a problem in
FreeBSD threading library, I don't know how other OSes handle this,
but Nagios folks should really avoid doing what is explicitely
dissuaded in SUSv3."
Is there anything Ethan or anyone else needs from the FreeBSD community to
work this out? Anything I can do?
Thanks,
Charles
[1]
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_atfork.html
(look at the "RATIONALE" section)
___
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet - www.bway.net
spork at bway.net - 212.655.9344
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
More information about the Developers
mailing list