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

machinectl: get assertion when stdout of `machinectl list-images` is passed to pipe or redirected to file #9549

Closed
nosada opened this Issue Jul 9, 2018 · 2 comments

Comments

3 participants
@nosada
Contributor

nosada commented Jul 9, 2018

systemd version the issue has been seen with

# systemctl --version
systemd 239
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid
$ pacman -Qs systemd
local/libsystemd 239.0-2
    systemd client libraries
local/systemd 239.0-2 (base-devel)
    system and service manager

Used distribution
Arch LInux

Expected behaviour you didn't see
When some nspawn images are shown as result of machinectl list-images then:

  • machinectl list-images | <some filtering command or pager> exit correctly
  • machinectl list-images > <some file> exits correctly

Unexpected behaviour you saw
Condition is same to above Expected behavior you didn't see:

  • machinectl list-images | <some filtering command or pager> fails with assertion (see below)
  • machinectl list-images > <some file> also failes with same assertion
$ machinectl list-images | grep FOO
Assertion '!restart' failed at ../systemd-stable/src/basic/format-table.c:1142, function table_print(). Aborting.
$ machinectl list-images > FOO
Assertion '!restart' failed at ../systemd-stable/src/basic/format-table.c:1142, function table_print(). Aborting.
Aborted (core dumped)

Steps to reproduce the problem

  1. Make image(s) visible in machinectl list-images
  2. Pass stdout of machinectl list-images to pipe (|) or redirect it to some file (> foo)
@nosada

This comment has been minimized.

Contributor

nosada commented Jul 9, 2018

... and I wrote PR #9550.

@nosada

This comment has been minimized.

Contributor

nosada commented Jul 10, 2018

Ah sorry, there is additional condition to reproduce problem.

This problem occurs when more than or equal to 3 images appear in result of machinectl list-images.

Not reproduced less than 3 images.

@poettering poettering added this to the v240 milestone Jul 13, 2018

@poettering poettering added the machine label Jul 13, 2018

@yuwata yuwata closed this in #9550 Jul 16, 2018

keszybz added a commit to keszybz/systemd that referenced this issue Oct 28, 2018

keszybz added a commit to keszybz/systemd that referenced this issue Oct 28, 2018

fpletz pushed a commit to NixOS/systemd that referenced this issue Oct 31, 2018

fpletz pushed a commit to NixOS/systemd that referenced this issue Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment