TEST-36-NUMAPOLICY fails with qemu 5.2

Bug #1908259 reported by Christian Ehrhardt 
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd
Unknown
Unknown
qemu (Ubuntu)
Fix Released
Undecided
Unassigned
systemd (Ubuntu)
Fix Released
High
Balint Reczey

Bug Description

Hi,
this test now fails as seen on ppc here
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-hirsute/hirsute/ppc64el/s/systemd/20201214_224336_8b0d8@/log.gz

+ /bin/qemu-system-ppc64 -smp 1 -net none -m 512M -nographic -vga none -kernel /boot/vmlinux-5.8.0-25-generic -drive format=raw,cache=unsafe,file=/var/tmp/systemd-test.qFc3xq/default.img -numa node,nodeid=0 -initrd /boot/initrd.img-5.8.0-25-generic -append ' root=/dev/sda1 rw raid=noautodetect rd.luks=0 loglevel=2 init=/lib/systemd/systemd console=hvc0 selinux=0 SYSTEMD_UNIT_PATH=/usr/lib/systemd/tests/testdata/testsuite-36.units:/usr/lib/systemd/tests/testdata/units: systemd.unit=testsuite.target systemd.wants=testsuite-36.service systemd.wants=end.service '
E: QEMU failed with exit code 1
qemu-system-ppc64: total memory for NUMA nodes (0x0) should equal RAM size (0x20000000)

Reproducible in LP infra with systemd 246.6-5ubuntu1 and qemu 5.2

On other architectures this test is just skipped and ppc happened to complete
faster so I saw it earlier.

The same happens on amd64
+ /bin/qemu-system-x86_64 -smp 1 -net none -m 512M -nographic -vga none -kernel /boot/vmlinuz-5.8.0-25-generic -drive format=raw,cache=unsafe,file=/var/tmp/systemd-test.8Hqpmk/default.img -numa node,nodeid=0 -initrd /boot/initrd.img-5.8.0-25-generic -append ' root=/dev/sda1 rw raid=noautodetect rd.luks=0 loglevel=2 init=/lib/systemd/systemd console=ttyS0 selinux=0 SYSTEMD_UNIT_PATH=/usr/lib/systemd/tests/testdata/testsuite-36.units:/usr/lib/systemd/tests/testdata/units: systemd.unit=testsuite.target systemd.wants=testsuite-36.service systemd.wants=end.service '
qemu-system-x86_64: total memory for NUMA nodes (0x0) should equal RAM size (0x20000000)
E: QEMU failed with exit code 1

Isolated this to a test without systemd:
$ apt install linux-image-generic qemu-system-x86
$ /bin/qemu-system-x86_64 -smp 1 -net none -m 512M -nographic -vga none -kernel /boot/vmlinuz-5.8.0-25-generic -numa node,nodeid=0 -initrd /boot/initrd.img-5.8.0-25-generic -append 'console=ttyS0 selinux=0'

Upgrading to 5.2 makes this:
$ /bin/qemu-system-x86_64 -smp 1 -net none -m 512M -nographic -vga none -kernel /boot/vmlinuz-5.8.0-25-generic -numa node,nodeid=0 -initrd /boot/initrd.img-5.8.0-25-generic -append 'console=ttyS0 selinux=0'
qemu-system-x86_64: total memory for NUMA nodes (0x0) should equal RAM size (0x20000000)

The numa spec is indeed a bit short
  -numa node,nodeid=0
If I change this to
  -numa node,mem=512M,nodeid=0
It would work, but that kind of specification is forbidden >=5.1
  Parameter -numa node,mem is not supported by this machine type
  Use -numa node,memdev instead
You'd need also something like -M pc-i440fx-5.0 which isn't anything the test
wants to set in stone I guess.
Instead using memdev works:
  -object memory-backend-ram,id=mem0,size=512M -numa node,memdev=mem0,nodeid=0

This works fine and is in qemu since quite some time.
Properly documented since 2.12 but actually available since 2.1 (2014)

The argument for this test is in test/TEST-36-NUMAPOLICY/test.sh
  QEMU_OPTIONS="-numa node,nodeid=0"

Fixing that to a new form should help.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Added qemu task for update-excuse tag to be resolved.

I have a fix prepared that is building/testing right now. If successful I'll open an upstream issue&PR for it.

tags: added: update-excuse
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Tests are somewhat blocked by PPA being under maintenance.
But I have filed the issue upstream for discussion and to trigger their CI.

Issue => https://github.com/systemd/systemd/issues/17986
PR => https://github.com/systemd/systemd/pull/17987

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

https://github.com/systemd/systemd/pull/17987 was accepted upstream.
I assume with the amount of dependencies that systemd has there is no easy "just apply this and upload" that will make anyone happy :-/

But now that everything seems ready I wanted to ask the package maintainer (who usually has a plan on coming uploads already) when we could get this applied?

