[Xymon] logfetch bug or trigger syntax in client-local.cfg?

Gore, David W (David) david.gore at verizon.com
Wed Dec 14 14:42:43 CET 2011


We are receiving core dumps of logfetch at irregular times but it is quite persistent.  This is mostly on SunOS 10 SPARC clients with a 4.3.6 Xymon client build.  Any ideas appreciated. Here is the back trace.  

[nmsbb at ipgomzspa03 client]$ ./gdb bin/logfetch core
GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10"...
Core was generated by `/export/home/nmsbb/client/bin/logfetch /export/home/nmsbb/client/tmp/logfetch.i'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd.so.1...done.
Loaded symbols for /lib/libmd.so.1
Reading symbols from /platform/sun4v/lib/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,T5240/lib/libc_psr.so.1
#0  0xff282810 in __regexec_C () from /lib/libc.so.1
(gdb) bt
#0  0xff282810 in __regexec_C () from /lib/libc.so.1
#1  0x00012f5c in logdata (filename=0x3b180 "/var/adm/messages", logdef=0x3b13c)
    at logfetch.c:252
#2  0x00014730 in main (argc=1, argv=0x36000) at logfetch.c:963

Relevant portions of code:

Around line 252:

    /* See if this is a trigger line */
    if (logdef->triggercount) {
      int i, match = 0;

      for (i=0; ((i < logdef->ignorecount) && !match); i++) {
        match = (regexec(&trigexpr[i], fillpos, 0, NULL, 0) == 0); ← line 252
      }

      if (match) {
        int sidx;

        sidx = lpidx - LINES_AROUND_TRIGGER;
        if (sidx < 0) sidx += (2*LINES_AROUND_TRIGGER + 1);
        triggerstartpos = linepos[sidx]; if (!triggerstartpos) triggerstartpos = buf;
        triggerlinecount = LINES_AROUND_TRIGGER;
      }
    }

And line 963:

    switch (walk->checktype) {
      case C_LOG:
      data = logdata(walk->filename, &walk->check.logcheck); ← line 963
      fprintf(stdout, "[msgs:%s]\n", walk->filename);
      fprintf(stdout, "%s\n", data);


Triggers used (piped through cat ?vet):

trigger ERROR
trigger Error|Segmentation
trigger Error|Segmentation
trigger ChannelClosedException|ORA.|Memory|ERROR|FATAL|SQLException|ClassCircularityError|did not respond|CORBA TIMEOUT
trigger ChannelClosedException|ORA.|Memory|ERROR|FATAL|SQLException|ClassCircularityError|did not respond|CORBA TIMEOUT
trigger Memory|ERROR|FATAL|ClassCircularityError|did not respond|CORBA TIMEOUT
trigger ERROR|FATAL|SQLException|(ORA\-)|OutOfMemoryError
trigger ERROR|FATAL|SQLException|(ORA\-)|OutOfMemoryError
[nmsbb at ipgomzspa03 tmp]$ grep trigger logfetch.ipgomzspa03.cfg|cat -vet
trigger ERROR$
trigger Error|Segmentation$
trigger Error|Segmentation$
trigger ChannelClosedException|ORA.|Memory|ERROR|FATAL|SQLException|ClassCircularityError|did not respond|CORBA TIMEOUT$
trigger ChannelClosedException|ORA.|Memory|ERROR|FATAL|SQLException|ClassCircularityError|did not respond|CORBA TIMEOUT$
trigger Memory|ERROR|FATAL|ClassCircularityError|did not respond|CORBA TIMEOUT$
trigger ERROR|FATAL|SQLException|(ORA\-)|OutOfMemoryError$
trigger ERROR|FATAL|SQLException|(ORA\-)|OutOfMemoryError$



David Gore (v965-3670) 
Network Management Systems (NMS) 
IMPACT Transport Team Lead - SCSA, SCNA 
Page: 1-800-PAG-eMCI pin 1406090 
Vnet: 965-3676




More information about the Xymon mailing list