adt-virt-ssh cleanup fails on removed ssh control socket

Bug #1420355 reported by Vincent Ladeuil on 2015-02-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Martin Pitt

Bug Description


09:38:02 E: adt-run [09:38:02]: test getpkgsrc: - - - - - - - - - - results - - - - - - - - - -
09:38:02 O: getpkgsrc PASS
09:38:02 E: adt-run: DBG: sending command to testbed: copyup /tmp/adt-run.RvqknF/getpkgsrc-artifacts/ pkgsrc/artifacts/
09:38:06 E: adt-run: DBG: got reply from testbed: ok
09:38:06 E: adt-run: DBG: testbed command ['rm', '-rf', '/tmp/adt-run.RvqknF/getpkgsrc-artifacts'], kind short, sout raw, serr pipe, env ['LANG=C.UTF-8']
09:38:07 E: adt-run: DBG: testbed command exited with code 0
09:38:07 E: adt-run: DBG: needs_reset, previously=False, requested by run_tests() line 1229
09:38:07 E: adt-run: DBG: testbed stop
09:38:07 E: adt-run: DBG: testbed close, scratch=/tmp/adt-run.RvqknF
09:38:07 E: adt-run: DBG: sending command to testbed: close
09:38:08 E: Exit request sent.
09:38:08 E: Unexpected error:
09:38:08 E: Traceback (most recent call last):
09:38:08 E: File "/usr/share/autopkgtest/python/", line 676, in mainloop
09:38:08 E: command()
09:38:08 E: File "/usr/share/autopkgtest/python/", line 614, in command
09:38:08 E: r = f(c, ce)
09:38:08 E: File "/usr/share/autopkgtest/python/", line 116, in cmd_close
09:38:08 E: cleanup()
09:38:08 E: File "/usr/share/autopkgtest/python/", line 639, in cleanup
09:38:08 E: caller.hook_cleanup()
09:38:08 E: File "/usr/bin/adt-virt-ssh", line 418, in hook_cleanup
09:38:08 E: shutil.rmtree(workdir)
09:38:08 E: File "/usr/lib/python3.4/", line 463, in rmtree
09:38:08 E: _rmtree_safe_fd(fd, path, onerror)
09:38:08 E: File "/usr/lib/python3.4/", line 421, in _rmtree_safe_fd
09:38:08 E: onerror(os.unlink, fullname, sys.exc_info())
09:38:08 E: File "/usr/lib/python3.4/", line 419, in _rmtree_safe_fd
09:38:08 E: os.unlink(name, dir_fd=topfd)
09:38:08 E: FileNotFoundError: [Errno 2] No such file or directory: 'ssh_control-phablet@localhost:2222'
09:38:08 E: adt-run: DBG: bomb unexpected eof from the testbed
09:38:08 E: adt-run: DBG: testbed stop
09:38:08 E: adt-run [09:38:08]: ERROR:
09:38:08 E: adt-run: error cleaning up:
09:38:08 E:
09:38:08 E: adt-run [09:38:08]: ERROR: testbed failed: unexpected eof from the testbed
09:38:08 E: adt-run: DBG: / tests-tree rmtree pkgsrc/tests-tree
09:38:08 I: Finished with exitcode 20

Martin Pitt (pitti) wrote :

This looks like a relatively simple race condition. I've never seen it myself, but this shouldhelp:

summary: - adt-run bombs for a test that passed
+ adt-virt-ssh cleanup fails on removed ssh control socket
Changed in autopkgtest (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → Fix Committed
Martin Pitt (pitti) wrote :
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.9.6

autopkgtest (3.9.6) unstable; urgency=medium

  * Skip test_tmp_install_imagemagick test case if python3-wand is not
  * adt-virt-ssh: Ignore errors when cleaning up the work dir. This races with
    sshd cleaning up its control socket, don't stumble over that.
    (LP: #1420355)
  * Implement --timeout-factor, which was forgotten with the rewrite in
    version 3.2. (LP: #1420540)
  * ssh-setup/adb: Fix waiting for the desktop to boot: Lower D-Bus call
    timeout to 5 seconds, and fix retry loop to time out afer 5 minutes of
    real time instead of a fixed number of retries (as the duration of the
    D-Bus call is not very reliable).
  * virt-subproc/adt-virt-ssh: Don't try to exit the ssh muxer if we don't
    have a ssh command yet. This happens when the setup script fails to open
    the testbed.

 -- Martin Pitt <email address hidden> Fri, 13 Feb 2015 12:55:29 +0100

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

Other bug subscribers