Bug 436191

Summary: iostat with -n flag continously creates new open file handles.
Product: Red Hat Enterprise Linux 5 Reporter: Christopher Karel <chrisk>
Component: sysstatAssignee: Ivana Varekova <varekova>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: low    
Version: 5.1CC: ddumas, gbradner, syeghiay
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-08 08:07:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christopher Karel 2008-03-05 20:41:01 UTC
Description of problem:
When using the -n flag, iostat creates new open file handles while running, and
fails to close them.  One new handle opening /proc/<iostat's-PID>/mountstats per
interval.

     Version-Release number of selected components:
# rpm -q sysstat
sysstat-7.0.0-3.el5
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
# uname -a
Linux hostname 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64


     Steps to Reproduce:
1. Run iostat with the -n flag, and an interval value.  (EG:  iostat -n 1)
2. Use lsof to determine the number of open files for a process.
3. Iostat will eventually crash because of too many open files.
  
     Examples:
1. Start an iostat command running in one terminal window:  iostat -n 1
2. In another terminal window, monitor open file usage with lsof:  lsof -c
/iostat/ | wc
3. Rerunning the lsof command above will return with an ever increasing number
of open files.
4. After 17 minutes and 2 seconds of running, iostat will crash with the error:
 "fopen: Too many open files"

     Output:
# time iostat -n 1 > /dev/null &
[2]     2525
# lsof -c /iostat/ | wc
      22     195    1624
# lsof -c /iostat/ | wc
      38     339    2872
# lsof -c /iostat/ | wc
     259    2328   20110
# lsof -c /iostat/ | wc
     306    2751   23776
# lsof -c /iostat/ | wc
     507    4560   39454
# lsof -c /iostat/ | wc
     959    8628   74710
# fopen: Too many open files

real    17m2.04s
user    0m0.08s
sys     0m0.94s

Comment 1 Denise Dumas 2008-08-07 19:58:53 UTC
one command patch, no problem - Fast Trackable

Comment 2 Ivana Varekova 2008-08-14 13:59:57 UTC
Fixed in sysstat-7.0.2-1.el5.

Comment 7 errata-xmlrpc 2008-10-08 08:07:11 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0899.html

Comment 8 Greg Bradner 2009-12-01 23:18:03 UTC
(In reply to comment #2)
> Fixed in sysstat-7.0.2-1.el5.  

I have sysstat-7.0.2-3.el5 installed on RHEL 5.3 and it is not fixed.

Comment 9 Greg Bradner 2009-12-01 23:18:52 UTC
So sorry. Wrong ticket.