Debian Bug report logs - #594695
munin-node: fw_conntrack plugin reports an incorrect value for total.warning and total.critical

version graph

Package: munin-node; Maintainer for munin-node is Munin Debian Maintainers <packaging@munin-monitoring.org>; Source for munin-node is src:munin.

Reported by: Tom Feiner <feiner.tom@gmail.com>

Date: Sat, 28 Aug 2010 12:48:01 UTC

Severity: minor

Tags: patch

Found in version munin/1.4.5-2

Fixed in version munin/1.4.5-3

Done: Tom Feiner <feiner.tom@gmail.com>

Bug is archived. No further changes may be made.

Forwarded to http://munin-monitoring.org/ticket/1025

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Munin Debian Maintainers <munin-deb-maint@linpro.no>:
Bug#594695; Package munin-node. (Sat, 28 Aug 2010 12:48:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tom Feiner <feiner.tom@gmail.com>:
New Bug report received and forwarded. Copy sent to Munin Debian Maintainers <munin-deb-maint@linpro.no>. (Sat, 28 Aug 2010 12:48:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Tom Feiner <feiner.tom@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: munin-node: fw_conntrack plugin reports an incorrect value for total.warning and total.critical
Date: Sat, 28 Aug 2010 15:46:04 +0300
Package: munin-node
Version: 1.4.5-2
Severity: minor

Opening this bug following [1], [2]:

From [1]:
---------------------------------
The fw_conntrack plugin reports a wildly incorrect value for
total.warning and total.critical:

# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
65536

# ./fw_conntrack config
...
total.warning 4
total.critical 5

The plugin is only reading the first character of the ip_conntrack_max value.
---------------------------------


[1] http://sourceforge.net/mailarchive/forum.php?thread_name=9B18F4AC-768C-4606-A5C9-E486409F895E%40antsclimbtree.com&forum_name=munin-users
[2] http://sourceforge.net/mailarchive/forum.php?thread_name=20100825160213.544238a3%40csupomona.edu&forum_name=munin-users




Information forwarded to debian-bugs-dist@lists.debian.org, Munin Debian Maintainers <munin-deb-maint@linpro.no>:
Bug#594695; Package munin-node. (Tue, 07 Sep 2010 17:00:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerald Turner <gturner@unzane.com>:
Extra info received and forwarded to list. Copy sent to Munin Debian Maintainers <munin-deb-maint@linpro.no>. (Tue, 07 Sep 2010 17:00:08 GMT) Full text and rfc822 format available.

Message #10 received at 594695@bugs.debian.org (full text, mbox, reply):

From: Gerald Turner <gturner@unzane.com>
To: Holger Levsen <holger@layer-acht.org>
Cc: 595899@bugs.debian.org, 594695@bugs.debian.org, control@bugs.debian.org
Subject: Re: Bug#595899: munin-node: snort_* scripts fail to 'config' due to bashism
Date: Tue, 07 Sep 2010 09:26:44 -0700
Holger Levsen <holger@layer-acht.org> writes:

> Hi Gerald,
>
> thanks for your bugreport, the changes needed are small enough so that
> we can still fix them despite the freeze. Also having things work with
> dash is a releasegoal :)
>

Excellent.

BTW, I believe bug #594695 (fw_conntrack) is also a bashism, at least
switching to #!/bin/bash bypassed the bug for me, I'll see if I can
debug why.

-- 
Gerald Turner  Email: gturner@unzane.com  JID: gturner@jabber.unzane.com
GPG: 0xFA8CD6D5  21D9 B2E8 7FE7 F19E 5F7D  4D0C 3FA0 810F FA8C D6D5




Information forwarded to debian-bugs-dist@lists.debian.org, Munin Debian Maintainers <munin-deb-maint@linpro.no>:
Bug#594695; Package munin-node. (Tue, 07 Sep 2010 17:57:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerald Turner <gturner@unzane.com>:
Extra info received and forwarded to list. Copy sent to Munin Debian Maintainers <munin-deb-maint@linpro.no>. (Tue, 07 Sep 2010 17:57:05 GMT) Full text and rfc822 format available.

Message #15 received at 594695@bugs.debian.org (full text, mbox, reply):

From: Gerald Turner <gturner@unzane.com>
To: 594695@bugs.debian.org
Subject: Use of shell built-in read behaves different between bash/dash
Date: Tue, 07 Sep 2010 10:53:32 -0700
Hello, looks like the bug in fw_conntrack is a bashism with the use of
the shell built-in read.

  $ read MAX < /proc/sys/net/ipv4/netfilter/ip_conntrack_max

  # bash:
  $ echo $MAX
  65536

  # dash (and zsh too!):
  $ echo $MAX
  6

Surprisingly I couldn't find any info on 'read' behavior with stdin,
perhaps this should be documented on https://wiki.ubuntu.com/DashAsBinSh
which has some other 'read' related bits.

