Bug#854421: systemd: "systemctl --user cat dirmngr.socket" produced garbage beyond # /dev/null

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Feb 6 22:39:45 GMT 2017


On Mon 2017-02-06 17:18:59 -0500, Daniel Kahn Gillmor wrote:
> I've masked the user service dirmngr.socket on one user.  Out of
> curiosity i tried to see what it looked like, and i got some crazy
> spew.
>
> then i tried unmasking and re-masking and it to try to capture the
> problem, and it didn't come back.
>
> Then i tried it multiple times.  it seems to be intermittent, but i
> finally got a dump of it into hd, so that it's representable.

I just tried again and got it to do the weird dump under strace.  here
are the system calls that lead to the garbage output:

11439 17:37:01.331923 ppoll([{fd=3, events=POLLIN}], 1, {tv_sec=24, tv_nsec=999937000}, NULL, 8) = 1 ([{fd=3, revents=POLLIN}], left {tv_sec=24, tv_nsec=999880841}) <0.000072>
11439 17:37:01.332055 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\2\1\1\10\0\0\0\4\0\0\0\17\0\0\0\5\1u\0\4\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MS
G_NOSIGNAL|MSG_CMSG_CLOEXEC) = 24 <0.000012>
11439 17:37:01.332109 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\10\1g\0\1v\0\0\1b\0\0\0\0\0\0", iov_len=16}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMS
G_CLOEXEC) = 16 <0.000012>
11439 17:37:01.332169 open("/dev/null", O_RDONLY|O_NOCTTY|O_CLOEXEC) = 4 <0.000020>
11439 17:37:01.332225 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 <0.000011>
11439 17:37:01.332277 write(1, "# /dev/null\n", 12) = 12 <0.000020>
11439 17:37:01.332330 copy_file_range(4, NULL, 1, NULL, 9223372036854775807, 0) = -1 EXDEV (Invalid cross-device link) <0.000012>
11439 17:37:01.332373 sendfile(1, 4, NULL, 9223372036854775807) = -1 EINVAL (Invalid argument) <0.000012>
11439 17:37:01.332413 splice(4, NULL, 1, NULL, 9223372036854775807, 0) = 0 <0.000026>
11439 17:37:01.332467 close(4)          = 0 <0.000012>
11439 17:37:01.332509 close(3)          = 0 <0.000020>
11439 17:37:01.332625 exit_group(0)     = ?
11439 17:37:01.333091 +++ exited with 0 +++


      --dkg




More information about the Pkg-systemd-maintainers mailing list