Unable to continue testing after restarting canonical-certification-client, it would crash with segmentation fault

Bug #1412660 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Critical
Zygmunt Krynicki

Bug Description

Bumped into this while I was testing 12.04.5 today.

Steps:
1. Install 12.04.5 + update (3.13.0-44), install our toolset.
2. Starting testing with canonical-certification-client + 12.04.4 whitelist, until the poweroff test to turn it off.
3. Power on the system, run canonical-certification-client again.
4. Select the "re-run last test", or continue with Set previous test status to PASS

Actual result:
The GUI crashed with the following error message:
GuiEngine::SetJobOutcome() "/plainbox/job/681322577514cb83de3f0f6406ed4cbd47fc297048c2ab36288d75e769379865" "pass"
PBTreeNode::setOutcome "/plainbox/MemoryJobResult/85183888" "pass"
PBTreeNode::setComments "/plainbox/MemoryJobResult/85183888" ""
GuiEngine::SetJobOutcome() - Done
GuiEngine::GuiResumeSession() - Done
TestItemModel::CreateTestListModel()
Recreating TestItemModel
Trying to construct an instance of an invalid type, type id: 47456368
Trying to construct an instance of an invalid type, type id: 47456368
Trying to construct an instance of an invalid type, type id: 42053760
Trying to construct an instance of an invalid type, type id: 42053760
Trying to construct an instance of an invalid type, type id: 47371312
Trying to construct an instance of an invalid type, type id: 47371312
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 48113440
Trying to construct an instance of an invalid type, type id: 48113440
Trying to construct an instance of an invalid type, type id: 16843372
Trying to construct an instance of an invalid type, type id: 16843372
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 48326928
Trying to construct an instance of an invalid type, type id: 48326928
Trying to construct an instance of an invalid type, type id: 51887856
Trying to construct an instance of an invalid type, type id: 51887856
Trying to construct an instance of an invalid type, type id: 42031504
Trying to construct an instance of an invalid type, type id: 42031504
Trying to construct an instance of an invalid type, type id: 48057920
Trying to construct an instance of an invalid type, type id: 48057920
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 42274512
Trying to construct an instance of an invalid type, type id: 42274512
Trying to construct an instance of an invalid type, type id: 52033664
Trying to construct an instance of an invalid type, type id: 52033664
Trying to construct an instance of an invalid type, type id: 52098528
Trying to construct an instance of an invalid type, type id: 52098528
Trying to construct an instance of an invalid type, type id: 38571440
Trying to construct an instance of an invalid type, type id: 38571440
Trying to construct an instance of an invalid type, type id: 38657568
Trying to construct an instance of an invalid type, type id: 38657568
Trying to construct an instance of an invalid type, type id: 38613056
Trying to construct an instance of an invalid type, type id: 38613056
Trying to construct an instance of an invalid type, type id: 38678873
Trying to construct an instance of an invalid type, type id: 38678873
Trying to construct an instance of an invalid type, type id: 38697984
Trying to construct an instance of an invalid type, type id: 38697984
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 47476512
Trying to construct an instance of an invalid type, type id: 47476512
Trying to construct an instance of an invalid type, type id: 38792944
Trying to construct an instance of an invalid type, type id: 38792944
Trying to construct an instance of an invalid type, type id: 38889600
Trying to construct an instance of an invalid type, type id: 38889600
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 45042864
Trying to construct an instance of an invalid type, type id: 45042864
Trying to construct an instance of an invalid type, type id: 54939152
Trying to construct an instance of an invalid type, type id: 54939152
Trying to construct an instance of an invalid type, type id: 45400880
Trying to construct an instance of an invalid type, type id: 45400880
Trying to construct an instance of an invalid type, type id: 44199296
Trying to construct an instance of an invalid type, type id: 44199296
Trying to construct an instance of an invalid type, type id: 46188304
Trying to construct an instance of an invalid type, type id: 46188304
Trying to construct an instance of an invalid type, type id: 55053753
Trying to construct an instance of an invalid type, type id: 55053753
Trying to construct an instance of an invalid type, type id: 55114496
Trying to construct an instance of an invalid type, type id: 55114496
Trying to construct an instance of an invalid type, type id: 55039040
Trying to construct an instance of an invalid type, type id: 55039040
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 16843372
Trying to construct an instance of an invalid type, type id: 16843372
Trying to construct an instance of an invalid type, type id: 55265600
Trying to construct an instance of an invalid type, type id: 55265600
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 55109296
Trying to construct an instance of an invalid type, type id: 55109296
Trying to construct an instance of an invalid type, type id: 43972592
Trying to construct an instance of an invalid type, type id: 43972592
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 258
Trying to construct an instance of an invalid type, type id: 258
Trying to construct an instance of an invalid type, type id: 44363152
Trying to construct an instance of an invalid type, type id: 44363152
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 44586416
Trying to construct an instance of an invalid type, type id: 44586416
Trying to construct an instance of an invalid type, type id: 44625665
Trying to construct an instance of an invalid type, type id: 44625665
Trying to construct an instance of an invalid type, type id: 44663952
Trying to construct an instance of an invalid type, type id: 44663952
Trying to construct an instance of an invalid type, type id: 44686064
Trying to construct an instance of an invalid type, type id: 44686064
Trying to construct an instance of an invalid type, type id: 65862320
Trying to construct an instance of an invalid type, type id: 65862320
Trying to construct an instance of an invalid type, type id: 46188304
Trying to construct an instance of an invalid type, type id: 46188304
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 65991296
Trying to construct an instance of an invalid type, type id: 65991296
Trying to construct an instance of an invalid type, type id: 66019408
Trying to construct an instance of an invalid type, type id: 66019408
Trying to construct an instance of an invalid type, type id: 66076377
Trying to construct an instance of an invalid type, type id: 66076377
Trying to construct an instance of an invalid type, type id: 66072224
Trying to construct an instance of an invalid type, type id: 66072224
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 66165072
Trying to construct an instance of an invalid type, type id: 66165072
Trying to construct an instance of an invalid type, type id: 66005753
Trying to construct an instance of an invalid type, type id: 66005753
Trying to construct an instance of an invalid type, type id: 65909369
Trying to construct an instance of an invalid type, type id: 65909369
Trying to construct an instance of an invalid type, type id: 66371136
Trying to construct an instance of an invalid type, type id: 66371136
Trying to construct an instance of an invalid type, type id: 66385456
Trying to construct an instance of an invalid type, type id: 66385456
Trying to construct an instance of an invalid type, type id: 66525248
Trying to construct an instance of an invalid type, type id: 66525248
Trying to construct an instance of an invalid type, type id: 211
Trying to construct an instance of an invalid type, type id: 211
Trying to construct an instance of an invalid type, type id: 66625152
Trying to construct an instance of an invalid type, type id: 66625152
Trying to construct an instance of an invalid type, type id: 66651145
Trying to construct an instance of an invalid type, type id: 66651145
Trying to construct an instance of an invalid type, type id: 66330649
Trying to construct an instance of an invalid type, type id: 66330649
Trying to construct an instance of an invalid type, type id: 66807105
Trying to construct an instance of an invalid type, type id: 66807105
Trying to construct an instance of an invalid type, type id: 66836688
Trying to construct an instance of an invalid type, type id: 66836688
Trying to construct an instance of an invalid type, type id: 66881984
Trying to construct an instance of an invalid type, type id: 66881984
Trying to construct an instance of an invalid type, type id: 66910784
Trying to construct an instance of an invalid type, type id: 66910784
Trying to construct an instance of an invalid type, type id: 67026720
Trying to construct an instance of an invalid type, type id: 67026720
Trying to construct an instance of an invalid type, type id: 67067472
Trying to construct an instance of an invalid type, type id: 67067472
Trying to construct an instance of an invalid type, type id: 67112304
Trying to construct an instance of an invalid type, type id: 67112304
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 318315696
Trying to construct an instance of an invalid type, type id: 67183312
Trying to construct an instance of an invalid type, type id: 67183312
Trying to construct an instance of an invalid type, type id: 67154928
Trying to construct an instance of an invalid type, type id: 67154928
Trying to construct an instance of an invalid type, type id: 67242064
Trying to construct an instance of an invalid type, type id: 67242064
Trying to construct an instance of an invalid type, type id: 67311920
Trying to construct an instance of an invalid type, type id: 67311920
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 67443193
Trying to construct an instance of an invalid type, type id: 67443193
Trying to construct an instance of an invalid type, type id: 67286288
Trying to construct an instance of an invalid type, type id: 67286288
Trying to construct an instance of an invalid type, type id: 67325664
Trying to construct an instance of an invalid type, type id: 67325664
Trying to construct an instance of an invalid type, type id: 67582521
Trying to construct an instance of an invalid type, type id: 67582521
Trying to construct an instance of an invalid type, type id: 67735392
Trying to construct an instance of an invalid type, type id: 67735392
Trying to construct an instance of an invalid type, type id: 49942640
Trying to construct an instance of an invalid type, type id: 49942640
Trying to construct an instance of an invalid type, type id: 44961808
Trying to construct an instance of an invalid type, type id: 44961808
Trying to construct an instance of an invalid type, type id: 67832608
Trying to construct an instance of an invalid type, type id: 67832608
Trying to construct an instance of an invalid type, type id: 67890752
Trying to construct an instance of an invalid type, type id: 67890752
Trying to construct an instance of an invalid type, type id: 67951856
Trying to construct an instance of an invalid type, type id: 67951856
Trying to construct an instance of an invalid type, type id: 67804736
Trying to construct an instance of an invalid type, type id: 67804736
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 67836449
Trying to construct an instance of an invalid type, type id: 67836449
Trying to construct an instance of an invalid type, type id: 67427008
Trying to construct an instance of an invalid type, type id: 67427008
Trying to construct an instance of an invalid type, type id: 68147728
Trying to construct an instance of an invalid type, type id: 68147728
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 318317232
Trying to construct an instance of an invalid type, type id: 250
Trying to construct an instance of an invalid type, type id: 250
Trying to construct an instance of an invalid type, type id: 68205824
Trying to construct an instance of an invalid type, type id: 68205824
Trying to construct an instance of an invalid type, type id: 68205584
Trying to construct an instance of an invalid type, type id: 68205584
Segmentation fault (core dumped)

Version info
ubuntu@201208-11538:~$ dpkg -l | grep -e plainbox -e checkbox -e canonical | awk '{print $2 " " $3}'
canonical-certification-client 0.14+bzr3532+pkg46~ubuntu12.04.1
checkbox 0.17.10+bzr2829+pkg77+legacy1~ubuntu12.04.1
checkbox-certification 0.20+bzr653+201412250646~ubuntu12.04.1
checkbox-certification-client 0.20+bzr653+201412250646~ubuntu12.04.1
checkbox-certification-tools 0.20+bzr653+201412250646~ubuntu12.04.1
checkbox-gui 0.31+bzr3532+pkg15~ubuntu12.04.1
checkbox-ng 0.17+bzr3532+pkg24~ubuntu12.04.1
checkbox-ng-service 0.17+bzr3532+pkg24~ubuntu12.04.1
checkbox-qt 0.17.10+bzr2829+pkg77+legacy1~ubuntu12.04.1
plainbox-glmark2-es2-meta 0.14+bzr3532+pkg46~ubuntu12.04.1
plainbox-insecure-policy 0.19+bzr3532+pkg21~ubuntu12.04.1
plainbox-provider-certification-client 0.14+bzr3532+pkg46~ubuntu12.04.1
plainbox-provider-checkbox 0.18+bzr3532+pkg18~ubuntu12.04.1
plainbox-provider-resource-generic 0.16+bzr3532+pkg17~ubuntu12.04.1
python3-checkbox 0.17.10+bzr2829+pkg77+legacy1~ubuntu12.04.1
python3-checkbox-ng 0.17+bzr3532+pkg24~ubuntu12.04.1
python3-checkbox-support 0.17+bzr3532+pkg18~ubuntu12.04.1
python3-plainbox 0.19+bzr3532+pkg21~ubuntu12.04.1

