Bug 1028729 - I/O workload report can fail with division by zero on lightly loaded disks
I/O workload report can fail with division by zero on lightly loaded disks
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: sysusage (Show other bugs)
21
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Christopher Meng
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-09 22:39 EST by Frank Crawford
Modified: 2015-12-02 11:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-01 22:02:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix division by zero (551 bytes, patch)
2013-11-09 22:39 EST, Frank Crawford
no flags Details | Diff

  None (edit)
Description Frank Crawford 2013-11-09 22:39:55 EST
Created attachment 822027 [details]
Patch to fix division by zero

Description of problem:
I/O workload reports can be generated by sysusage but at times when there is no activity on the device then sysusage or rsysusage, for remote devices, will fail with a division by zero error and not update the following stats.

Version-Release number of selected component (if applicable):
sysusage-5.3-1.fc19.noarch

How reproducible:
100% when disk has no activity

Steps to Reproduce:
1. Enable 1/O workload reporting (e.g. dev:md5:7200:1:2)
2. Ensure no activity on device
3. View output

Actual results:
sysusage outputs:
Illegal division by zero at /usr/bin/sysusage line 537.
and no stats are update past the failed device.

Expected results:
Workload is reported as zero and all stats are updated correctly.

Additional info:
The issues is cause by the testing if the string "0.00" is a false value rather than the floating point number 0.00 is false.

A patch for sysusage is attached.  A similar one is required for rsysusage.
Comment 1 Frank Crawford 2013-11-09 23:40:10 EST
This has also been reported upstream to <gilles@darold.net>.
Comment 2 Frank Crawford 2013-11-12 04:58:22 EST
A fix for this has now been pushed into the upstream git repository by Gilles.
Comment 3 Peter Robinson 2013-11-12 06:39:52 EST
(In reply to Frank Crawford from comment #2)
> A fix for this has now been pushed into the upstream git repository by
> Gilles.

Do you have the commit? Does he plan to release a new version?
Comment 4 Frank Crawford 2013-11-12 06:46:23 EST
Below is from Gilles, although no hint about plans to release a new version.  It was the first patch in over a year.
----
Hi Frank,

Thanks for the patch, it has been applied on github source code
(https://github.com/darold/sysusage). rsysusage have been patch too. See
commit 6f6864c for details.

Regards,

-- 
Gilles
GPL tools at http://www.darold.net/
(squidclamav - sendmailanalyzer - ora2pg - modproxyhtml
squidguardmgr - sysusage - squidanalyzer - pgbadger - pgformatter)
Comment 5 Fedora End Of Life 2015-01-09 15:32:42 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Frank Crawford 2015-01-09 20:57:49 EST
I've bumped this to Fedora 21 as it still exists.  While the update is on github, there is yet to be a new release.

Any chance you can apply the original patch to the Fedora distribution, or base it on the latest github version and not the current release?
Comment 7 Fedora End Of Life 2015-11-04 09:16:21 EST
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2015-12-01 22:02:06 EST
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.