Package: ndoutils-nagios2-mysql
Version: 1.4b6-2
Severity: normal

Hi!

I've just set up nagios2 and ndoutils (via apt-get -b source), and in
trying to import old logs came across the following bug, which only seems
to occur when trying to import already-imported log entries.

gdb output:
(gdb) set follow-fork-mode child
(gdb) run -c /etc/nagios/ndo2db.cfg
Starting program: /usr/sbin/ndo2db -c /etc/nagios/ndo2db.cfg
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1212217664 (LWP 29521)]
[tcsetpgrp failed in terminal_inferior: Operation not permitted]

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 29604]
0xb7c9ceda in strcmp () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7c9ceda in strcmp () from /lib/tls/i686/cmov/libc.so.6
#1  0x0804dd1e in ndo2db_handle_logentry (idi=0xbf9bc07c) at dbhandlers.c:555
#2  0x0804c318 in ndo2db_end_input_data (idi=0xbf9bc07c) at ndo2db.c:1522
#3  0x0804bbcc in ndo2db_handle_client_input (idi=0xbf9bc07c, 
    buf=0x807d988 "999") at ndo2db.c:1232
#4  0x0804ae38 in ndo2db_check_for_client_input (idi=0xbf9bc07c, 
    dbuf=0xbf9bc58c) at ndo2db.c:916
#5  0x0804abea in ndo2db_handle_client_connection (sd=7) at ndo2db.c:813
#6  0x0804aa64 in ndo2db_wait_for_connections () at ndo2db.c:729
#7  0x080497aa in main (argc=3, argv=0xbf9bc7a4) at ndo2db.c:155

dbhandlers.c:555 reads:

        if(duplicate_record==NDO_TRUE && strcmp((es[0]==NULL)?"":es[0],idi->dbin
fo.last_logentry_data)){
#ifdef NDO2DB_DEBUG
                printf("IGNORING DUPLICATE LOG RECORD!\n");
#endif
                return NDO_OK;
                }

So I'm guessing that whatever the hell this C-construct 
"(es[0]==NULL)?"":es[0]" is supposed to do ain't what it actually does.

Via strace it looks like

<...>
[pid  6683] setsockopt(8, SOL_SOCKET, SO_SNDTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] write(8, "\212\0\0\0\3SELECT * FROM nagios_logentries WHERE 
instance_id=\'1\' AND logentry_time=FROM_UNIXTIME(1167001213) AND 
logentry_data=\'LOG ROTATION: DAILY\'", 142) = 142
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] read(8, 
"\1\0\0\1\tT\0\0\2\3def\6nagios\21nagios_logentries\21nagios_logentries\vlogentry_id\vlogentry_id\f?\0\v\0\0\0\3\3B\0\0\0T\0\0\3\3def\6nagios\21nagios_logentries\21nagios_logentries\vinstance_id\vinstance_id\f?\0\v\0\0\0\3\1\0\0\0\0X\0\0\4\3def\6nagios\21nagios_logentries\21nagios_logentries\rlogentry_time\rlogentry_time\f?\0\23\0\0\0\f\201\0\0\0\0R\0\0\5\3def\6nagios\21nagios_logentries\21nagios_logentries\nentry_time\nentry_time\f?\0\23\0\0\0\f\201\0\0\0\0\\\0\0\6\3def\6nagios\21nagios_logentries\21nagios_logentries\17entry_time_usec\17entry_time_usec\f?\0\v\0\0\0\3\1\0\0\0\0X\0\0\7\3def\6nagios\21nagios_logentries\21nagios_logentries\rlogentry_type\rlogentry_type\f?\0\v\0\0\0\3\1\0\0\0\0X\0\0\10\3def\6nagios\21nagios_logentries\21nagios_logentries\rlogentry_data\rlogentry_data\f\10\0\377\0\0\0\375\1\0\0\0\0X\0\0\t\3def\6nagios\21nagios_logentries\21nagios_logentries\rrealtime_data\rrealtime_data\f?\0\6\0\0\0\2\1\0\0\0\0l\0\0\n\3def\6nagios\21nagios_logentries\21nagios_logentries\27inferred_data_extracted\27inferred_data_extracted\f?\0\6\0\0\0\2\1\0\0\0\0\5\0\0\v\376\0\0\"\0H\0\0\f\0011\0011\0232006-12-25
 00:00:13\0232006-12-25 00:00:13\0010\0010\23LOG ROTATION: 
DAILY\0010\0010\5\0\0\r\376\0\0\"\0", 16384) = 937
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] setsockopt(8, SOL_SOCKET, SO_RCVTIMEO, "\2003\341\1\0\0\0\0", 8) = 0
[pid  6683] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid  6683] exit_group(0)               = ?
Process 6683 detached
<... accept resumed> 0xbf9bc5d8, [16])  = ? ERESTARTSYS (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---

cheers,
&rw



-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages ndoutils-nagios2-mysql depends on:
ii  dbconfig-common        1.8.29+etch1      common framework for packaging dat
ii  debconf [debconf-2.0]  1.5.11            Debian configuration management sy
ii  libc6                  2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii  libmysqlclient15off    5.0.32-7etch1     mysql database client library
ii  mysql-client           5.0.32-7etch1     mysql database client (meta packag
ii  mysql-client-5.0 [mysq 5.0.32-7etch1     mysql database client binaries
ii  nagios2                2.6-2+etch1       A host/service/network monitoring 
ii  ucf                    2.0020            Update Configuration File: preserv
ii  zlib1g                 1:1.2.3-13        compression library - runtime

Versions of packages ndoutils-nagios2-mysql recommends:
ii  mysql-server               5.0.32-7etch1 mysql database server (meta packag
ii  mysql-server-5.0 [mysql-se 5.0.32-7etch1 mysql database server binaries

-- debconf information:
  ndoutils-mysql/password-confirm: (password omitted)
  ndoutils-mysql/mysql/admin-pass: (password omitted)
  ndoutils-mysql/mysql/app-pass: (password omitted)
  ndoutils-mysql/app-password-confirm: (password omitted)
* ndoutils-mysql/install-error: ignore
* ndoutils-mysql/mysql/admin-user: root
  ndoutils-mysql/remote/newhost:
  ndoutils-mysql/remote/host:
  ndoutils-mysql/database-type: mysql
  ndoutils-mysql/remove-error: abort
  ndoutils-mysql/remote/port:
* ndoutils-mysql/db/app-user: nagios
* ndoutils-mysql/dbconfig-install: true
  ndoutils-mysql/dbconfig-upgrade: true
  ndoutils-mysql/internal/reconfiguring: false
  ndoutils-mysql/upgrade-error: abort
  ndoutils-mysql/internal/skip-preseed: false
  ndoutils-mysql/upgrade-backup: true
* ndoutils-mysql/mysql/method: unix socket
  ndoutils-mysql/dbconfig-remove:
* ndoutils-mysql/db/dbname: nagios
  ndoutils-mysql/passwords-do-not-match:
  ndoutils-mysql/purge: false
  ndoutils-mysql/dbconfig-reinstall: false




OOe. Gesundheits- und Spitals-AG
Techcenter, Hafenstrasse 47-51, 4020 Linz
DVR 2107870, ATU 51928204, Firmenbuchgericht: Landesgericht Linz, FN 210146 p





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to