Event broker, dlopen(), and segfaults
Ethan Galstad
nagios at nagios.org
Fri Oct 19 00:02:21 CEST 2007
While doing some debugging of NDOUtils, I've noticed something bad.
Event broker modules like ndomod.o will cause Nagios to segfault if they
are overwritten on the filesystem while they are in use.
I assume this is due to the way dlopen() deals with object files. I was
under the assumption that a complete copy of the module was kept in
memory once it was loaded, but perhaps its mmap()'d.
The segfault is easily reproducible every time I overwrite ndomod.o
while in use. Even if the "new" version of the file doesn't differ from
the old.
Anyone know more details of how this works, or better yet, how to
avoid/deal with it?
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
More information about the Developers
mailing list