Changed in systemd (Ubuntu):
importance: Undecided → High
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Upstream CI as well as local autopkgtest runs confirm that the new systemd test code will make the new qemu pass.

# Formerly failing
$ sudo ~/work/autopkgtest/autopkgtest/runner/autopkgtest --no-built-binaries -o systemd-vs-qemu5.2 --apt-upgrade --apt-pocket=proposed=src:qemu --setup-commands="add-apt-repository ppa:ci-trg
...
autopkgtest [17:09:01]: test upstream: -----------------------]
upstream PASS
autopkgtest [17:09:02]: test upstream: - - - - - - - - - - results - - - - - - - - - -
autopkgtest [17:09:03]: @@@@@@@@@@@@@@@@@@@@ summary
upstream PASS
qemu-system-x86_64: terminating on signal 15 from pid 1783557 (/usr/bin/python3)

Balint Reczey (rbalint)
Changed in systemd (Ubuntu):
status: New → In Progress
assignee: nobody → Balint Reczey (rbalint)
Balint Reczey (rbalint)
tags: added: block-proposed
Revision history for this message
Balint Reczey (rbalint) wrote :

@cpaelze I've triggered the qemu autopkgtest with systemd from -proposed and it passes indeed. The problem is that allows qemu to migrate before systemd breaking all autopkgests as described in LP: #1908508.
Please remove the block-proposed tag when systemd is ready to migrate.

Revision history for this message
Balint Reczey (rbalint) wrote :

I was late, qemu migrated.

tags: removed: block-proposed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thank you, this is indeed ok for Qemu now.
And systemd is all up to you as you get re-started in 2021 - happy new year and thanks for your work on this.

Changed in qemu (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.6 KiB)

This bug was fixed in the package systemd - 247.1-4ubuntu1

---------------
systemd (247.1-4ubuntu1) hirsute; urgency=medium

  [ Dan Streetman ]
  * d/p/lp1905044-test-use-cap_last_cap-for-max-supported-cap-number-n.patch:
    Fix test use of new cap numbers with 5.8 kernel (LP: #1905044)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=d55c6f8186cb2cb73f61d6ff5b2e0ded82ef265c

  [ Balint Reczey ]
  * Merge to Ubuntu from Debian unstable
  * Refresh patches
    - Dropped changes:
      * debian/patches/dhcp-Allow-setting-request-options-again.patch
        (Upstream code has been changed in a similar way)
      * debian/patches/Revert-network-do-not-drop-foreign-config-if-interface-is.patch
        debian/patches/network-Set-link-state-to-LINK_STATE_PENDING-instead-of-t.patch
        (Revert-network-prevent-interfaces-to-be-initialized-multi.patch is still kept)
      * debian/patches/lp1845909/0002-network-add-link-setting_genmode-flag.patch
      * d/p/lp1905044-test-use-cap_last_cap-for-max-supported-cap-number-n.patch
        (Present in upstream 247.)
  * debian/udev.NEWS: Mention udev rules changes in 247
    File: debian/udev.NEWS
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=9f33f19683c2b864384c2ae59b312b2c844ed633
  * Don't start systemd-udev-trigger.service in containers.
    It fails and is not likely to be useful.
    File: debian/patches/units-Don-t-start-systemd-udev-trigger.service-in-a-conta.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=7b04fe5f98a4d204f73a1ec22884b9b3053a9a82
  * test: use modern qemu numa arguments (LP: #1908259)
    File: debian/patches/test-use-modern-qemu-numa-arguments.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=158106e74d452cf6cd5cd737432cbe6b7d47286c

systemd (247.1-4) unstable; urgency=medium

  [ наб ]
  * debian/extra/kernel-install.d/85-initrd.install: Don't install initrd when
    an explicit path was passed (Closes: #970213)
  * debian/extra/kernel-install.d/85-initrd.install: Match initrd installation
    messages and uninstallation to 90-loaderentry.install

  [ Michael Biebl ]
  * sd-device: keep escaped strings in DEVLINK= property (Closes: #976699)

systemd (247.1-3) unstable; urgency=medium

  * d/t/timedated: Ignore return code of dbus-monitor in wait_mon()
    We are not really interested in the return code and error messages from
    dbus-monitor after killing it, so ignore them to avoid undesired
    autopkgtest failures.

systemd (247.1-2) unstable; urgency=medium

  [ Michael Biebl ]
  * Upload to unstable
  * Revert "d/t/timedated: use /bin/bash to work around job handling issue in
    dash"

  [ Balint Reczey ]
  * debian/tests/timedated: Wait for the killed child only.
    There may be other children of the script due to autopkgtest machinery
    and they exit after the script exited. (LP: #1904406)

systemd (247.1-1) experimental; urgency=medium

  * New upstream version 247.1

systemd (247-1) experimental; urgency=medium

  * New upstream version 247
  * Rebase patches
  * Update symbol versions for the v247 release

systemd (247~...

Read more...

Changed in systemd (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.