On Wed, May 28, 2014 at 11:23 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Buildfarm critters smew and shearwater are reporting regression test > failures that suggest that the UUID library can't get a system MAC > address: > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=smew&dt=2014-05-28%2023%3A38%3A28 > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=shearwater&dt=2014-05-29%2000%3A24%3A32 > > I've just committed regression test adjustments to prevent that from > being a failure case, but I am confused about why it's happening. > I wouldn't be surprised at not getting a MAC address on a machine that > lacks any internet connection, but that surely can't describe the > buildfarm environment. Are you curious enough to poke into it and > see what's going on? It might be useful to strace a backend that's > trying to execute uuid_generate_v1() and see what the kernel interaction > looks like exactly.
Here's the result of attaching strace to an idle backend, then running SELECT uuid_generate_v1(). AFAIR shearwater is a cheaply-hosted OpenVZ VPS under the hood. Josh
josh@ease1:~$ strace -p 6818 Process 6818 attached - interrupt to quit recv(10, "Q\0\0\0\37SELECT uuid_generate_v1();\0", 8192, 0) = 32 gettimeofday({1401383296, 920282}, NULL) = 0 gettimeofday({1401383296, 920313}, NULL) = 0 mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xae800000 stat64("/home/josh/runtime/lib/postgresql/uuid-ossp", 0xbfdf87d0) = -1 ENOENT (No such file or directory) stat64("/home/josh/runtime/lib/postgresql/uuid-ossp.so", {st_mode=S_IFREG|0755, st_size=46685, ...}) = 0 stat64("/home/josh/runtime/lib/postgresql/uuid-ossp.so", {st_mode=S_IFREG|0755, st_size=46685, ...}) = 0 open("/home/josh/runtime/lib/postgresql/uuid-ossp.so", O_RDONLY) = 7 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\f\0\0004\0\0\0"..., 512) = 512 fstat64(7, {st_mode=S_IFREG|0755, st_size=46685, ...}) = 0 mmap2(NULL, 16796, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0xae7fb000 mmap2(0xae7ff000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x3) = 0xae7ff000 close(7) = 0 open("/home/josh/runtime/lib/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/i686/sse2/cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/i686/sse2/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/i686/cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/i686/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/sse2/cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/sse2/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("tls/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("i686/sse2/cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("i686/sse2/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("i686/cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("i686/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("sse2/cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("sse2/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("cmov/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/josh/runtime/lib/libuuid.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 7 fstat64(7, {st_mode=S_IFREG|0644, st_size=30628, ...}) = 0 mmap2(NULL, 30628, PROT_READ, MAP_PRIVATE, 7, 0) = 0xae7f3000 close(7) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/i386-linux-gnu/libuuid.so.1", O_RDONLY) = 7 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\22\0\0004\0\0\0"..., 512) = 512 fstat64(7, {st_mode=S_IFREG|0644, st_size=18000, ...}) = 0 mmap2(NULL, 20712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0xae7ed000 mmap2(0xae7f1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x3) = 0xae7f1000 close(7) = 0 mprotect(0xae7f1000, 4096, PROT_READ) = 0 munmap(0xae7f3000, 30628) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 7 connect(7, {sa_family=AF_FILE, path="/var/run/uuidd/request"}, 110) = -1 ENOENT (No such file or directory) access("/usr/sbin/uuidd", X_OK) = -1 ENOENT (No such file or directory) close(7) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7 ioctl(7, SIOCGIFCONF, {96, {{"lo", {AF_INET, inet_addr("127.0.0.1")}}, {"venet0", {AF_INET, inet_addr("127.0.0.2")}}, {"venet0:0", {AF_INET, inet_addr("198.204.250.34")}}}}) = 0 ioctl(7, SIOCGIFHWADDR, {ifr_name="lo", ifr_hwaddr=00:00:00:00:00:00}) = 0 ioctl(7, SIOCGIFHWADDR, {ifr_name="venet0", ifr_hwaddr=00:00:00:00:00:00}) = 0 ioctl(7, SIOCGIFHWADDR, {ifr_name="venet0:0", ifr_hwaddr=00:00:00:00:00:00}) = 0 close(7) = 0 gettimeofday({1401383296, 922979}, NULL) = 0 open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 7 fcntl64(7, F_GETFD) = 0 fcntl64(7, F_SETFD, FD_CLOEXEC) = 0 getuid32() = 1000 getppid() = 5813 gettimeofday({1401383296, 923154}, NULL) = 0 read(7, "<)\177\246I\177", 6) = 6 gettid() = 6818 umask(0) = 077 open("/var/lib/libuuid/clock.txt", O_RDWR|O_CREAT|O_LARGEFILE, 0660) = -1 EACCES (Permission denied) umask(077) = 0 gettimeofday({1401383296, 923333}, NULL) = 0 read(7, "wn", 2) = 2 gettid() = 6818 gettimeofday({1401383296, 923402}, NULL) = 0 gettimeofday({1401383296, 923425}, NULL) = 0 gettimeofday({1401383296, 923628}, NULL) = 0 send(9, "\2\0\0\0\344\2\0\0\0@\0\0\7\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 740, 0) = 740 gettimeofday({1401383296, 923733}, NULL) = 0 send(10, "T\0\0\0)\0\1uuid_generate_v1\0\0\0\0\0\0\0\0\0"..., 109, 0) = 109 recv(10, 0x86620e0, 8192, 0) = ? ERESTARTSYS (To be restarted) --- SIGALRM (Alarm clock) @ 0 (0) --- sigreturn() = ? (mask now []) recv(10,
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers