Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemctl cat nonexistent@ fails with assertion error #14739

Closed
nbraud opened this issue Feb 2, 2020 · 4 comments
Closed

systemctl cat nonexistent@ fails with assertion error #14739

nbraud opened this issue Feb 2, 2020 · 4 comments
Labels
already-fixed bug 🐛 Programming errors, that need preferential fixing systemctl
Milestone

Comments

@nbraud
Copy link
Contributor

nbraud commented Feb 2, 2020

systemd version the issue has been seen with

$ systemd --version                                                        :(
systemd 244 (244.1-2)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid

Used distribution
Debian 11 (testing, “bullseye”)

Expected behaviour you didn't see

$ systemctl cat notexist@
No files found for notexist@.service.

Unexpected behaviour you saw

$ systemctl cat notexist@
Assertion 'name' failed at src/shared/dropin.c:143, function unit_file_find_dirs(). Aborting.
[1]    63986 abort      systemctl cat notexist@

Steps to reproduce the problem
See above

Notes
The issue seems to be limited to non-existent, templated units:

  • non-existent, non-templated units work fine;
$ systemctl cat notexist
No files found for notexist.service.
  • exiting, templated units work.
$ systemctl cat hostapd@
# /lib/systemd/system/hostapd@.service
[...]

This was initially reported as Debian bug #950489.

@yuwata yuwata added bug 🐛 Programming errors, that need preferential fixing systemctl labels Feb 3, 2020
@yuwata yuwata added this to the v245 milestone Feb 3, 2020
@yuwata
Copy link
Member

yuwata commented Feb 3, 2020

I cannot reproduce this with the current git master (and v243).

$ systemctl cat hoge@
No files found for hoge@.service.

Could you test with the current git master?

@yuwata
Copy link
Member

yuwata commented Feb 3, 2020

Ah, this is already fixed by 7a670b1.

@yuwata
Copy link
Member

yuwata commented Feb 3, 2020

@keszybz Could you backport the commit to the stable repository?

@yuwata yuwata closed this as completed Feb 3, 2020
@mbiebl
Copy link
Contributor

mbiebl commented Feb 3, 2020

Thanks @yuwata . I've cherry-picked the fix in Debian for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
already-fixed bug 🐛 Programming errors, that need preferential fixing systemctl
Development

No branches or pull requests

3 participants