[libvirt] getgroups failure [was: Entering freeze for libvirt-1.0.5]

Ruben Kerkhof ruben at rubenkerkhof.com
Fri Apr 26 13:09:29 UTC 2013


Hi Eric,

On Fri, Apr 26, 2013 at 1:03 PM, Eric Blake <eblake at redhat.com> wrote:

> Oh, you did narrow in on the test.  I haven't seen any recent bug-gnulib
> traffic that mentions this test failing on OSX, nor do I have easy
> access to a machine to verify and clean it up myself.  Can you help
> debug the issue?  One thing to look at is whether gnulib is declaring
> the system getgroups() as working or not - what does 'grep GETGROUPS
> config.status' report for you?  Also, it could just be an overly-strict
> test.
>

[ruben at odin ~/src/libvirt-1.0.5]$ grep GETGROUPS config.status
S["REPLACE_GETGROUPS"]="1"
S["HAVE_GETGROUPS"]="1"
S["GNULIB_GETGROUPS"]="IN_LIBVIRT_GNULIB_TESTS"
D["GETGROUPS_T"]=" gid_t"
D["HAVE_GETGROUPS"]=" 1"
D["GNULIB_TEST_GETGROUPS"]=" 1"

Here's a quick gdb session:

[ruben at odin ~/src/libvirt-1.0.5/gnulib/tests]$ gdb ./test-getgroups
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin12.3.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/Users/ruben/src/libvirt-1.0.5/gnulib/tests/test-getgroups...done.
(gdb) b main
Breakpoint 1 at 0x100001327: file test-getgroups.c, line 39.
(gdb) r
Starting program:
/Users/ruben/src/libvirt-1.0.5/gnulib/tests/test-getgroups

Breakpoint 1, main (argc=1, argv=0x7fff5fbffa00) at test-getgroups.c:39
39  errno = 0;
(gdb) n
40  result = getgroups (0, NULL);
(gdb)
41  if (result == -1 && errno == ENOSYS)
(gdb) p result
$1 = 12
(gdb) n
46  ASSERT (0 <= result);
(gdb)
47  ASSERT (result + 1 < SIZE_MAX / sizeof *groups);
(gdb)
48  groups = malloc ((result + 1) * sizeof *groups);
(gdb)
49  ASSERT (groups);
(gdb)
50  groups[result] = -1;
(gdb)
55  if (1 < result)
(gdb)
57      errno = 0;
(gdb)
58      ASSERT (getgroups (result - 1, groups) == -1);
(gdb) s
rpl_getgroups (n=11, group=0x100107cb0) at getgroups.c:54
54 rpl_getgroups (int n, gid_t *group)
(gdb)
60  if (n < 0)
(gdb)
70        return getgroups (n, (GETGROUPS_T *) group);
(gdb)
test-getgroups.c:58: assertion failed
rpl_fflush (stream=0x7fff7cf03bc0) at fflush.c:124
124 rpl_fflush (FILE *stream)

Can you guide me on what to do next?

Thanks,

Ruben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130426/5107061d/attachment-0001.htm>


More information about the libvir-list mailing list