-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.7.3, 3.8
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MDL-67405-master
-
This is very big issue, a simple course with all-core modules makes a course totally unusable - course cache can not be built and course can not be displayed to anybody. get_fast_modinfo() is called recursively and it dies when trying to get the lock so it is also impossible to find what caused it. Related issues MDL-33810 and MDL-66936 explain relevant problems (not so critical) but the best solution will be to prevent the recursion in modinfolib.php
Edit: the reason for recursion was fixed in MDL-66936, it needs to be reverted to reproduce this problem
- Create a course
- Add an instance of URL resource, open "URL variables" section and add any variable
- As an admin go to Site administration>Plugins>Filters>Manage filters and enable "Glossary auto linking" filter for content and heading
- Purge caches
- Open the course page - depending on db/lock config you either get out-of-memory or "unable to obtain a lock"
This happens because get_fast_modinfo() is called recursively. I will comment on linked issues suggesting some changes there but even if we fix them, the recursion needs to be prevented.
Simple recursion detection code around line 457 of lib/modinfolib.php will show this backtrace:
Coding error detected, it must be fixed by a programmer: recursion
|
Debug info:
|
Error code: codingerror
|
Stack trace:
|
|
line 459 of /lib/modinfolib.php: coding_exception thrown
|
line 418 of /lib/modinfolib.php: call to course_modinfo->__construct()
|
line 2174 of /lib/modinfolib.php: call to course_modinfo::instance()
|
line 163 of /mod/glossary/classes/local/concept_cache.php: call to get_fast_modinfo()
|
line 279 of /mod/glossary/classes/local/concept_cache.php: call to mod_glossary\local\concept_cache::get_course_concepts()
|
line 79 of /filter/glossary/filter.php: call to mod_glossary\local\concept_cache::get_concepts()
|
line 163 of /filter/glossary/filter.php: call to filter_glossary->get_all_concepts()
|
line 176 of /lib/filterlib.php: call to filter_glossary->filter()
|
line 232 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
|
line 377 of /lib/filterlib.php: call to filter_manager->filter_string()
|
line 1488 of /lib/weblib.php: call to performance_measuring_filter_manager->filter_string()
|
line 463 of /mod/url/locallib.php: call to format_string()
|
line 109 of /mod/url/locallib.php: call to url_get_variable_values()
|
line 247 of /mod/url/lib.php: call to url_get_full_url()
|
line 469 of /course/lib.php: call to url_get_coursemodule_info()
|
line 676 of /lib/modinfolib.php: call to get_array_of_activities()
|
line 468 of /lib/modinfolib.php: call to course_modinfo::inner_build_course_cache()
|
line 418 of /lib/modinfolib.php: call to course_modinfo->__construct()
|
line 2174 of /lib/modinfolib.php: call to course_modinfo::instance()
|
line 163 of /mod/glossary/classes/local/concept_cache.php: call to get_fast_modinfo()
|
line 279 of /mod/glossary/classes/local/concept_cache.php: call to mod_glossary\local\concept_cache::get_course_concepts()
|
line 79 of /filter/glossary/filter.php: call to mod_glossary\local\concept_cache::get_concepts()
|
line 163 of /filter/glossary/filter.php: call to filter_glossary->get_all_concepts()
|
line 176 of /lib/filterlib.php: call to filter_glossary->filter()
|
line 232 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
|
line 377 of /lib/filterlib.php: call to filter_manager->filter_string()
|
line 1488 of /lib/weblib.php: call to performance_measuring_filter_manager->filter_string()
|
line 1233 of /lib/pagelib.php: call to format_string()
|
line 240 of /course/view.php: call to moodle_page->set_title()
|
- has been marked as being related by
-
MDL-33810 Glossary filter needs to be disabled for headings during upgrade
-
- Closed
-
-
MDL-66936 URL resource causes exception in course modinfo cache rebuild
-
- Closed
-
- is a regression caused by
-
MDL-65024 Cache in the modules cminfo relevant information for the get_contents WS
-
- Closed
-