session manager can crash attempting to remove a phantom dependency
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PlainBox (Toolkit) |
Fix Released
|
Medium
|
Zygmunt Krynicki |
Bug Description
This bug is a continuation of bug 1443895
What, I think, the traceback below is telling me is that the following situation is causing plainbox to crash:
JobA:
requires JobB
session = SessionState(
session.
# This will see that JobB is not know and thus try to fix the issue by removing it. The problem is that JobB doesn't exist and it is JobA that should be removed.
Traceback (most recent call last):
File "/home/
next_job = self._job_
KeyError: '2013.com.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/
self._job_list, self._desired_
File "/home/
return cls(job_
File "/home/
self.
File "/home/
self.
File "/home/
raise DependencyMissi
plainbox.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/
return self.dispatch_
File "/home/
return ns.command.
File "/home/
self.
File "/home/
return self.do_
File "/home/
self.
File "/home/
self.
File "/home/
problem_list = self.state.
File "/home/
self.
ValueError: list.remove(x): x not in list
Related branches
- Maciej Kisielewski (community): Approve
-
Diff: 80 lines (+38/-2)3 files modifiedplainbox/plainbox/impl/depmgr.py (+10/-0)
plainbox/plainbox/impl/session/state.py (+15/-2)
plainbox/plainbox/impl/session/test_state.py (+13/-0)
Changed in plainbox: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Zygmunt Krynicki (zyga) |
Changed in plainbox: | |
status: | Confirmed → In Progress |
milestone: | none → 0.21 |
Changed in plainbox: | |
status: | In Progress → Fix Committed |
Changed in plainbox: | |
status: | Fix Committed → Fix Released |
Ah, the code there is correct. It seems the error is only happening when two errors affect the same job so we remove it and then die trying to remove it again.