[Nagios-devel] Event broker, dlopen(), and segfaults
Posted: Thu Oct 18, 2007 2:02 pm
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: [email protected]
Website: http://www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
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: [email protected]
Website: http://www.nagios.org
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]