This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 1001220 - leaked fd
leaked fd
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: expect (Show other bugs)
rawhide
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Vitezslav Crhonek
Fedora Extras Quality Assurance
http://lists.gnu.org/archive/html/bug...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-26 15:18 EDT by Jan Kratochvil
Modified: 2014-09-09 07:41 EDT (History)
5 users (show)

See Also:
Fixed In Version: expect-5.45-18.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-09 07:41:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
fd leak patch (532 bytes, patch)
2014-09-04 09:42 EDT, Matej Mužila
no flags Details | Diff

  None (edit)
Description Jan Kratochvil 2013-08-26 15:18:11 EDT
Description of problem:
runtest leaks fd 

Version-Release number of selected component (if applicable):
dejagnu-1.5.1-3.fc20.noarch
expect-5.45-10.fc20.x86_64
tcl-8.5.14-1.fc20.x86_64

How reproducible:
Always.

Steps to Reproduce:
echo 'remote_exec target "ls -l /proc/self/fd/"' >dejagnuleak.exp
runtest dejagnuleak.exp
cat testrun.log

Actual results:
lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 0 -> /dev/pts/5
lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 1 -> /dev/pts/5
lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 2 -> /dev/pts/5
lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 3 -> /dev/pts/2
lr-x------ 1 jkratoch jkratoch 64 Aug 26 21:15 4 -> /proc/25522/fd

Expected results:
lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 0 -> /dev/pts/5
lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 1 -> /dev/pts/5
lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 2 -> /dev/pts/5
lr-x------ 1 jkratoch jkratoch 64 Aug 26 21:15 3 -> /proc/25522/fd

Additional info:
With RHEL-5/6 versions the fd leak was worse - many fds.
Comment 1 Matej Mužila 2014-09-04 09:42:27 EDT
Created attachment 934436 [details]
fd leak patch

I found out that the problem isn't in dejagnu. The problem seems to be
in expect. 

The problem can be reproduced also by:
echo 'remote_exec target "ls -l /proc/self/fd/"' >dejagnuleak.exp
expect  -- /usr/share/dejagnu/runtest.exp dejagnuleak.exp

Attached patch solves the problem in Fedora 20. I haven't tested 
it in RHEL.

Reassigning to expect...

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