[jim at meyering.net: [Pkg-nagios-devel] Bug#358178: x86_64: avoid `Size... > POSIX-guaranteed...' warning]

sean finney seanius at seanius.net
Tue Mar 21 23:15:19 CET 2006


just got this in the debian BTS...  ethan: what do you think of the patch?  

	sean

----- Forwarded message from Jim Meyering <jim at meyering.net> -----

From: Jim Meyering <jim at meyering.net>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Date: Tue, 21 Mar 2006 15:49:43 +0100
Subject: [Pkg-nagios-devel] Bug#358178: x86_64: avoid `Size... >
	POSIX-guaranteed...' warning

Package: nagios2
Version: 2.0-1
Severity: normal
Tags: patch

Using debian unstable's nagios2 on a 64-bit system, I get this at start-up:

  [1142950705] LOG VERSION: 2.0
  [1142950705] Warning: Size of service_message struct (528 bytes) is > POSIX-guaranteed atomic write size (512 bytes).  Service checks results may get lost or mangled!
  [1142950705] Finished daemonizing... (New PID=18989)

Here's a patch that solves the problem for upstream's
nagios-2-x-bugfixes branch:

	* include/objects.h [MAX_PLUGINOUTPUT_LENGTH]: Decrease length
        by 16, so that `sizeof service_message' is no larger than 512,
        even on x86_64 systems.

Index: include/objects.h
===================================================================
RCS file: /cvsroot/nagios/nagios/include/objects.h,v
retrieving revision 1.10
diff -u -p -r1.10 objects.h
--- include/objects.h	27 Dec 2005 18:55:10 -0000	1.10
+++ include/objects.h	21 Mar 2006 14:33:11 -0000
@@ -45,7 +45,7 @@
 
 #define MAX_HOSTNAME_LENGTH            		64	/* max. host name length */
 #define MAX_SERVICEDESC_LENGTH			64	/* max. service description length */
-#define MAX_PLUGINOUTPUT_LENGTH			348	/* max. length of plugin output */
+#define MAX_PLUGINOUTPUT_LENGTH			332	/* max. length of plugin output */
 
 #define MAX_STATE_HISTORY_ENTRIES		21	/* max number of old states to keep track of for flap detection */
 

FYI, I tried to report it upstream, but was unable to
subscribe to the list:
  http://lists.sourceforge.net/lists/listinfo/nagios-devel
  [502 - List services temporarily unavailable]

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-amd64-k8
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages nagios2 depends on:
ii  libc6                         2.3.6-4    GNU C Library: Shared libraries an
ii  libgd2-xpm                    2.0.33-3   GD Graphics Library version 2
ii  libjpeg62                     6b-12      The Independent JPEG Group's JPEG 
ii  libperl5.8                    5.8.8-3    Shared Perl library
ii  libpng12-0                    1.2.8rel-5 PNG library - runtime
ii  nagios2-common                2.0-1      support files for nagios2
ii  zlib1g                        1:1.2.3-11 compression library - runtime

nagios2 recommends no packages.

-- no debconf information


_______________________________________________
Pkg-nagios-devel mailing list
Pkg-nagios-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-nagios-devel


----- End forwarded message -----

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20060321/14427558/attachment.sig>


More information about the Developers mailing list