Fix was to modify these lines:

        if [ -f /proc/sys/net/ipv4/ip_conntrack_max ] ; then
            read MAX </proc/sys/net/ipv4/ip_conntrack_max
        elif [ -f /proc/sys/net/ipv4/netfilter/ip_conntrack_max ]; then
             read MAX < /proc/sys/net/ipv4/netfilter/ip_conntrack_max
        fi

With:

        if [ -f /proc/sys/net/ipv4/ip_conntrack_max ] ; then
            MAX=$(cat /proc/sys/net/ipv4/ip_conntrack_max)
        elif [ -f /proc/sys/net/ipv4/netfilter/ip_conntrack_max ]; then
             MAX=$(cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max)
        fi

-- 
Gerald Turner  Email: gturner@unzane.com  JID: gturner@jabber.unzane.com
GPG: 0xFA8CD6D5  21D9 B2E8 7FE7 F19E 5F7D  4D0C 3FA0 810F FA8C D6D5




Added tag(s) patch. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Wed, 08 Sep 2010 09:09:03 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Thu, 09 Sep 2010 14:39:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Munin Debian Maintainers <munin-deb-maint@linpro.no>:
Bug#594695; Package munin-node. (Wed, 29 Sep 2010 19:51:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christoph Biedl <debian.axhn@manchmal.in-ulm.de>:
Extra info received and forwarded to list. Copy sent to Munin Debian Maintainers <munin-deb-maint@linpro.no>. (Wed, 29 Sep 2010 19:51:04 GMT) Full text and rfc822 format available.

Message #24 received at 594695@bugs.debian.org (full text, mbox, reply):

From: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
To: Gerald Turner <gturner@unzane.com>
Cc: 594695@bugs.debian.org
Subject: Re: Use of shell built-in read behaves different between bash/dash
Date: Wed, 29 Sep 2010 21:40:02 +0200
[Message part 1 (text/plain, inline)]
Came across this after I filed my bugreport ...

Gerald Turner wrote:

> Hello, looks like the bug in fw_conntrack is a bashism with the use of
> the shell built-in read.

bashism is not the right word for it.

>   $ read MAX < /proc/sys/net/ipv4/netfilter/ip_conntrack_max
> 
>   # bash:
>   $ echo $MAX
>   65536
> 
>   # dash (and zsh too!):
>   $ echo $MAX
>   6

The difference is: bash reads buffers, dash (and also probably zsh)
reads single bytes, something the /proc/sys/ interface doesn't like.

Personally, I'd like to call that a kernel bug while other just tend
to say that procfs isn't fully POSIX compliant and therefore it's SEP.

There's a bugreport against dash[1], and mine against the kernel[2].
However, I doubt any of these will have any effect soon.

    Christoph

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595063
[2] https://bugzilla.kernel.org/show_bug.cgi?id=19182

[signature.asc (application/pgp-signature, inline)]

Reply sent to Tom Feiner <feiner.tom@gmail.com>:
You have taken responsibility. (Tue, 05 Oct 2010 16:51:15 GMT) Full text and rfc822 format available.

Notification sent to Tom Feiner <feiner.tom@gmail.com>:
Bug acknowledged by developer. (Tue, 05 Oct 2010 16:51:15 GMT) Full text and rfc822 format available.

Message #29 received at 594695-close@bugs.debian.org (full text, mbox, reply):

From: Tom Feiner <feiner.tom@gmail.com>
To: 594695-close@bugs.debian.org
Subject: Bug#594695: fixed in munin 1.4.5-3
Date: Tue, 05 Oct 2010 16:47:11 +0000
Source: munin
Source-Version: 1.4.5-3

We believe that the bug you reported is fixed in the latest version of
munin, which is due to be installed in the Debian FTP archive:

munin-common_1.4.5-3_all.deb
  to main/m/munin/munin-common_1.4.5-3_all.deb
munin-java-plugins_1.4.5-3_all.deb
  to main/m/munin/munin-java-plugins_1.4.5-3_all.deb
munin-node_1.4.5-3_all.deb
  to main/m/munin/munin-node_1.4.5-3_all.deb
munin-plugins-extra_1.4.5-3_all.deb
  to main/m/munin/munin-plugins-extra_1.4.5-3_all.deb
munin_1.4.5-3.diff.gz
  to main/m/munin/munin_1.4.5-3.diff.gz
munin_1.4.5-3.dsc
  to main/m/munin/munin_1.4.5-3.dsc
