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

 
 

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

Submitted by:  James Youngman <jay>
Submitted on:  Sun 04 Apr 2010 10:58:02 AM UTC  
 
Category: findSeverity: 4 - Important
Item Group: Test suite failureStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Kamil DudkaOpen/Closed: Closed
Release: 4.5.7Fixed Release: 4.5.8

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fixed in 4.5.8, which I just released.

James Youngman <jay>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 07 Apr 2010 11:10:52 PM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.5.8
    Sun 04 Apr 2010 11:08:27 AM UTCjayStatusIn Progress=>Fixed
    Sun 04 Apr 2010 10:59:13 AM UTCjayAttached File-=>Added 0001-Fix-open_cloexec-on-hosts-which-ignore-O_CLOEXEC-i.e.patch, #20110

    Back to the top


    Powered by Savane 3.1-cleanup1