Nagios 3.0rc3 can't execute plugins on NetBSD 4.0

Magnus Bergroth bergroth at nordu.net
Thu Mar 6 21:45:18 CET 2008


Hi,

I have a new installation of Nagios 3.0rc3 on a NetBSD 4.0 Server. It has a
basic configuration just monitoring the local host. But it can't execute the
nagios plugins. I found that something goes wrong when 
run_async_service_check() in checks.c calls close_command_file(). If I
exclude close_command_file() it starts working. Going deeper, 
close_command_file() in utils.c calls shutdown_command_file_worker_thread()
that calls pthread_join(worker_threads[COMMAND_WORKER_THREAD],NULL).
Excluding pthread_join() and the plugins starts to work.

The call for close_command_file was added what I can see in rev 1.156 of 
checks.c. 

It looks like pthread on NetBSD dosen't work but as the close_command_file is
called from the child process should it call pthread_join?



The log nagios.log:
[1204817958] Warning: The check of service 'PING' on host 'localhost' looks
like it was orphaned (results never came back).  I'm scheduling an immediate
check of the service...


A ktruss of the nagios process
 2901      3 nagios   fork()                      = 16041
  2901      3 nagios   close(0x5)                  = 0
  2901      3 nagios   stop kernel
 16041      1 nagios   emul(netbsd)
 16041      1 nagios   fork                        = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe398, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe398, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   gettimeofday(0xbfbfe3a8, 0) = 0
 16041      1 nagios   _lwp_wakeup(0x1)            Err#19 ENODEV
 16041      1 nagios   sa_yield()                  Err#22 EINVAL
 16041      1 nagios   write(0x2, 0xbb3ffbb0, 0x8b) = 139
       "assertion "unreachable" failed: file
"/home/builds/ab/netbsd-4-0-RELEASE/src/lib/libpthread/pthread.c", line 551,
 function "pthread__idle"\n"
 16041      1 nagios   getpid()                    = 16041, 2901
 16041      1 nagios   kill(0x3ea9, 0x6)           = 0
 16041      1 nagios   SIGABRT SIG_DFL
  2901      3 nagios   resume kernel
  2901      3 nagios   wait4(0x3ea9, 0, 0, 0)      = 16041


Kindly

Magnus


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list