Segmentation Fault on config verification
Mike Lindsey
mike-nagios at 5dninja.net
Mon Oct 22 23:28:23 CEST 2012
Looks I had a hostgroup that listed itself as a hostgroup member. There
were 11 other hostgroup members, and 4220 char temp_hostgroup->members
and newmembers strings.
In xdata/xodtemplate.c, in
xodtemplate_recombobulate_hostgroup_subgroups() the error was occurring
in the while loop at:
"""
strcat(temp_hostgroup->members, newmembers);
"""
Not entirely sure what the root cause of the segmentation fault
(fragmented memory?) might be, but updating my configuration to not
include self-referential hostgroups has resolved the issue.
On 10/22/12 12:17 PM, Mike Lindsey wrote:
> Seeing this on 3.3.1, and 3.4.1. Tried to reproduce with 4, but can't
> build from the current git repository.
>
> Migrating from obj_file to obj_dir style nagios.cfg, and on validation
> of my Master configuration I get a Segmentation fault, that looks to be
> coming right after Nagios closes nagios.cfg.
>
> The same format of configuration, generated from the same script works
> fine for poller nodes. The main differences in the poller node
> configuration is size, no escalations, and no dependencies.
>
> The end of the truss output:
> mmap(0x0,783,PROT_READ,MAP_PRIVATE,5,0x0) = 34365812736 (0x8005cb000)
> munmap(0x8005cb000,783) = 0 (0x0)
> close(5) = 0 (0x0)
> stat("/usr/local/ironport/akeos/bin/tmp/ops-mon-nagios1.vega/timeperiods/workhours.cfg",{
> mode=-rw-r--r-- ,inode=829664,size=389,blksize=4096 }) = 0 (0x0)
> open("/usr/local/ironport/akeos/bin/tmp/ops-mon-nagios1.vega/timeperiods/workhours.cfg",O_RDONLY,00)
> = 5 (0x5)
> fstat(5,{ mode=-rw-r--r-- ,inode=829664,size=389,blksize=4096 }) = 0 (0x0)
> mmap(0x0,389,PROT_READ,MAP_PRIVATE,5,0x0) = 34365812736 (0x8005cb000)
> munmap(0x8005cb000,389) = 0 (0x0)
> close(5) = 0 (0x0)
> getdirentries(0x4,0x800d27000,0x1000,0x800d15668,0xffffffff80aece00,0x7fffffffe410)
> = 0 (0x0)
> lseek(4,0x0,SEEK_SET) = 0 (0x0)
> close(4) = 0 (0x0)
> munmap(0x8005c9000,4444) = 0 (0x0)
> close(3) = 0 (0x0)
> SIGNAL 11 (SIGSEGV)
> process exit, rval = 0
>
> I'm digging into the source, but if anyone has any ideas, I'm ears.
>
--
Mike Lindsey
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list