Related branches

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

ubuntu@201208-11538:~$ apt-cache policy checkbox
checkbox:
  Installed: 0.17.10+bzr2829+pkg77+legacy1~ubuntu12.04.1
  Candidate: 0.17.10+bzr2829+pkg77+legacy1~ubuntu12.04.1
  Version table:
 *** 0.17.10+bzr2829+pkg77+legacy1~ubuntu12.04.1 0
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     0.13.10 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     0.13.7 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
ubuntu@201208-11538:~$ apt-cache policy plainbox
plainbox:
  Installed: (none)
  Candidate: 0.19+bzr3532+pkg21~ubuntu12.04.1
  Version table:
     0.19+bzr3532+pkg21~ubuntu12.04.1 0
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu/ precise/main amd64 Packages

Ara Pulido (ara)
Changed in checkbox-gui:
importance: Undecided → Critical
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

$ qmake -v
QMake version 3.0
Using Qt version 5.0.2 in /usr/lib/x86_64-linux-gnu

I'm pretty sure that we need at least 5.2.1 to run the SDK

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I cannot reproduce this on a 12.04 VM with source-built stuff. Trying the PPA next

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Cannot reproduce with:

zyga@lucayan:~$ LANGUAGE=en apt-cache policy checkbox-ng checkbox-gui
checkbox-ng:
  Installed: 0.17+bzr3532+pkg24~ubuntu12.04.1
  Candidate: 0.17+bzr3532+pkg24~ubuntu12.04.1
  Version table:
 *** 0.17+bzr3532+pkg24~ubuntu12.04.1 0
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
checkbox-gui:
  Installed: 0.31+bzr3532+pkg15~ubuntu12.04.1
  Candidate: 0.31+bzr3532+pkg15~ubuntu12.04.1
  Version table:
 *** 0.31+bzr3532+pkg15~ubuntu12.04.1 0
        500 http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've reproduced this:
 - deselect all jobs but the poweroff test
 - run the test (the test is broken, separate bug)
 - see checkbox-ng crashing on (below)
 - see checkbox-gui go down with it

