public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11271] New: posix call nftw() leaks file handles on FTW_CHDIR
@ 2010-02-10 22:25 ka5427-536 at online dot de
  2010-02-11  1:54 ` [Bug libc/11271] " ka5427-536 at online dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ka5427-536 at online dot de @ 2010-02-10 22:25 UTC (permalink / raw)
  To: glibc-bugs

It seems that the POSIX call nftw() doesn't clean up correctly when the flag
FTW_CHDIR is used.

Example:

one directory - without containing subdirectories - containing 4 files.

int my_callback()
{   
    return 0;
}

if nftw is called 1000 times as in

   nftw("." , my_callback, 20, FTW_CHDIR)

then I am left with 1000 open file handles afterwards.

-- 
           Summary: posix call nftw() leaks file handles on FTW_CHDIR
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: ka5427-536 at online dot de
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: i?86-*-linux*


http://sourceware.org/bugzilla/show_bug.cgi?id=11271

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/11271] posix call nftw() leaks file handles on FTW_CHDIR
  2010-02-10 22:25 [Bug libc/11271] New: posix call nftw() leaks file handles on FTW_CHDIR ka5427-536 at online dot de
@ 2010-02-11  1:54 ` ka5427-536 at online dot de
  2010-02-11  1:56 ` ka5427-536 at online dot de
  2010-02-11  4:32 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ka5427-536 at online dot de @ 2010-02-11  1:54 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From ka5427-536 at online dot de  2010-02-11 01:54 -------
Created an attachment (id=4586)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4586&action=view)
testcase

source code to reproduce the issue.

download the Makefile attachment and type 

   make

to build.

This should produce two binaries

   ./ok    - which works as expected
   ./buggy - which shows the described bug when executed

the only difference is that the flag FTW_CHDIR is used in ./buggy

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11271

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/11271] posix call nftw() leaks file handles on FTW_CHDIR
  2010-02-10 22:25 [Bug libc/11271] New: posix call nftw() leaks file handles on FTW_CHDIR ka5427-536 at online dot de
  2010-02-11  1:54 ` [Bug libc/11271] " ka5427-536 at online dot de
@ 2010-02-11  1:56 ` ka5427-536 at online dot de
  2010-02-11  4:32 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ka5427-536 at online dot de @ 2010-02-11  1:56 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From ka5427-536 at online dot de  2010-02-11 01:56 -------
Created an attachment (id=4587)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4587&action=view)
Makefile for the testcode

simpy type

   make

to build. See upload comment on 'main.cpp' on how to use the testcase 

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11271

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/11271] posix call nftw() leaks file handles on FTW_CHDIR
  2010-02-10 22:25 [Bug libc/11271] New: posix call nftw() leaks file handles on FTW_CHDIR ka5427-536 at online dot de
  2010-02-11  1:54 ` [Bug libc/11271] " ka5427-536 at online dot de
  2010-02-11  1:56 ` ka5427-536 at online dot de
@ 2010-02-11  4:32 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: drepper at redhat dot com @ 2010-02-11  4:32 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2010-02-11 04:32 -------
Fixed in git.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=11271

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-11  4:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-10 22:25 [Bug libc/11271] New: posix call nftw() leaks file handles on FTW_CHDIR ka5427-536 at online dot de
2010-02-11  1:54 ` [Bug libc/11271] " ka5427-536 at online dot de
2010-02-11  1:56 ` ka5427-536 at online dot de
2010-02-11  4:32 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).