autopkgtest hangs in timedated test

Bug #1904406 reported by Balint Reczey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Auto Package Testing
Invalid
Undecided
Unassigned
dash (Debian)
Fix Released
Unknown
systemd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

https://autopkgtest.ubuntu.com/packages/s/systemd/hirsute/amd64

autopkgtest [01:32:23]: test timedated: [-----------------------
original tz: Etc/UTC
timedatectl works
change timezone
reset timezone to original
no adjtime file
UTC set in adjtime file
non-zero values in adjtime file
fourth line adjtime file
no final newline in adjtime file
only one line in adjtime file
only one line in adjtime file, no final newline
only two lines in adjtime file
only two lines in adjtime file, no final newline
unknown value in 3rd line of adjtime file
disable NTP
enable NTP
autopkgtest [04:19:03]: ERROR: timed out on command
....

It seems autopkgtest script is executed with additional machinery creating child processes for the script:

root 1305 1296 0 13:25 ttyS1 00:00:00 /bin/sh /tmp/autopkgtest.POBPF7/build.9KD/src/debian/tests/timedated
root 1306 1305 0 13:25 ttyS1 00:00:00 bash -c set -e; export USER=`id -nu`; . /etc/profile >/dev/null 2>&1 || true; . ~/.profile >/dev/null 2>&1 || true; buildtree="/tmp/autopkgtest.POBPF7/build.9KD/src"; mkdir -p -m 1777 -- "/tmp/autopkgtest.POBPF7/timedated-artifacts"; export AUTOPKGTEST_ARTIFACTS="/tmp/autopkgtest.POBPF7/timedated-artifacts"; export ADT_ARTIFACTS="$AUTOPKGTEST_ARTIFACTS"; mkdir -p -m 755 "/tmp/autopkgtest.POBPF7/autopkgtest_tmp"; export AUTOPKGTEST_TMP="/tmp/autopkgtest.POBPF7/autopkgtest_tmp"; export ADTTMP="$AUTOPKGTEST_TMP"; export DEBIAN_FRONTEND=noninteractive; export LANG=C.UTF-8; export DEB_BUILD_OPTIONS=parallel=1; unset LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL;rm -f /tmp/autopkgtest_script_pid; set -C; echo $$ > /tmp/autopkgtest_script_pid; set +C; trap "rm -f /tmp/autopkgtest_script_pid" EXIT INT QUIT PIPE; cd "$buildtree"; export AUTOPKGTEST_NORMAL_USER=ubuntu; export ADT_NORMAL_USER=ubuntu; chmod +x /tmp/autopkgtest.POBPF7/build.9KD/src/debian/tests/timedated; touch /tmp/autopkgtest.POBPF7/timedated-stdout /tmp/autopkgtest.POBPF7/timedated-stderr; /tmp/autopkgtest.POBPF7/build.9KD/src/debian/tests/timedated 2> >(tee -a /tmp/autopkgtest.POBPF7/timedated-stderr >&2) > >(tee -a /tmp/autopkgtest.POBPF7/timedated-stdout);
root 1307 1305 0 13:25 ttyS1 00:00:00 bash -c set -e; export USER=`id -nu`; . /etc/profile >/dev/null 2>&1 || true; . ~/.profile >/dev/null 2>&1 || true; buildtree="/tmp/autopkgtest.POBPF7/build.9KD/src"; mkdir -p -m 1777 -- "/tmp/autopkgtest.POBPF7/timedated-artifacts"; export AUTOPKGTEST_ARTIFACTS="/tmp/autopkgtest.POBPF7/timedated-artifacts"; export ADT_ARTIFACTS="$AUTOPKGTEST_ARTIFACTS"; mkdir -p -m 755 "/tmp/autopkgtest.POBPF7/autopkgtest_tmp"; export AUTOPKGTEST_TMP="/tmp/autopkgtest.POBPF7/autopkgtest_tmp"; export ADTTMP="$AUTOPKGTEST_TMP"; export DEBIAN_FRONTEND=noninteractive; export LANG=C.UTF-8; export DEB_BUILD_OPTIONS=parallel=1; unset LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL;rm -f /tmp/autopkgtest_script_pid; set -C; echo $$ > /tmp/autopkgtest_script_pid; set +C; trap "rm -f /tmp/autopkgtest_script_pid" EXIT INT QUIT PIPE; cd "$buildtree"; export AUTOPKGTEST_NORMAL_USER=ubuntu; export ADT_NORMAL_USER=ubuntu; chmod +x /tmp/autopkgtest.POBPF7/build.9KD/src/debian/tests/timedated; touch /tmp/autopkgtest.POBPF7/timedated-stdout /tmp/autopkgtest.POBPF7/timedated-stderr; /tmp/autopkgtest.POBPF7/build.9KD/src/debian/tests/timedated 2> >(tee -a /tmp/autopkgtest.POBPF7/timedated-stderr >&2) > >(tee -a /tmp/autopkgtest.POBPF7/timedated-stdout);

This is why wait hangs and this is why waiting only for the killed child fixes the issue:

@@ -163,7 +163,7 @@ wait_mon() {
     done
     assert_in "$2" "$(cat $mon)"
     kill $MONPID
- wait
+ wait $MONPID
 }

I'm fixing this in systemd, but the autopkgtest change could break other packages as well.

Revision history for this message
Balint Reczey (rbalint) wrote :
Balint Reczey (rbalint)
Changed in auto-package-testing:
status: New → Invalid
Changed in systemd (Ubuntu):
status: New → Invalid
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: Invalid → Fix Released
Changed in dash (Debian):
status: Unknown → 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.