The kernel defines SOCK_CLOEXEC as include/linux/net.h:#define SOCK_CLOEXEC O_CLOEXEC arch/alpha/include/asm/fcntl.h:#define O_CLOEXEC 010000000 But glibc was defining bits/socket.h: SOCK_CLOEXEC = 02000000 which was correct for x86, but not for alpha. Aurelien Jarno has a patch to fix this in the linked bug report. We already have included patch from that bug report called 6028_all_alpha-fix-SOCK_NONBLOCK.patch that fixes the definition of SOCK_NONBLOCK, but he recently updated it to fix SOCK_CLOEXEC as well after I discovered that it was incorrect: http://sourceware.org/ml/libc-ports/2010-02/msg00013.html The incorrect definition of SOCK_CLOEXEC causes the 'Invalid argument' errors in bug 294470.
can you post an updated 6028_all_alpha-fix-SOCK_NONBLOCK.patch that includes the changes you need ?
Created attachment 222561 [details, diff] Just the updated patch in the RH bugzilla This should do it. I'm not sure how glibc's ebuild does the patching, but I think this should work. We've got a bug that depends on this fix. Is an alpha-only version bump the way forward?
we'll have to do a bump for Bug 301761 for everyone soon http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch?r1=1.1&r2=1.2
(In reply to comment #3) > we'll have to do a bump for Bug 301761 for everyone soon > > http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch?r1=1.1&r2=1.2 This patch is totally wrong. I'm not sure how this happened. The patch I've got attached to this bug has the correct SOCK_CLOEXEC definition.
you're going to have to provide more information. i see no difference at all. the 2.11, 2.11.1, 2.11.2 patches are exactly the same as this attachment. $ wget -nv http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch https://bugs.gentoo.org/attachment.cgi?id=222561 2010-06-29 01:32:56 URL:http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch [14320/14320] -> "6028_all_alpha-fix-SOCK_NONBLOCK.patch" [1] 2010-06-29 01:33:01 URL:https://bugs.gentoo.org/attachment.cgi?id=222561 [14320/14320] -> "attachment.cgi?id=222561" [1] FINISHED --2010-06-29 01:33:01-- Downloaded: 2 files, 28K in 0s (53346 GB/s) $ md5sum attachment.cgi\?id\=222561 6028_all_alpha-fix-SOCK_NONBLOCK.patch 118c388dc76e2bb6a52ccb49402bc3c9 attachment.cgi?id=222561 118c388dc76e2bb6a52ccb49402bc3c9 6028_all_alpha-fix-SOCK_NONBLOCK.patch
(In reply to comment #5) > you're going to have to provide more information. i see no difference at all. > the 2.11, 2.11.1, 2.11.2 patches are exactly the same as this attachment. > > $ wget -nv > http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch > https://bugs.gentoo.org/attachment.cgi?id=222561 > 2010-06-29 01:32:56 > URL:http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch > [14320/14320] -> "6028_all_alpha-fix-SOCK_NONBLOCK.patch" [1] > 2010-06-29 01:33:01 URL:https://bugs.gentoo.org/attachment.cgi?id=222561 > [14320/14320] -> "attachment.cgi?id=222561" [1] > FINISHED --2010-06-29 01:33:01-- > Downloaded: 2 files, 28K in 0s (53346 GB/s) > > $ md5sum attachment.cgi\?id\=222561 6028_all_alpha-fix-SOCK_NONBLOCK.patch > 118c388dc76e2bb6a52ccb49402bc3c9 attachment.cgi?id=222561 > 118c388dc76e2bb6a52ccb49402bc3c9 6028_all_alpha-fix-SOCK_NONBLOCK.patch Sorry. This looks like a multipart fuck-up on my part. First, I was reading the patch in glibc-2.11-patches-5.tar.bz2 instead of glibc-2.11.2-patches-1.tar.bz2. So armin noticed that the patch in 2.11.2 is correct, but is being applied incorrectly. Notice the change from ports/sysdeps/unix/sysv/linux/alpha/bits/socket.h -> b/ports/sysdeps/unix/sysv/linux/alpha/bits/socket.h in http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch?r1=1.1&r2=1.2 God, let's look forward to glibc-2.12 which will kill most of our alpha patches...
Created attachment 236937 [details, diff] fixed patch (apply it to the correct place)
fixed in cvs then http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.11/6028_all_alpha-fix-SOCK_NONBLOCK.patch?r1=1.2&r2=1.3 http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.11.1/6028_all_alpha-fix-SOCK_NONBLOCK.patch?r1=1.1&r2=1.2 http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.11.2/6028_all_alpha-fix-SOCK_NONBLOCK.patch?r1=1.1&r2=1.2
i also pushed out an updated patchset for glibc-2.11.2 w/out a revbump. older glibc-2.11 will be culled, so i didnt bother with those.