Closed
Bug 143634
Opened 23 years ago
Closed 23 years ago
dependency-tree.html.tmpl has infinite loop if there is a dependency loop
Categories
(Bugzilla :: Bugzilla-General, defect, P1)
Tracking
()
RESOLVED
DUPLICATE
of bug 143560
People
(Reporter: gerv, Assigned: gerv)
Details
Attachments
(1 file)
814 bytes,
patch
|
Details | Diff | Splinter Review |
We have code which checks for dependency loops. It obviously isn't working - on
Landfill, bug 4 depends on bug 5, and bug 5 depends on bug 4, and if you go to
the dependency tree of either bug,
May 8 04:41:01 landfill kernel: Out of Memory: Killed process 9995
(showdependencyt).
May 8 04:47:58 landfill kernel: Out of Memory: Killed process 10007
(showdependencyt).
May 8 05:04:48 landfill kernel: Out of Memory: Killed process 10272
(showdependencyt).
May 9 16:35:07 landfill kernel: Out of Memory: Killed process 1104
(showdependencyt).
So, we need to fix the loop-checking code :-)
Gerv
Assignee | ||
Comment 1•23 years ago
|
||
The problem is not in the CGI, but in the template. The CGI's recursion control
works correctly. However, in the template, we do the following in the code for
displaying a single entry:
[% INCLUDE display_tree bug_id=dep_id
IF dep.dependencies.size > 0 && !dep.seen %]
[% dep.seen = 1 %]
Obviously, if there's a recursive loop, dep.seen will never get set to 1 on any
of the bugs in the loop.
The fix is to move the mark to the beginning of the block, as in the attached
patch. I have a local copy of the landfill DB, and this fixes the problem for
me.
Gerv
Assignee | ||
Comment 2•23 years ago
|
||
Tobias - this is your code. Could you review? :-)
Gerv
Comment 3•23 years ago
|
||
+ [% tree.$bug_id.seen = 1 %]
This looks ok since the bug of which the dependencies are shown is marked as
seen. (Fixes A->B->[C->D->]A)
- [% dep.seen = 1 %]
This is equivalent to tree.$dep_id.seen.
(For the case A->B->C->B)
While I can see the point for adding the $bug_id line, I don't think it makes
sense to remove the other line.
if you keep both lines, you get a r=burnus, but note that I didn't do this part
but Myk Melez did.
Comment 4•23 years ago
|
||
Dupe of bug 143560, which has exactly the same patch on it...
See my comments there.
*** This bug has been marked as a duplicate of 143560 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 5•23 years ago
|
||
clearing target in DUPLICATE/WORKSFORME/INVALID/WONTFIX bugs so they'll show up
as untriaged if they get reopened.
Target Milestone: Bugzilla 2.16 → ---
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•