Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 59016 - /usr/bin/foomatic-combo-xml does not close files
/usr/bin/foomatic-combo-xml does not close files
Product: Red Hat Linux
Classification: Retired
Component: foomatic (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2002-01-29 07:19 EST by Alain D D Williams
Modified: 2007-04-18 12:39 EDT (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Alain D D Williams 2002-01-29 07:19:16 EST
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 10:23:39 EST
Do you have the printing updates applied?  This should already be fixed.
Comment 2 Alain D D Williams 2002-01-29 12:30:10 EST
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 12:32:36 EST
Please confirm the version of foomatic that you are using.
Comment 4 Alain D D Williams 2002-01-29 12:46:13 EST
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 12:48:07 EST
Not Omni-foomatic, foomatic.

What does 'rpm -q foomatic' say?
Comment 6 Alain D D Williams 2002-01-29 13:29:34 EST
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.