<div dir="auto">Ah, right, I forgot – since this is done in the service child (right before exec) and not in the main process, you probably need to add the -f option to make strace follow forks...</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 3, 2022, 22:08 Christopher Obbard <<a href="mailto:chris.obbard@collabora.com">chris.obbard@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mantas,<br>
<br>
On 03/03/2022 19:18, Mantas Mikulėnas wrote:<br>
> On Thu, Mar 3, 2022 at 9:09 PM Christopher Obbard <br>
> <<a href="mailto:chris.obbard@collabora.com" target="_blank" rel="noreferrer">chris.obbard@collabora.com</a> <mailto:<a href="mailto:chris.obbard@collabora.com" target="_blank" rel="noreferrer">chris.obbard@collabora.com</a>>> wrote:<br>
> <br>
> Hi systemd experts!<br>
> <br>
> I am using systemd-247 and systemd-250 on debian system, which is<br>
> running a minimal downstream 5.4 kernel for a Qualcomm board.<br>
> <br>
> systemd 241 in debian buster works fine, but systemd 247 (debian<br>
> bullseye) and systemd 250 (debian unstable) seem to get upset about<br>
> file<br>
> descriptors on services. These errors are consistant and the board<br>
> boots<br>
> just fine with init=/bin/sh<br>
> <br>
> I've got the required kernel config from README in my kernel, I am<br>
> using<br>
> a heavily patched downstream kernel, but from the following log can you<br>
> suggest anything I can do to debug this (other than throwing the board<br>
> out of the window) ?<br>
> <br>
> <br>
> From the message, it looks like the error is returned by <br>
> close_all_fds() in src/basic/fd-util.c, where the only major change is <br>
> that it has been ported to call close_range() if that's available...<br>
> <br>
> I would boot with init=/bin/sh, then run `exec strace -D -o <br>
> /var/log/systemd.trace /lib/systemd/systemd` to get a trace, and see if <br>
> the EINVAL actually comes from calling close_range() or from something else.<br>
> <br>
> -- <br>
> Mantas Mikulėnas<br>
<br>
Thanks for your reply. It reproduced nicely with the command you gave.<br>
<br>
Seems like nothing related to close_range returning EINVAL, only the <br>
following calls returned EINVAL:<br>
<br>
cat systemd-failing.trace | grep EINVAL<br>
prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)<br>
prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE) = -1 EINVAL (Invalid <br>
argument)<br>
prctl(PR_CAPBSET_READ, CAP_PERFMON) = -1 EINVAL (Invalid argument)<br>
read(4, 0x55675a75b0, 4095) = -1 EINVAL (Invalid argument)<br>
mount("cgroup2", "/proc/self/fd/4", "cgroup2", <br>
MS_NOSUID|MS_NODEV|MS_NOEXEC, "nsdelegate,memory_recursiveprot") = -1 <br>
EINVAL (Invalid argument)<br>
<br>
<br>
I have attached the full strace output, in case that would be useful?<br>
<br>
Thanks<br>
Chris</blockquote></div>