On 02/19/2015 02:20 PM, Nathan Scott wrote:
----- Original Message -----
[...]
I dug a little this morning and I think it is the
$ pminfo -v --container=test
in the pre-test check that kills pmcd.
Yes, its definitely that step, and its definitely something inside the Linux
kernel PMDA.
pminfo -v --container=test
seems to be erroneously calling close(0) (twice!) after a failed setns()
call, and this ends up closing the pipe to the linux PMDA :
The log message agrees :
# cat /var/log/pcp/pmcd/linux.log
Log for pmdalinux on snodgrass started Thu Feb 19 15:22:32 2015
[Thu Feb 19 15:23:16] pmdalinux(14177) Error: __pmGetPDU: fd=0 hdr read: len=-1:
Bad file descriptor
And here's the strace on the pmdalinux process :
....
read(7, "", 1024) = 0
close(7) = 0
munmap(0x7f84752fc000, 4096) = 0
setns(0, 0) = -1 EINVAL (Invalid argument)
setns(0, 0) = -1 EINVAL (Invalid argument)
close(0) = 0
close(0) = -1 EBADF (Bad file descriptor)
write(1,
"\0\0\0\220\0\0p\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\17\0\4\t\0\0\0\1"..., 144) = 144
read(0, 0x1e5c000, 12) = -1 EBADF (Bad file descriptor)
umask(0177) = 022
open("/var/tmp/pcp-RVI0sl", O_RDWR|O_CREAT|O_EXCL, 0600) = 0
umask(022) = 0177
fcntl(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fcntl(0, F_SETFL, O_RDWR|O_APPEND|O_LARGEFILE) = 0
lseek(0, 0, SEEK_END) = 0
fstat(0, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f84752fc000
write(0, "[Thu Feb 19 15:23:16] pmdalinux("..., 101) = 101
lseek(0, 0, SEEK_SET) = 0
read(0, "[Thu Feb 19 15:23:16] pmdalinux("..., 256) = 101
write(2, "[Thu Feb 19 15:23:16] pmdalinux("..., 101) = 101
read(0, "", 256) = 0
close(0) = 0
munmap(0x7f84752fc000, 4096) = 0
unlink("/var/tmp/pcp-RVI0sl") = 0
write(2, "\n", 1) = 1
write(2, "Log finished Thu Feb 19 15:23:16"..., 38) = 38
exit_group(0) = ?
+++ exited with 0 +++
|