[systemd-devel] systemd failing to close unwanted file descriptors & FDS spawning and crashing

Mantas Mikulėnas grawity at gmail.com
Thu Mar 3 19:18:27 UTC 2022


On Thu, Mar 3, 2022 at 9:09 PM Christopher Obbard <
chris.obbard at collabora.com> wrote:

> Hi systemd experts!
>
> I am using systemd-247 and systemd-250 on debian system, which is
> running a minimal downstream 5.4 kernel for a Qualcomm board.
>
> systemd 241 in debian buster works fine, but systemd 247 (debian
> bullseye) and systemd 250 (debian unstable) seem to get upset about file
> descriptors on services. These errors are consistant and the board boots
> just fine with init=/bin/sh
>
> I've got the required kernel config from README in my kernel, I am using
> a heavily patched downstream kernel, but from the following log can you
> suggest anything I can do to debug this (other than throwing the board
> out of the window) ?
>

>From the message, it looks like the error is returned by close_all_fds() in
src/basic/fd-util.c, where the only major change is that it has been ported
to call close_range() if that's available...

I would boot with init=/bin/sh, then run `exec strace -D -o
/var/log/systemd.trace /lib/systemd/systemd` to get a trace, and see if the
EINVAL actually comes from calling close_range() or from something else.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220303/c5add372/attachment.htm>


More information about the systemd-devel mailing list