ERROR checkbox.ng.dbus_ex: Unable to read property <dbus.service.property 'via'> from <checkbox_ng.service.JobDefinitionWrapper at /plainbox/job/f30de883911c7b5a06624952812f026e02e9709b938225cbaa9a2a99690a44ae at 0x3a59bd0>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/checkbox_ng/dbus_ex/service.py", line 398, in GetAll
    prop_value = prop.__get__(self, self.__class__)
  File "/usr/lib/python3/dist-packages/checkbox_ng/dbus_ex/service.py", line 198, in __get__
    return self._getf(instance)
  File "/usr/lib/python3/dist-packages/checkbox_ng/service.py", line 376, in via
    state = session_obj.job_state_map[self.native.id]
KeyError: '2013.com.canonical.certification::touchscreen/touchscreen_after_suspend'

Changed in checkbox-gui:
status: New → In Progress
assignee: nobody → Zygmunt Krynicki (zkrynicki)
affects: checkbox-gui → checkbox-ng
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

(Pdb) set(session_obj.job_state_map) - set([job.id for job in session_obj.job_list])
set()

This is one line above the crash.

Yet:

(Pdb) self.native.id in session_obj.job_state_map
False

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

In the comment above, self.native.id was: '2013.com.canonical.certification::firmware/fwts_logs'

Now before the crash is triggered, this happens:

INFO checkbox.ng.service: _job_removed(<JobDefinition id:'2013.com.canonical.certification::firmware/fwts_logs' plugin:'local'>)

This explains why we get the two expressions in the previous comment to behave as they did.

Now as to why the job is still there, let's see

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Ah, so I guess I get it now. In retrospective, it's pretty logical:

1) Job definitions are either generated (and thus bound to a session) or not (and thus bound to a provider)
2) The .via property was previously a mutable state on a job. Now it is something one can access from session-bound JobState.
2a) this means that .via cannot be accessed before a session exists
2b) this means that .via cannot be accessed if a session doesn't contain a given job (despite that job existing).

In the past, via was always accessible, perhaps holding nothing or perhaps holding stale data (from previous session run).
Currently when 2[ab] happen, we crash.

The fix is to simply return "" when there is no session or there is no corresponding JobState in the session.

Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
milestone: none → 0.17
Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: In Progress → Fix Committed
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.