munin_1.4.5-3_all.deb
  to main/m/munin/munin_1.4.5-3_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 594695@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Tom Feiner <feiner.tom@gmail.com> (supplier of updated munin package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 05 Oct 2010 14:02:43 +0200
Source: munin
Binary: munin-node munin-plugins-extra munin-java-plugins munin munin-common
Architecture: source all
Version: 1.4.5-3
Distribution: unstable
Urgency: low
Maintainer: Munin Debian Maintainers <munin-deb-maint@linpro.no>
Changed-By: Tom Feiner <feiner.tom@gmail.com>
Description: 
 munin      - network-wide graphing framework (grapher/gatherer)
 munin-common - network-wide graphing framework (common)
 munin-java-plugins - network-wide graphing framework (java plugins for node)
 munin-node - network-wide graphing framework (node)
 munin-plugins-extra - network-wide graphing framework (user contributed plugins for nod
Closes: 581363 594528 594695 595899 597599
Changes: 
 munin (1.4.5-3) unstable; urgency=low
 .
   [ Tom Feiner ]
   * Added patch 101-dash-bash-fw_conntrack.patch, fixing fw_conntrack
     plugin which reports incorrect values for total.warning
     and total.critical (Closes: #594695)
   * Added patch 102-snort-bashism.patch fixing snort_* config bashism.
     Thanks to Gerald Turner for the patch (Closes: #595899).
   * Existence of /etc/apache2/conf.d/ does not mean apache2 is installed.
     (Closes: #581363)
   * Add patch to adapt ejabberd CLI to ejabberd version found in squeeze.
     Thanks to Gerald Turner for the patch! (Closes: #597599)
 .
   [ Holger Levsen ]
   * Added some tipps to get started into README.Debian. (Closes: #594528)
Checksums-Sha1: 
 d772702c96d86586cfe57d2b9f7b9ec310790b37 1498 munin_1.4.5-3.dsc
 8eb5a6c9016b71c67265021f63dc66577eb19570 38275 munin_1.4.5-3.diff.gz
 27ea30a44f64626e636b94100496ad2873c829b8 83088 munin-common_1.4.5-3_all.deb
 fd59a049e6b5c4a4ce85deea67e7ff643e608d0f 209686 munin_1.4.5-3_all.deb
 245a9f2b323416e22b4ab25a7fe7473b881f9754 392134 munin-node_1.4.5-3_all.deb
 9f3116221c6ee65c71e038b9c6a7d089e06d6e6b 108982 munin-plugins-extra_1.4.5-3_all.deb
 38989000e8f2ff72ad2fdcd67ba2e5bcbe1387be 119652 munin-java-plugins_1.4.5-3_all.deb
Checksums-Sha256: 
 25884bc022a8cb2e1ef4975ac80299e0df667b4ce213f97c30167d319b8f52eb 1498 munin_1.4.5-3.dsc
 fafed7b17351582c2396adba8858de6ade4207ba9aaf2746dec51bb12e5454b5 38275 munin_1.4.5-3.diff.gz
 d692bbdd3f8a1a9e8d715aa498d3212b787079f7b294152de01133364f323d48 83088 munin-common_1.4.5-3_all.deb
 8d8e3c666915d2840380be69a7a73f355a606127cbfce79a6bcfbcc3e4065ed5 209686 munin_1.4.5-3_all.deb
 ca0d6490c333b6ecf7138e6b105b7dd74fe8dbc8d63a9a7bc11de835645d067c 392134 munin-node_1.4.5-3_all.deb
 d6f24e23981248dd967d482080d68a375b13664b17b05009a2ea4f822aef6267 108982 munin-plugins-extra_1.4.5-3_all.deb
 5106e630231748b7aa3102e2f8b36bc0c40c49d2c76cee71534aa98bc3507929 119652 munin-java-plugins_1.4.5-3_all.deb
Files: 
 d24e746acddcb9a96ea5f875a89520df 1498 net optional munin_1.4.5-3.dsc
 b6bdc46ad3df71fd35f96fba5785c9c8 38275 net optional munin_1.4.5-3.diff.gz
 3d2958e768f7e1adfe207e23428686a0 83088 net optional munin-common_1.4.5-3_all.deb
 d7c37a7f2200b6e044c4fd347fbf6ddc 209686 net optional munin_1.4.5-3_all.deb
 6d425bfdd3917e76056a1ab8f0d0c6f9 392134 net optional munin-node_1.4.5-3_all.deb
 59cce2e474a80e7b9f74c456e454bad4 108982 net optional munin-plugins-extra_1.4.5-3_all.deb
 a2e54d7e53f338db0169b70d9e9469c3 119652 net optional munin-java-plugins_1.4.5-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFMq1UaUHLQNqxYNSARAoalAJ9v6ZdZo3RkDd+PiYm6ipHdBQIgKgCgig8R
plGnSrDn+JtRRWsrM421p8g=
=UpiQ
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 14 Nov 2010 07:38:11 GMT) Full text and rfc822 format available.

Bug unarchived. Request was from Daniel Hahler <debian-bugs@thequod.de> to control@bugs.debian.org. (Wed, 26 Jan 2011 22:33:03 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'http://munin-monitoring.org/ticket/1025'. Request was from Daniel Hahler <debian-bugs@thequod.de> to control@bugs.debian.org. (Wed, 26 Jan 2011 22:33:03 GMT) Full text and rfc822 format available.

Bug archived. Request was from Daniel Hahler <debian-bugs@thequod.de> to control@bugs.debian.org. (Wed, 26 Jan 2011 22:33:04 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Jan 6 15:39:51 2016; Machine Name: buxtehude

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.