-
Task
-
Resolution: Unresolved
-
Major
-
None
-
4.2.6, 4.3.3, 4.4
-
None
-
MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
Originally from MDL-81246,
We faced a lot of failures with PHP 8.3 + the new MSSQL driver. Here there is a job showing the scenarios failing (gradebook, ...)
And this is the ultimate stack trace about the database problems (note that it doesn't appear in the console, only in the HTML output and webserver logs):
Exception - sqlsrv_free_stmt(): supplied resource is not a valid ss_sqlsrv_stmt resource
|
Debug info:
|
Error code: generalexceptionmessage
|
Stack trace:
|
* line 136 of /lib/dml/sqlsrv_native_moodle_recordset.php: TypeError thrown
|
* line 136 of /lib/dml/sqlsrv_native_moodle_recordset.php: call to sqlsrv_free_stmt()
|
* line 80 of /lib/dml/sqlsrv_native_moodle_recordset.php: call to sqlsrv_native_moodle_recordset->close()
|
* line ? of unknownfile: call to sqlsrv_native_moodle_recordset->__destruct()
|
We fixed the bugs in MDL-81246 by checking within the driver when a statement can be closed.
But all of the failures are in the same areas (grade book and reports).
So, maybe, in those areas, there are some code that use recordset but without closing it.
This task is created to find a way to check that automatically.
- has a non-specific relationship to
-
MDL-84967 Recordset not closed in core_analytics\local\analyser\by_course::get_analysables_iterator()
-
- Waiting for peer review
-
-
MDL-81254 Unclosed Gradebook recordsets from users iterator
-
- Closed
-
-
MDL-81246 Detect invalid resources before trying to close them in SQLServer driver
-
- Closed
-
-
MDL-84620 Recordset not closed in tool_brickfield\manager::check_scheduled_areas()
-
- Closed
-
-
MDL-84623 Recordset not closed in tool_dataprivacy\expired_contexts_manager::clear_old_records()
-
- Closed
-
-
MDL-84624 Recordset not closed in core\task\h5p_clean_orphaned_records_task::execute()
-
- Closed
-
-
MDL-84625 Recordset not closed in core_analytics\model::add_prediction_ids()
-
- Closed
-
- will help resolve
-
MDL-80117 Prepare Moodle for PHP 8.4
-
- Open
-
-
MDL-76426 Prepare Moodle for PHP 8.3
-
- Closed
-