On Thu, 18 Jun 2026 at 19:02, Richard Purdie
<[email protected]> wrote:
> I don't think systemctl-native should be executing processes and
> therefore shouldn't need this functionality to do the limited set of
> things we need it to do. The above sounds a bit like a sanity test that
> the functionality is present.
>
> Perhaps we could either just disable it for our native tool, or
> possibly move it to later when it really needs it?

When systemctl's console output is too long (e.g. --help, 'status',
'show' or no arguments) it pipes it through a pager program, and fails
as shown above. It's possible to mitigate with --no-pager command line
argument, which we could probably flip to be the default.

There's a second known issue, specific to do_rootfs: 'systemctl
enable' wants to run statx() with STATX_MNT_ID flag, which only exists
from kernel 5.8 onwards.

I've obtained an amazingly confusing stack trace where it happens, so
here's a good starting point for anyone (possibly me :) who'd want
figure out how to patch it out without breaking the actual code flow.
I'm not sure if I'll have time for it, so wanted to make a record of
it:

(gdb) bt
#0  xstatx_full (fd=<optimized out>, fd@entry=3, path=<optimized out>,
path@entry=0x0, statx_flags=statx_flags@entry=4096,
xstatx_flags=xstatx_flags@entry=0,
    mandatory_mask=mandatory_mask@entry=4353,
optional_mask=optional_mask@entry=0, mandatory_attributes=0,
ret=0x7fffffffcb50)
    at ../sources/systemd-systemctl-260.2/src/basic/stat-util.c:383
#1  0x00005555556295d6 in xstatx (fd=3, path=0x0, statx_flags=4096,
mandatory_mask=4353, ret=0x7fffffffcb50)
    at ../sources/systemd-systemctl-260.2/src/basic/stat-util.h:70
#2  fds_inode_and_mount_same (fd1=fd1@entry=3, fd2=fd2@entry=-8192) at
../sources/systemd-systemctl-260.2/src/basic/fd-util.c:1082
#3  0x00005555556297c6 in path_is_root_at (dir_fd=3, dir_fd@entry=-100,
    path=path@entry=0x55555587a4d0
"/home/akanavin/build/tmp/work/qemux86_64-oe-linux/core-image-sato/1.0/rootfs")
    at ../sources/systemd-systemctl-260.2/src/basic/fd-util.c:1072
#4  0x000055555564f47d in path_is_root (path=0x55555587a4d0
"/home/akanavin/build/tmp/work/qemux86_64-oe-linux/core-image-sato/1.0/rootfs")
    at ../sources/systemd-systemctl-260.2/src/basic/fd-util.h:173
#5  empty_or_root_harder_to_null (path=path@entry=0x7fffffffcdc8) at
../sources/systemd-systemctl-260.2/src/basic/path-util.c:1372
#6  0x000055555561a15e in chase (
    path=path@entry=0x55555587c100
"/home/akanavin/build/tmp/work/qemux86_64-oe-linux/core-image-sato/1.0/rootfs/etc/systemd/system/dbus-org.bluez.service",
    root=<optimized out>, flags=flags@entry=CHASE_NONEXISTENT,
ret_path=ret_path@entry=0x0, ret_fd=ret_fd@entry=0x0)
    at ../sources/systemd-systemctl-260.2/src/basic/chase.c:753
#7  0x00005555556ef822 in install_info_symlink_alias
(scope=scope@entry=RUNTIME_SCOPE_SYSTEM,
file_flags=file_flags@entry=0, info=info@entry=0x55555587b960,
    lp=lp@entry=0x7fffffffd050,
    config_path=config_path@entry=0x55555587aa40
"/home/akanavin/build/tmp/work/qemux86_64-oe-linux/core-image-sato/1.0/rootfs/etc/systemd/system",
    force=force@entry=false, changes=0x7fffffffd158,
n_changes=0x7fffffffd160) at
../sources/systemd-systemctl-260.2/src/shared/install.c:2010
#8  0x00005555556f1cab in install_info_apply
(scope=RUNTIME_SCOPE_SYSTEM, file_flags=file_flags@entry=0,
info=info@entry=0x55555587b960, lp=lp@entry=0x7fffffffd050,
    config_path=config_path@entry=0x55555587aa40
"/home/akanavin/build/tmp/work/qemux86_64-oe-linux/core-image-sato/1.0/rootfs/etc/systemd/system",
    changes=changes@entry=0x7fffffffd158, n_changes=0x7fffffffd160) at
