bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-cloexec.c:97: assertion failed


From: Richard W.M. Jones
Subject: Re: test-cloexec.c:97: assertion failed
Date: Mon, 8 Oct 2012 22:50:30 +0100
User-agent: Mutt/1.5.20 (2009-12-10)

On Mon, Oct 08, 2012 at 07:53:26PM +0200, Jim Meyering wrote:
> Richard W.M. Jones wrote:
> > Turning off coredumps reveals a load more problems.  I wonder if the
> > latest glibc in Fedora Rawhide is broken?
> >
> > test-dup2.c:173: assertion failed
> > #   ASSERT (!is_inheritable (fd + 1));
> >
> > test-dup3.c:108: assertion failed
> > #      ASSERT (dup3 (fd, fd, o_flags) == -1);
> >
> > test-fcntl.c:291: assertion failed
> > #  ASSERT (!is_inheritable (fd + 2));
> 
> Hi Rich,
> Thanks for the report!  That is suspicious, indeed.
> In coreutils, I confirm that there are three brand new failures
> that were not present in rawhide a day or two ago:
> 
>     ../build-aux/test-driver: line 95: 27442 Aborted "$@" > $log_file 2>&1
>     FAIL: test-cloexec
>     ...
>     ../build-aux/test-driver: line 95: 27545 Aborted "$@" > $log_file 2>&1
>     FAIL: test-dup2
>     ...
>     ../build-aux/test-driver: line 95: 27828 Aborted "$@" > $log_file 2>&1
>     FAIL: test-fcntl

Thanks Jim.

I'm suspicious this is a kernel bug:

creat("test-cloexec.tmp", 0600)         = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
fcntl(3, F_SETFD, 0)                    = 0
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_DUPFD_CLOEXEC, 0)            = 4
fcntl(4, F_GETFD)                       = 0
write(2, "test-cloexec.c:97: assertion failed\n", 36) = 36

It seems to me from the description in the man page that
F_DUPFD_CLOEXEC ought to be setting the FD_CLOEXEC flag on file
descriptor 4, so either it's not or else F_GETFD isn't reading the
flag for some reason.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top



reply via email to

[Prev in Thread] Current Thread [Next in Thread]