[Bug 598275] Re: read() builtin doesn't work with /proc files containing only an integer value
Brian Murray
brian at ubuntu.com
Mon Oct 17 22:05:52 UTC 2011
** Summary changed:
- munin-node fw_conntrack plugin reports incorrect critical threshold
+ read() builtin doesn't work with /proc files containing only an integer value
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/598275
Title:
read() builtin doesn't work with /proc files containing only an
integer value
Status in “dash” package in Ubuntu:
Confirmed
Status in “dash” package in Debian:
Confirmed
Bug description:
Binary package hint: munin
Ubuntu 10.04 LTS, munin-node 1.4.4-1ubuntu1. On my newly installed
Lucid server, Munin's fw_conntrack plugin reports the "critical"
number of network connects as 5 or 6. This means that I get constant
alerts about having too many network connections. I think this is
actually caused by a bug in dash's built-in read command.
Fw_conntrack gets its max connection number by reading
/proc/sys/net/ipv4/ip_conntrack_max or
/proc/sys/net/ipv4/netfilter/ip_conntrack_max around line 110 of
/usr/share/munin/plugins/fw_conntrack. Like this:
read MAX < /proc/sys/net/ipv4/netfilter/ip_conntrack_max
If I run this in bash:
bash# read MAX < /proc/sys/net/ipv4/netfilter/ip_conntrack_max && echo good: $MAX || echo bad: $MAX
good: 7852
but in dash:
dash# read MAX < /proc/sys/net/ipv4/netfilter/ip_conntrack_max && echo good: $MAX || echo bad: $MAX
bad: 7
So dash's read is failing AND setting $MAX. I imagine this is a bug
in dash, but fw_conntrack is also ignoring the fact that read is
returning failure.
Changing fw_conntrack's #! line to #!/bin/bash works around the
problem, but I wouldn't call that a fix.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/598275/+subscriptions
More information about the foundations-bugs
mailing list