[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Adduser/logger problems in s390x autopkgtest



[Please cc me and adduser@packages.debian.org on replies, I am not
subscribed to Debian-s390]

Hi,

adduser has just recently (version 3.137) gained the ability of logging
to syslog. To avoid growing another dependency, adduser uses the perl
system() function to invoke logger(1) to write to syslog. The
functionality is on by default and uses the --id=$$ idiom to group all
log entries generated by a single adduser invocation together.

This doesn't work when adduser goes through autopkgtest on s390x, see
https://ci.debian.net/data/autopkgtest/unstable/s390x/a/adduser/35563060/log.gz

Every single call to logger(1) causes an "invalid argument" error. This
can be verified when logging into the lxc container that is used to run
the autopkgtest on s390x and trying it by hand:

root@autopkgtest-lxc-vkuuhi:~# logger --id=$$ foo
logger: send message failed: Invalid argument
root@autopkgtest-lxc-vkuuhi:~# 

This is evidently caused by the --id=$$ construct as without the $$ it
works:

root@autopkgtest-lxc-vkuuhi:~# logger --id foo
root@autopkgtest-lxc-vkuuhi:~# 

logger's source in util-linux suggests that some special handling is
done when called with --id=$$ as root, and logger adds in this case
"local socket credentials" to the sendmsg call used to send the message
to the log socket, which are evidently rejected by the receiving library.

This _ONLY_ happens on s390x and is currently keeping adduser 3.137 out
of testing. Sadly, I do not have "real" root on any s390x system and
therefore cannot do any more testing. So this might be some weird
s390x-only namespace or lxc issue or an issue with the autopkgtest setup
for s390x, but I think that there is nothing that adduser can do here.

I would rather not ignore this error, since I think that adduser should
complain to the user that it cannot log to syslog if it is expected to
log to syslog. I also think that it is the right thing to do this by
default.  I'd also rather not catch the error from logger and translate
it to some adduser-specific error message as the logger error message is
clear and easy to understand, and even adduser's error message would
make autopkgtest on s390x (and no other architecture) fail.

I would appreciate if someone with root on an s390x system could
investigate this, and if necessary get in touch with the people running
the s390x autopkgtest hosts on ci.debian.net to clean up a possible
issue that might be present in the autopkgtest setup.

Adduser's autopkgtests should be run in a container or a throwaway VM
since they create users, groups and home directories. They need root. I
myself run adduser's autopkgtest with "autopkgtest . -- null" in a
systemd-nspawn container. Adduser's autopkgtests run successfully on
ci.debian.net on all architectures other than s390x. adduser is a plain
perl program, there should be zero portability issues.

Thanks for helping!

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: