Bug 59016 - /usr/bin/foomatic-combo-xml does not close files
Summary: /usr/bin/foomatic-combo-xml does not close files
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: foomatic (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: All Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2002-01-29 12:19 UTC by Alain D D Williams
Modified: 2007-04-18 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-29 17:48:12 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Alain D D Williams 2002-01-29 12:19:16 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.14-12b i686)

Description of problem:
Run  printtool under 'strace -f' and you will see that the file number returned
by open() gets to be very large (956 on my box). It seems as if the program is
not closing files once it has read them, not good practice.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. strace -f -o /tmp/trout printtool
2. Just close printtool down
3. emacs /tmp/trout
Look for:
and note the file number returned.

Expected Results:  The file descriptor should be a much smaller number.

Additional info:

Comment 1 Tim Waugh 2002-01-29 15:23:39 UTC
Do you have the printing updates applied?  This should already be fixed.

Comment 2 Alain D D Williams 2002-01-29 17:30:10 UTC
I have updated with printconf-0.3.52-1.i386.rpm &
It still does it.
Appended is part of the strace, you will see that it does attempt to close, but
seems to be closing some random value rather than the proper file descriptor:

25569 open("/usr/share/foomatic/db/source/printer/Sharp-AJ-2100.xml", O_RDONLY)
= 991
25569 fstat64(991, {st_mode=S_IFREG|0644, st_size=846, ...}) = 0
= 0x4052f000
25569 read(991, "\n<printer id=\"printer/Sharp-AJ-2"..., 1048576) = 846
25569 read(991, "", 1044480)            = 0
25569 brk(0x8104000)                    = 0x8104000
25569 read(991, "", 1048576)            = 0
25569 close(135277528)                  = -1 EBADF (Bad file descriptor)
25569 open("/usr/share/foomatic/db/source/printer/Star-JJ-100.xml", O_RDONLY) =

Comment 3 Tim Waugh 2002-01-29 17:32:36 UTC
Please confirm the version of foomatic that you are using.

Comment 4 Alain D D Williams 2002-01-29 17:46:13 UTC
Just before that last comment I applied both: Omni-foomatic-0.5.0-4.i386.rpm &
Omni-0.5.0-4.i386.rpm (as well as ghostscript-6.51-16.i386.rpm) since
printconf-0.3.52 depends on all of these RPMs.

These are, however, the only updates on what is otherwise a vanilla 7.2 system.
(Others will be
applied over the next few days as I make it ready for production).

Comment 5 Tim Waugh 2002-01-29 17:48:07 UTC
Not Omni-foomatic, foomatic.

What does 'rpm -q foomatic' say?

Comment 6 Alain D D Williams 2002-01-29 18:29:34 UTC
rpm -q foomatic gives:
I noticed  foomatic-1.1-0.20011018.7.i386.rpm, installed it and ran the test
again. It is now fixed,
opening those files of fd 4.

So cured. Thanks for your time, sorry if it was wasted.

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