via job cycles cause infinite recursion in get_or_create_category_node()

Bug #1441993 reported by Po-Hsu Lin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Fix Released
Critical
Zygmunt Krynicki

Bug Description

Step to reproduce this:

$ bzr branch lp:checkbox -r 3661
run checkbox-cli in venv
$ ./mkvenv /tmp/working
$ . /tmp/working/bin/active
$ checkbox-cli
Select the 'client-cert' whitelist to start.

The resource job section will complain about:
ERROR plainbox.ctrl: Ignoring invalid generated job None: Problem with field id: missing

And it will crash with
  File "/home/ubuntu/src/tmp/checkbox/plainbox/plainbox/impl/job.py", line 224, in get_or_create_category_node
    category_node = self.create_category_node(category_job)
  File "/home/ubuntu/src/tmp/checkbox/plainbox/plainbox/impl/job.py", line 250, in create_category_node
    if category_job.summary == category_job.partial_id:
  File "/home/ubuntu/src/tmp/checkbox/plainbox/plainbox/impl/unit/job.py", line 260, in summary
    return self.get_record_value('summary', self.partial_id)
  File "/home/ubuntu/src/tmp/checkbox/plainbox/plainbox/impl/unit/job.py", line 252, in partial_id
    return self.get_record_value('id', self.get_record_value('name'))
  File "/home/ubuntu/src/tmp/checkbox/plainbox/plainbox/impl/unit/unit.py", line 593, in get_record_value
    if value is not None and self.is_parametric:
RuntimeError: maximum recursion depth exceeded

Please refer to the attachment for the full error log.

Related branches

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

I do a bisect for this, it looks like it happened on revision 3661,
here is the MR http://bazaar.launchpad.net/~checkbox-dev/checkbox/trunk/revision/3661

Zygmunt Krynicki (zyga)
Changed in plainbox:
importance: Undecided → Critical
milestone: none → 0.21
Zygmunt Krynicki (zyga)
summary: - checkbox-cli would crash with rev 3661(plainbox.ctrl, problem with field
- id: missing)
+ infinite recursion in checkbox-ng menu
Changed in plainbox:
status: New → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
Zygmunt Krynicki (zyga)
description: updated
Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: infinite recursion in checkbox-ng menu

13:23 <@zyga> hah
13:23 <@zyga> I get it
13:23 <@zyga> __resource__ is its own via job :)

summary: - infinite recursion in checkbox-ng menu
+ via job cycles cause infinite recursion in get_or_create_category_node()
Changed in plainbox:
status: In Progress → Fix Committed
Changed in plainbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.