Bug 500837 - btt: Too many open files
Summary: btt: Too many open files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: blktrace
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Edward Shishkin
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-14 13:24 UTC by Milos Malik
Modified: 2023-09-14 01:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-02 13:07:46 UTC
Target Upstream Version:
Embargoed:


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

Description Milos Malik 2009-05-14 13:24:03 UTC
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 14:39:09 UTC
Created attachment 343978 [details]
trace file generated on i386

Comment 3 Milos Malik 2009-05-14 14:40:15 UTC
Created attachment 343980 [details]
another trace file generated on i386

Comment 4 Milos Malik 2009-05-14 14:52:10 UTC
Created attachment 343982 [details]
strace output when running btt with sda.blktrace.2

Comment 5 Milos Malik 2009-05-14 14:53:06 UTC
Created attachment 343983 [details]
strace output when running btt with sda.blktrace.3

Comment 6 Eric Sandeen 2009-05-14 18:31:01 UTC
# 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 16:44:52 UTC
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 Program Management 2009-11-06 19:24:56 UTC
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 16:12:20 UTC
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 18:12:26 UTC

*** This bug has been marked as a duplicate of bug 515551 ***

Comment 14 Edward Shishkin 2009-12-17 13:11:57 UTC
The small cleanup (endianness annotation for sparce checker) has been sent to the rhkernel-list

Comment 16 RHEL Program Management 2010-08-09 18:50:50 UTC
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 Program Management 2013-05-01 06:46:57 UTC
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 Program Management 2014-03-07 12:44:14 UTC
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 Program Management 2014-06-02 13:07:46 UTC
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).

Comment 20 Red Hat Bugzilla 2023-09-14 01:16:19 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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