[Pkg-nagios-devel] Bug#401155: nagios-pgsql: Dies after trying to SELECT from a nonexistant database column

Sven Riedel sr at baghus.net
Fri Dec 1 10:38:09 CET 2006


Package: nagios-pgsql
Version: 2:1.4-3
Severity: important


After adding a scheduled downtime for a host via the webinterface, the
nagios main process dies. Doing an strace -s 1024 on the main process
during startup reveals the following:

rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
send(7, "Q\0\0\1`INSERT INTO hostcomments
(host_name,persistent,entry_time,author_name,comment_data) VALUES
(\'foo\\-server\',\'0\',1164960990::int4::abstime::timestamp,\'\\(Nagios
Process\\)\',\'This host has been scheduled for downtime from
12\\-01\\-2006 07\\:42\\:36 to 12\\-01\\-2006 09\\:42\\:36\\.
Notifications for the host will not be sent out during that time
period\\.\')\0", 353, 0) = 353
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
poll([{fd=7, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(7, "C\0\0\0\17INSERT 0 1\0Z\0\0\0\5I", 16384, 0) = 22
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
send(7, "Q\0\0\0:SELECT hostcomment_id FROM hostcomments WHERE
oid=\'0\'\0", 59, 0) = 59
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
poll([{fd=7, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(7, "E\0\0\0WSERROR\0C42703\0Mcolumn \"oid\" does not
exist\0Fparse_expr.c\0L396\0RtransformColumnRef\0\0Z\0\0\0\5I", 16384,
0) = 94
open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 8
writev(8, [{"*** glibc detected *** ", 23}, {"corrupted double-linked
list", 28}, {": 0x", 4}, {"0809ebe8", 8}, {" ***\n", 5}], 5*** glibc
detected *** corrupted double-linked list: 0x0809ebe8 ***
) = 68
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(10825, 10825, SIGABRT)           = 0
--- SIGABRT (Aborted) @ 0 (0) ---

And postgres is right: there is no column hostcomments.oid column 
being set in /usr/share/doc/nagios-pgsql/create_pgsql.

So it looks like two bugs:
- Nagios dying because it's not handling the database error gracefully
  and
- Nagios trying to access a nonexistant column

Regs,
Sven


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages nagios-pgsql depends on:
ii  dbconfig-common              1.8.29      common framework for packaging dat
ii  debconf [debconf-2.0]        1.5.9       Debian configuration management sy
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libdbd-pg-perl               1.49-2      a PostgreSQL interface for Perl 5 
ii  libgd2-noxpm                 2.0.33-5.1  GD Graphics Library version 2 (wit
ii  libjpeg62                    6b-13       The Independent JPEG Group's JPEG 
ii  libpng12-0                   1.2.13-4    PNG library - runtime
ii  libpq4                       8.1.5-1     PostgreSQL C client library
ii  nagios-common                2:1.4-3     A host/service/network monitoring 
ii  postgresql-client-8.1        8.1.5-1     front-end programs for PostgreSQL 
ii  ucf                          2.0017      Update Configuration File: preserv
ii  zlib1g                       1:1.2.3-13  compression library - runtime

Versions of packages nagios-pgsql recommends:
ii  nagios-images                 0.3        Collection of images and icons for

-- debconf information:
  nagios-pgsql/app-password-confirm: (password omitted)
  nagios-pgsql/password-confirm: (password omitted)
  nagios-pgsql/pgsql/app-pass: (password omitted)
  nagios-pgsql/pgsql/admin-pass: (password omitted)
  nagios-pgsql/purge: false
  nagios-pgsql/db/app-user: nagiospgsql
  nagios-pgsql/remote/newhost:
  nagios-pgsql/internal/skip-preseed: false
  nagios-pgsql/passwords-do-not-match:
  nagios-pgsql/pgsql/manualconf:
  nagios-pgsql/remote/host:
  nagios-pgsql/dbconfig-reinstall: false
  nagios-pgsql/install-error: retry
  nagios-pgsql/upgrade-error: abort
  nagios-pgsql/pgsql/no-empty-passwords:
  nagios-pgsql/remote/port:
  nagios-pgsql/database-type: pgsql
  nagios-pgsql/internal/reconfiguring: false
  nagios-pgsql/db/dbname: nagiospgsql
  nagios-pgsql/import-oldsettings:
  nagios-pgsql/dbconfig-remove: true
  nagios-pgsql/dbconfig-upgrade: true
  nagios-pgsql/pgsql/changeconf: false
  nagios-pgsql/pgsql/method: unix socket
* nagios-pgsql/dbconfig-install: false
  nagios-pgsql/pgsql/authmethod-user: ident
  nagios-pgsql/performing_upgrade: true
  nagios-pgsql/remove-error: abort
  nagios-pgsql/pgsql/authmethod-admin: ident
  nagios-pgsql/upgrade-backup: true
  nagios-pgsql/pgsql/admin-user: postgres




More information about the Pkg-nagios-devel mailing list