Checkbox-cli crashes when resume session

Bug #1578579 reported by Scott Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Critical
Sylvain Pineau
PlainBox (Toolkit)
Fix Released
Critical
Sylvain Pineau

Bug Description

Steps to reproduce:
1) Power off the n power on device
2) Resume the checkbox session

Actual Result:
Checkbox-cli crashes

Other info:
1. SKU: DAL5-DVT1-C2
2. BIOS: 0.4.2
3. Manifest: xenial-xenial-master-X02

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/guacamole/core.py", line 248, in eat
    return self._dispatch()
  File "/usr/lib/python3/dist-packages/guacamole/core.py", line 298, in _dispatch
    result = ingredient.dispatch(self.context)
  File "/usr/lib/python3/dist-packages/guacamole/ingredients/cmdtree.py", line 152, in dispatch
    return self._dispatch(context, 0)
  File "/usr/lib/python3/dist-packages/guacamole/ingredients/cmdtree.py", line 165, in _dispatch
    retval = command.invoked(context)
  File "/usr/bin/checkbox-cli", line 207, in invoked
    if not self._maybe_resume_session():
  File "/usr/bin/checkbox-cli", line 284, in _maybe_resume_session
    return self._run_resume_ui_loop(resume_candidates)
  File "/usr/bin/checkbox-cli", line 300, in _run_resume_ui_loop
    self._resume_session(candidate)
  File "/usr/bin/checkbox-cli", line 307, in _resume_session
    metadata = self.ctx.sa.resume_session(session.id)
  File "/usr/lib/python3/dist-packages/plainbox/impl/decorators.py", line 104, in wrapper
    raise exc
  File "/usr/lib/python3/dist-packages/plainbox/impl/decorators.py", line 98, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/assistant.py", line 615, in resume_session
    all_units, self._resume_candidates[session_id][0])
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/manager.py", line 350, in load_session
    ).resume(data, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 299, in resume
    return self._resume_json(json_repr, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 334, in _resume_json
    return helper.resume_json(json_repr, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 637, in resume_json
    return self._build_SessionState(session_repr, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 1107, in _build_SessionState
    self._restore_SessionState_jobs_and_results(session, session_repr)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 730, in _restore_SessionState_jobs_and_results
    ", ".join(leftover_jobs)))
plainbox.impl.session.resume.CorruptedSessionError: Unknown jobs remaining: 2013.com.canonical.certification::input/clicking_DELL0786_00_06CB_7E91_Touchpad_TOUCHPAD_1, 2013.com.canonical.certification::input/clicking_SynPS_2_Synaptics_TouchPad_TOUCHPAD_2, 2013.com.canonical.certification::input/pointing_DELL0786_00_06CB_7E91_Touchpad_TOUCHPAD_1, 2013.com.canonical.certification::input/pointing_SynPS_2_Synaptics_TouchPad_TOUCHPAD_2, 2013.com.canonical.certification::suspend/clicking-after-suspend_DELL0786_00_06CB_7E91_Touchpad_TOUCHPAD_1, 2013.com.canonical.certification::suspend/clicking-after-suspend_SynPS_2_Synaptics_TouchPad_TOUCHPAD_2, 2013.com.canonical.certification::suspend/pointing-after-suspend_DELL0786_00_06CB_7E91_Touchpad_TOUCHPAD_1, 2013.com.canonical.certification::suspend/pointing-after-suspend_SynPS_2_Synaptics_TouchPad_TOUCHPAD_2

Related branches

Revision history for this message
Scott Hu (huntu207) wrote :
Changed in checkbox-ng:
importance: Undecided → Critical
Pierre Equoy (pieq)
tags: added: ce-qa-concern
Revision history for this message
Danny Hsu (dannyhsu) wrote :
Download full text (4.6 KiB)

Same here on Dino 2 MLK (16.04)

Application Malfunction Detected

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/guacamole/core.py", line 248, in eat
    return self._dispatch()
  File "/usr/lib/python3/dist-packages/guacamole/core.py", line 298, in _dispatch
    result = ingredient.dispatch(self.context)
  File "/usr/lib/python3/dist-packages/guacamole/ingredients/cmdtree.py", line 152, in dispatch
    return self._dispatch(context, 0)
  File "/usr/lib/python3/dist-packages/guacamole/ingredients/cmdtree.py", line 165, in _dispatch
    retval = command.invoked(context)
  File "/usr/bin/checkbox-cli", line 207, in invoked
    if not self._maybe_resume_session():
  File "/usr/bin/checkbox-cli", line 284, in _maybe_resume_session
    return self._run_resume_ui_loop(resume_candidates)
  File "/usr/bin/checkbox-cli", line 300, in _run_resume_ui_loop
    self._resume_session(candidate)
  File "/usr/bin/checkbox-cli", line 307, in _resume_session
    metadata = self.ctx.sa.resume_session(session.id)
  File "/usr/lib/python3/dist-packages/plainbox/impl/decorators.py", line 104, in wrapper
    raise exc
  File "/usr/lib/python3/dist-packages/plainbox/impl/decorators.py", line 98, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/assistant.py", line 615, in resume_session
    all_units, self._resume_candidates[session_id][0])
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/manager.py", line 350, in load_session
    ).resume(data, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 299, in resume
    return self._resume_json(json_repr, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 334, in _resume_json
    return helper.resume_json(json_repr, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 637, in resume_json
    return self._build_SessionState(session_repr, early_cb)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 1107, in _build_SessionState
    self._restore_SessionState_jobs_and_results(session, session_repr)
  File "/usr/lib/python3/dist-packages/plainbox/impl/session/resume.py", line 730, in _restore_SessionState_jobs_and_results
    ", ".join(leftover_jobs))) ...

Read more...

Pierre Equoy (pieq)
Changed in checkbox-ng:
assignee: nobody → Pierre Equoy (pierre-equoy)
status: New → In Progress
Revision history for this message
Pierre Equoy (pieq) wrote :

After investigating the device Scott was using, it looks like the root cause is not Checkbox.

Checkbox uses udev to determine the available hardware and create the appropriate jobs to test the device. The jobs are determined everytime a Checkbox session is started or resumed. When a session is resumed, the list of previously generated jobs is compared to the list of newly generated jobs to make sure there is no discrepancies.

After some investigation, we discovered that for this specific device, udev sees two different touchpads (although the device only has one touchpad physically available), but after suspending and resuming the device, one of the touchpads disappears from udev, leading to the Checkbox crash mentioned above.

A way to check this is as follow:

1. Power the device on
2. udevadm info --export-db | grep -i "dell.*touchpad\|synpatics.*touchpad"
    → in my case, I see two touchpads (one from Dell, one from Synaptics)
3. Suspend the device
4. Resume the device, and wait 30 seconds
5. Rerun Step 2. command.
    → the Synaptics touchpad has disappeared!

With all that said, one thing we can do to avoid Checkbox crashing is to make the "plainbox.impl.session.resume.CorruptedSessionError: Unknown jobs" exception non-fatal and try to continue resuming the session.

Changed in checkbox-ng:
assignee: Pierre Equoy (pierre-equoy) → Sylvain Pineau (sylvain-pineau)
Changed in checkbox-ng:
milestone: none → 0.26
status: In Progress → Fix Committed
Changed in plainbox:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Sylvain Pineau (sylvain-pineau)
milestone: none → 0.28
Pierre Equoy (pieq)
Changed in plainbox:
status: Fix Committed → Fix Released
Changed in checkbox-ng:
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.