../sources/systemd-systemctl-260.2/src/shared/install.c:2186
#9  0x00005555556f1ed4 in install_context_apply
(ctx=ctx@entry=0x7fffffffcfd0, lp=lp@entry=0x7fffffffd050,
file_flags=file_flags@entry=0,
    config_path=config_path@entry=0x55555587aa40
"/home/akanavin/build/tmp/work/qemux86_64-oe-linux/core-image-sato/1.0/rootfs/etc/systemd/system",
    flags=flags@entry=SEARCH_LOAD,
changes=changes@entry=0x7fffffffd158, n_changes=0x7fffffffd160) at
../sources/systemd-systemctl-260.2/src/shared/install.c:2262
#10 0x00005555556f23e0 in do_unit_file_enable
(lp=lp@entry=0x7fffffffd050, scope=scope@entry=RUNTIME_SCOPE_SYSTEM,
flags=flags@entry=0,
    config_path=0x55555587aa40
"/home/akanavin/build/tmp/work/qemux86_64-oe-linux/core-image-sato/1.0/rootfs/etc/systemd/system",
    names_or_paths=names_or_paths@entry=0x55555587a4b0,
changes=changes@entry=0x7fffffffd158, n_changes=0x7fffffffd160)
    at ../sources/systemd-systemctl-260.2/src/shared/install.c:2862
#11 0x00005555556f24c4 in unit_file_enable
(scope=RUNTIME_SCOPE_SYSTEM, flags=flags@entry=0, root_dir=<optimized
out>, names_or_paths=0x55555587a4b0,
    changes=changes@entry=0x7fffffffd158,
n_changes=n_changes@entry=0x7fffffffd160) at
../sources/systemd-systemctl-260.2/src/shared/install.c:2888
#12 0x000055555557ea10 in verb_enable (argc=<optimized out>,
argv=0x7fffffffd8a8, userdata=0x0)
    at ../sources/systemd-systemctl-260.2/src/systemctl/systemctl-enable.c:240
#13 0x000055555572ab4b in dispatch_verb (argc=argc@entry=4,
argv=0x7fffffffd8a8, argv@entry=0x7fffffffd898,
verbs=verbs@entry=0x555555871d20 <verbs>,
    userdata=userdata@entry=0x0) at
../sources/systemd-systemctl-260.2/src/shared/verbs.c:139
#14 0x000055555558935c in systemctl_main (argc=argc@entry=4,
argv=argv@entry=0x7fffffffd898) at
../sources/systemd-systemctl-260.2/src/systemctl/systemctl-main.c:144
#15 0x00005555555895f1 in run (argc=argc@entry=4,
argv=argv@entry=0x7fffffffd898) at
../sources/systemd-systemctl-260.2/src/systemctl/systemctl-main.c:203
#16 0x0000555555589669 in main (argc=4, argv=0x7fffffffd898) at
../sources/systemd-systemctl-260.2/src/systemctl/systemctl-main.c:251

> Corporate IT environments like to use old known setups like RHEL 8
> derivatives and don't change often. While it is in supported lifetime,
> it is hard for us to remove it. This requirement is therefore fairly
> important to some of our member companies. Personally, I wish it were
> different but it is what it is.

Would it be fair to ask these member companies to help with chasing
and resolving issues like the above? It's very tricky to diagnose. I
have access to rocky/alma 8 in the yocto cluster and managed to trace
it there, others likely do not. Containers are not going to help, as
they offer the host kernel.

There's also a possibility that fixing these two problems may only
uncover still more issues, and future new releases of systemd may also
introduce previously unseen problems.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#2407): 
https://lists.openembedded.org/g/openembedded-architecture/message/2407
Mute This Topic: https://lists.openembedded.org/mt/119870359/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-architecture/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to