bugfindutils - Bugs: bug #29435, fd_is_cloexec () does not work on...

 
 

bug #29435: fd_is_cloexec () does not work on Fedora buildhosts

Submitter:  James Youngman <jay>
Submitted:  Sun 04 Apr 2010 10:58:02 AM UTC
   
 
Category:  find Severity:  4 - Important
Item Group:  Test suite failure Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Kamil Dudka Open/Closed:  Closed
Release:  4.5.7 Fixed Release:  4.5.8
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 07 Apr 2010 11:10:52 PM UTC, comment #4: 

Fixed in 4.5.8, which I just released.

James Youngman <jay>
Group administrator
Sun 04 Apr 2010 11:36:07 AM UTC, comment #3: 

Great!

built for Fedora as findutils-4.5.7-3.fc14

http://koji.fedoraproject.org/koji/buildinfo?buildID=165369

Kamil Dudka <kdudka>
Sun 04 Apr 2010 11:08:27 AM UTC, comment #2: 

Kamil replied:

  Thank you for the fix!

  With the patch applied, I am able to build the package
  locally and on the build host as well: [...]

I've applied and pushed the patch.

James Youngman <jay>
Group administrator
Sun 04 Apr 2010 10:59:13 AM UTC, comment #1: 

I suspect what's happening is that the library on your build hosts
defined O_CLOEXEC, but your kernel lacks support for it.   fcntl(fd, F_GETFL) may just return the original flags we passed, meaning that it's not a guarantee that the O_CLOEXEC actually had an effect.

Please test the attached alternative patch and let me know if it
solves your problem.


(file #20110)

James Youngman <jay>
Group administrator
Sun 04 Apr 2010 10:58:02 AM UTC, original submission:  

While I was trying to build packages for Fedora, I ran into huge test-suite
failure.  For merely all tests the assertion within complain_about_leaky_fds
() failed on the descriptor 3 or 4.

Poking around, I discovered the function fd_is_cloexec () does not work
there.  As it seems to be kernel specific, I haven't been able to reproduce
it locally.

Here is a minimal example:

int main()
{
 const int fd = open(".", O_RDONLY|O_CLOEXEC);
 if (-1 == fd)
   return EXIT_FAILURE;

 const int flags = fcntl(fd, F_GETFD);
 printf("fcntl(%d, F_GETFD) = 0x%x\n", fd, flags);
 return EXIT_SUCCESS;
}

The call of fnctl () returns 0x0 on the buildhost.

James Youngman <jay>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kdudka (Posted a comment)
  • -email is unavailable- added by jay (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-04-07 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.5.8
    2010-04-04 jay StatusIn Progress Fixed
    2010-04-04 jay Attached File- Added 0001-Fix-open_cloexec-on-hosts-which-ignore-O_CLOEXEC-i.e.patch, #20110

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code