Description of problem: Peer authentication appears to be broken in the latest ppc64le build for rawhide - all my builds which use postgres in their %check failed during the mass rebuild with: createdb: could not connect to database template1: FATAL: Peer authentication failed for user "mockbuild" Version-Release number of selected component (if applicable): postgresql-11.4-1.fc31 How reproducible: Reproduced in rawhide mock on ppc64le test machine. Steps to Reproduce: 1. initdb $PWD/data -U $(id -un) --auth-local=peer --auth-host=md5 2. pg_ctl -D $PWD/data -l $PWD/data/start.log start -o '-k /tmp -p 58196' -w 3. createdb -h /tmp $(id -un) --owner $(id -un) -p 58196 Actual results: createdb: could not connect to database template1: FATAL: Peer authentication failed for user "mockbuild" Expected results: Database is created. Additional info: Comparing an strace of the server on ppc64le shows: 4761 recv(10, "\0\0\0D\0\3\0\0user\0mockbuild\0database\0"..., 8192, 0) = 68 ... 4761 getsockopt(10, SOL_SOCKET, SO_SNDLOWAT, [1], [12->4]) = 0 while on x86_64 we see: 24657 recvfrom(9, "\0\0\0>\0\3\0\0user\0thh\0database\0postgr"..., 8192, 0, NULL, NULL) = 62 ... 24657 getsockopt(9, SOL_SOCKET, SO_PEERCRED, {pid=24656, uid=2067, gid=103}, [12]) = 0 I'm not sure why ppc64le is using recv instead of recvfrom, but the big issue is that it uses the wrong socket option to get the peer credentials. I think because of this on ppc64le: [tomh@ppc64le-test ~][PROD]$ fgrep SO_PEERCRED /usr/include/**/*.h /usr/include/asm-generic/socket.h:#define SO_PEERCRED 17 /usr/include/asm/socket.h:#define SO_PEERCRED 21 [tomh@ppc64le-test ~][PROD]$ fgrep SO_SNDLOWAT /usr/include/**/*.h /usr/include/asm-generic/socket.h:#define SO_SNDLOWAT 19 /usr/include/asm/socket.h:#define SO_SNDLOWAT 17 versus x86_64: rawhide [~] % fgrep SO_PEERCRED /usr/include/**/*.h /usr/include/asm-generic/socket.h:#define SO_PEERCRED 17 rawhide [~] % fgrep SO_SNDLOWAT /usr/include/**/*.h /usr/include/asm-generic/socket.h:#define SO_SNDLOWAT 19 So on ppc64le it has obviously used the generic value of SO_PEERCRED which actually matches the ppc64le specific value of SO_SNDLOWAT :-(
Oh the previous build (postgresql-11.3-2.fc31) seems to have been fine as the same packages built OK against that.
Per Florian on the devel list this was likely due to broken kernel-headers on ppc64le when postgresql-11.4-1.fc31 was built, and it should be fixed by the masss rebuild...
I can confirm that the mass rebuild has fixed this.