Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81252

Investigate a way to check unclosed recordsets

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.2.6, 4.3.3, 4.4
    • Database SQL/XMLDB
    • 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.

            Unassigned Unassigned
            huongn@moodle.com Huong Nguyen
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.