Affects Version/s: 19.7 [Tentative], 20.3, 21.0, 22.0 [Tentative]
Add the lessons tool to a site Add text content to that lesson page Add a subpage Choose Existing Page choose itself as the subpage (to create a circular loop) Save in the database manually force the subpage's sakaiId to be "0" update lesson_builder_items set sakaiId = "0" where id = <lesson page's item id>; click Print All or View All getSubPagePath() will get into an infinite loop.
- Add the lessons tool to a site
- Add text content to that lesson page
- Add a subpage
- Choose Existing Page
- choose itself as the subpage (to create a circular loop)
- in the database manually force the subpage's sakaiId to be "0"
- click Print All or View All
- getSubPagePath() will get into an infinite loop.
We're seeing some odd recursion in heap dumps from failed Sakai 20 nodes. An example of the recursion:
"Lessons Page Name > Lesson Item Title > " repeated thousands of times (filling the heap, causing GCs, node failing)
I dug into the DB on one of these and the sakaiID was zero, the site was deleted, the pages were effectively orphaned in the DB.
n our case the lesson_builder_items record had a pageId = 0 and sakaiId = 0, but I could never track down the site it belonged to. With a pageId = 0, I think that could also mean it's a top level page (aka appears in the tool nav.), but I couldn't find any references to it in sakai_site_tool. I also tried setting the pageId to a page I owned in my own site, so no one would be able to reach it. But the GC looping still happened, so perhaps, some other page was still referencing it?
another thing to look out for in the heap dumps using YourKit, is that the looping lessons page might not show up in the main Dominator Tree page. But if you go to inspections, then run the "Duplicate Objects" checker, sometimes the bad lessons page would show up there.