Bug 500837 - btt: Too many open files [NEEDINFO]
btt: Too many open files
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: blktrace (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Edward Shishkin
BaseOS QE
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-14 09:24 EDT by Milos Malik
Modified: 2015-10-19 08:11 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-02 09:07:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
pm-rhel: needinfo? (mmalik)


Attachments (Terms of Use)
trace file generated on i386 (427.94 KB, application/octet-stream)
2009-05-14 10:39 EDT, Milos Malik
no flags Details
another trace file generated on i386 (2.92 MB, application/octet-stream)
2009-05-14 10:40 EDT, Milos Malik
no flags Details
strace output when running btt with sda.blktrace.2 (42.67 KB, application/x-gzip)
2009-05-14 10:52 EDT, Milos Malik
no flags Details
strace output when running btt with sda.blktrace.3 (56.79 KB, application/x-gzip)
2009-05-14 10:53 EDT, Milos Malik
no flags Details

  None (edit)
Description Milos Malik 2009-05-14 09:24:03 EDT
Description of problem:
btt does something weird with files. Maybe it calls too much open() and forgets to call close().
The larger the trace file, the more "Too many open files" messages you will see.

Version-Release number of selected component (if applicable):
RHEL5.4-Server-20090513.nightly
kernel-PAE-2.6.18-146.el5
blktrace-1.0.0-6.el5

How reproducible:
always

Steps to Reproduce:
# blktrace -d /dev/sda -w 30
# ls -l *.blktrace.*
-rw-r--r-- 1 root root 389344 May 14 09:00 sda.blktrace.0
-rw-r--r-- 1 root root      0 May 14 09:00 sda.blktrace.1
-rw-r--r-- 1 root root      0 May 14 09:00 sda.blktrace.2
-rw-r--r-- 1 root root   5584 May 14 09:00 sda.blktrace.3
-rw-r--r-- 1 root root      0 May 14 09:00 sda.blktrace.4
-rw-r--r-- 1 root root      0 May 14 09:00 sda.blktrace.5
-rw-r--r-- 1 root root  53200 May 14 09:00 sda.blktrace.6
-rw-r--r-- 1 root root   2704 May 14 09:00 sda.blktrace.7
# btt -m s1 -s s2 -i sda.blktrace.6 > /dev/null
s2_3087,589824_q2q_r.dat: Too many open files
s2_3087,589824_q2q_w.dat: Too many open files
s2_3087,589824_q2q_c.dat: Too many open files
s1_3087,589824_q2q.dat: Too many open files
s2_3087,524288_d2d_r.dat: Too many open files
s2_3087,524288_d2d_w.dat: Too many open files
s2_3087,524288_d2d_c.dat: Too many open files
s1_3087,524288_d2d.dat: Too many open files
s2_3087,524288_q2q_r.dat: Too many open files
s2_3087,524288_q2q_w.dat: Too many open files
s2_3087,524288_q2q_c.dat: Too many open files
s1_3087,524288_q2q.dat: Too many open files
s2_1026,589824_d2d_r.dat: Too many open files
s2_1026,589824_d2d_w.dat: Too many open files
s2_1026,589824_d2d_c.dat: Too many open files
s1_1026,589824_d2d.dat: Too many open files
s2_1026,589824_q2q_r.dat: Too many open files
s2_1026,589824_q2q_w.dat: Too many open files
s2_1026,589824_q2q_c.dat: Too many open files
s1_1026,589824_q2q.dat: Too many open files
s2_3074,393216_d2d_r.dat: Too many open files
s2_3074,393216_d2d_w.dat: Too many open files
s2_3074,393216_d2d_c.dat: Too many open files
s1_3074,393216_d2d.dat: Too many open files
s2_3074,393216_q2q_r.dat: Too many open files
s2_3074,393216_q2q_w.dat: Too many open files
s2_3074,393216_q2q_c.dat: Too many open files
s1_3074,393216_q2q.dat: Too many open files
# echo $?
0
  
Actual results:
a lot of "Too many open files" messages

Expected results:
no "Too many open files" messages
Comment 2 Milos Malik 2009-05-14 10:39:09 EDT
Created attachment 343978 [details]
trace file generated on i386
Comment 3 Milos Malik 2009-05-14 10:40:15 EDT
Created attachment 343980 [details]
another trace file generated on i386
Comment 4 Milos Malik 2009-05-14 10:52:10 EDT
Created attachment 343982 [details]
strace output when running btt with sda.blktrace.2
Comment 5 Milos Malik 2009-05-14 10:53:06 EDT
Created attachment 343983 [details]
strace output when running btt with sda.blktrace.3
Comment 6 Eric Sandeen 2009-05-14 14:31:01 EDT
# strace -oblah btt -m s1 -s s2 -i sda.blktrace.2 > /dev/null
# grep open blah  | grep -v EMFILE | wc -l
1023

yup ...

seems to be a result of weird major/minors in the trace:

# blkparse /tmp/test/sda.blktrace.2
...
  8,0    2     1292 12971.382420776   320  Q   W 216490461 + 8 [pdflush]
  8,0    2     1293 12971.382421362   320  B   W 216490461 + 8 [pdflush]
  8,0    2     1294 12971.382426071   320  M   W 216490461 + 8 [pdflush]
1026,720896  2     1295 12971.382445433   320  A   W 216281240 + 8 <- (253,0) 216281624
...

# grep 1026,720896 /tmp/test/blah
open("s2_1026,720896_d2d_r.dat", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EMFILE (Too many open files)
write(2, "s2_1026,720896_d2d_r.dat: Too ma"..., 46) = 46
open("s2_1026,720896_d2d_w.dat", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EMFILE (Too many open files)
write(2, "s2_1026,720896_d2d_w.dat: Too ma"..., 46) = 46

...

those lines in the trace are remaps ... I guess you were tracing sda, and had an lvm volume w/ major 253, minor 0 over that?  But those are some really strange remaps.

do you see this same thing w/ older versions of blktrace in brew?

-Eric
Comment 10 Eric Sandeen 2009-07-02 12:44:52 EDT
Some of the later bugs for blktrace didn't make it for RHEL5.4, but we can get to them in RHEL5.5.

Thanks,
-Eric
Comment 11 RHEL Product and Program Management 2009-11-06 14:24:56 EST
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 12 Edward Shishkin 2009-12-16 11:12:20 EST
This was caused by format change: the user-space blktrace package was updated while the kernel still issues traces in old format. This is fixed in the latest kernels.
Comment 13 Edward Shishkin 2009-12-16 13:12:26 EST

*** This bug has been marked as a duplicate of bug 515551 ***
Comment 14 Edward Shishkin 2009-12-17 08:11:57 EST
The small cleanup (endianness annotation for sparce checker) has been sent to the rhkernel-list
Comment 16 RHEL Product and Program Management 2010-08-09 14:50:50 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 17 RHEL Product and Program Management 2013-05-01 02:46:57 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 18 RHEL Product and Program Management 2014-03-07 07:44:14 EST
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.
Comment 19 RHEL Product and Program Management 2014-06-02 09:07:46 EDT
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).

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