No /dev/uinput and Upstart cannot be contacted

Bug #1415514 reported by dobey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

When trying to run tests with --setup-commands ubuntu-touch-session, it seems that upstart cannot be contacted, and there is no /dev/uinput available, when trying to start the click app for testing in autopilot:

adt-run --click-source . --click ../build-adt-run-ap-UbuntuSDK_for_amd64_GCC_ubuntu_sdk_14_10_utopic-Default/com.canonical.payui_15.01.last_amd64.click -U --apt-pocket proposed --setup-commands ubuntu-touch-session --- qemu ~/adt-vivid-amd64-cloud.img

adt-run [17:31:06]: test autopilot: [-----------------------
17:30:58.644 INFO run:235 - Autopilot Source Version: 1.5.0
Autopilot Package Version: 1.5.0+15.04.20141031-0ubuntu1
17:30:58.702 INFO _logging:40 - ************************************************************
17:30:58.702 INFO _logging:41 - Starting test pay_ui.tests.test_pay_ui.PayUITestCase.test_ui_initialized
Loading tests from: /tmp/adt-run.pCfYdZ/tree/tests/autopilot

** (run.py:17671): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
17:30:58.764 WARNING testcase:538 - Failed to create Touch device for bug lp:1297595 workaround: Unable to instantiate any backends
UInput: UInputError('"/dev/uinput" cannot be opened for writing',)
17:30:58.780 WARNING testcase:175 - Process manager backend unavailable, application snapshot support disabled.
17:30:58.780 INFO _launcher:280 - Attempting to launch click application '(default)' from click package 'com.canonical.payui' and URIs ''
17:30:58.868 INFO _launcher:120 - Attempting to launch application 'com.canonical.payui_payui_15.01.last' with URIs '' via upstart-app-launch

** (run.py:17671): WARNING **: Unable to connect to Upstart bus: The given address is empty

** (run.py:17671): CRITICAL **: start_application_core: assertion 'con != NULL' failed
17:31:09.718 ERROR testresult:44 - ERROR: pay_ui.tests.test_pay_ui.PayUITestCase.test_ui_initialized
17:31:09.719 ERROR testresult:44 - /var/log/syslog: {{{
}}}
17:31:09.719 ERROR testresult:44 - traceback: {{{
Traceback (most recent call last):
  File "/tmp/adt-run.pCfYdZ/tree/tests/autopilot/pay_ui/tests/test_pay_ui.py", line 43, in setUp
    super().setUp()
  File "/tmp/adt-run.pCfYdZ/tree/tests/autopilot/pay_ui/tests/__init__.py", line 39, in setUp
    self.app = self.launch_application(build_dir, source_dir)
  File "/tmp/adt-run.pCfYdZ/tree/tests/autopilot/pay_ui/tests/__init__.py", line 52, in launch_application
    return self.launch_click_package('com.canonical.payui')
  File "/usr/lib/python3/dist-packages/autopilot/testcase.py", line 323, in launch_click_package
    return launcher.launch(package_id, app_name, app_uris)
  File "/usr/lib/python3/dist-packages/autopilot/application/_launcher.py", line 283, in launch
    return super().launch(app_id, app_uris)
  File "/usr/lib/python3/dist-packages/autopilot/application/_launcher.py", line 140, in launch
    state.get('message', '')
  File "/usr/lib/python3/dist-packages/autopilot/application/_launcher.py", line 233, in _check_status_error
    raise RuntimeError(': '.join(message_parts))
RuntimeError: Timed out while waiting for application to launch
}}}
17:31:09.719 ERROR testresult:44 - Binary attachment: "FailedTestScreenshot" (image/png)

Revision history for this message
Martin Pitt (pitti) wrote :

It seems the main problem here is that this command in the setup script fails now in current vivid:

   echo DBUS_SESSION_BUS_ADDRESS=\$(initctl --user get-env DBUS_SESSION_BUS_ADDRESS)

gives

   initctl: Unknown job: rc

It seems something in upstart changed recently that now causes a new env variable $UPSTART_JOBS to creep into the session environment which breaks initctl --user.

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in autopkgtest (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.9.4

---------------
autopkgtest (3.9.4) unstable; urgency=medium

  * Recognize modern "Package-Type:" control field in addition to
    XC-Package-Type.
  * ssh-setup/adb: Guard adb wait-for-device with a 5 min timeout.
    (LP: #1414939)
  * README.running-tests.rst: Fix mis-spelled ro-apt setup command.
  * Add setup-commands/ro-apt-update: Shortcut for temporarily mounting a
    readonly root file system writable and run apt-get. This allows tests to
    download/unpack test dependencies on older images whose apt indexes are
    out of date. (LP: #1408350)
  * Export temp dir install mode variables in the test run script instead of
    merely running it under that environment, so that we trump non-extending
    LD_LIBRARY_PATHs in /etc/environment. (LP: #1407949)
  * setup-commands/ubuntu-touch-session: Ensure that /dev/uinput is always
    accessible, as we don't necessarily have local logind sessions during
    tests. (part of LP #1415514)
  * setup-commands/ubuntu-touch-session: Unset UPSTART_JOB (which crept into
    the environment from a recent upstart version) when calling initctl, to
    fix querying the session D-BUS address. (LP: #1415514)

 -- Martin Pitt <email address hidden> Thu, 29 Jan 2015 19:01:41 +0100

Changed in autopkgtest (Ubuntu):
status: Fix Committed → 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.