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

Workshop cron failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 2.4.3
    • Workshop
    • PostgreSQL 9.0.13 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54), 64-bit
    • MOODLE_24_STABLE

      We had a problem where, when a member of staff tried to go to the workshop allocation page, they got a page-full of errors. (In one case enough HTML to crash their web browser!)

      So, to try to get the workshop out of that state, they switched it to Scheduled allocation. That caused cron to crash. The cron output stopped here:

      Processing module function workshop_cron ...... started 23:38:19 : 112.6MB
       processing workshop subplugins ... 
      Starting workshop allocation methods 
      Processing cron function for workshopallocation_scheduled... 
       started 23:38:19 : 113.6MB 
      ... executing scheduled allocation in 1 workshop(s) ... 
      

      Looking in the PHP logs, we have this error:

      [16-Sep-2013 23:38:19 Europe/London] Default exception handler: Error reading from database Debug: ERROR:  missing FROM-clause entry for table "u"
      LINE 39: ...ws.example = 0 AND ws.workshopid = $32)  ORDER BY u.lastname...
                                                                    ^
      SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email
                        FROM mdl_user u
                        JOIN (SELECT DISTINCT eu1_u.id
                    FROM mdl_user eu1_u
                  JOIN mdl_role_assignments eu1_ra3 ON (eu1_ra3.userid = eu1_u.id AND eu1_ra3.roleid IN (13,1,14) AND eu1_ra3.contextid IN (1,2508,596153,700610))
      JOIN mdl_groups_members eu1_gm ON (eu1_gm.userid = eu1_u.id AND eu1_gm.groupid = $1)
      JOIN mdl_user_enrolments eu1_ue ON eu1_ue.userid = eu1_u.id
      JOIN mdl_enrol eu1_e ON (eu1_e.id = eu1_ue.enrolid AND eu1_e.courseid = $2)
                 WHERE eu1_u.deleted = 0 AND eu1_u.id <> $3 AND eu1_ue.status = $4 AND eu1_e.status = $5 AND eu1_ue.timestart < $6 AND (eu1_ue.timeend = 0 OR eu1_ue.timeend > $7)) je ON (je.id = u.id AND u.deleted = 0)  JOIN mdl_workshop_submissions ws ON (ws.authorid = u.id AND ws.example = 0 AND ws.workshopid = $8) 
       UNION 
      SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email
                        FROM mdl_user u
                        JOIN (SELECT DISTINCT eu2_u.id
                    FROM mdl_user eu2_u
                  JOIN mdl_role_assignments eu2_ra3 ON (eu2_ra3.userid = eu2_u.id AND eu2_ra3.roleid IN (13,1,14) AND eu2_ra3.contextid IN (1,2508,596153,700610))
      JOIN mdl_groups_members eu2_gm ON (eu2_gm.userid = eu2_u.id AND eu2_gm.groupid = $9)
      JOIN mdl_user_enrolments eu2_ue ON eu2_ue.userid = eu2_u.id
      JOIN mdl_enrol eu2_e ON (eu2_e.id = eu2_ue.enrolid AND eu2_e.courseid = $10)
                 WHERE eu2_u.deleted = 0 AND eu2_u.id <> $11 AND eu2_ue.status = $12 AND eu2_e.status = $13 AND eu2_ue.timestart < $14 AND (eu2_ue.timeend = 0 OR eu2_ue.timeend > $15)) je ON (je.id = u.id AND u.deleted = 0)  JOIN mdl_workshop_submissions ws ON (ws.authorid = u.id AND ws.example = 0 AND ws.workshopid = $16) 
       UNION 
      SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email
                        FROM mdl_user u
                        JOIN (SELECT DISTINCT eu3_u.id
                    FROM mdl_user eu3_u
                  JOIN mdl_role_assignments eu3_ra3 ON (eu3_ra3.userid = eu3_u.id AND eu3_ra3.roleid IN (13,1,14) AND eu3_ra3.contextid IN (1,2508,596153,700610))
      JOIN mdl_groups_members eu3_gm ON (eu3_gm.userid = eu3_u.id AND eu3_gm.groupid = $17)
      JOIN mdl_user_enrolments eu3_ue ON eu3_ue.userid = eu3_u.id
      JOIN mdl_enrol eu3_e ON (eu3_e.id = eu3_ue.enrolid AND eu3_e.courseid = $18)
                 WHERE eu3_u.deleted = 0 AND eu3_u.id <> $19 AND eu3_ue.status = $20 AND eu3_e.status = $21 AND eu3_ue.timestart < $22 AND (eu3_ue.timeend = 0 OR eu3_ue.timeend > $23)) je ON (je.id = u.id AND u.deleted = 0)  JOIN mdl_workshop_submissions ws ON (ws.authorid = u.id AND ws.example = 0 AND ws.workshopid = $24) 
       UNION 
      SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email
                        FROM mdl_user u
                        JOIN (SELECT DISTINCT eu4_u.id
                    FROM mdl_user eu4_u
                  JOIN mdl_role_assignments eu4_ra3 ON (eu4_ra3.userid = eu4_u.id AND eu4_ra3.roleid IN (13,1,14) AND eu4_ra3.contextid IN (1,2508,596153,700610))
      JOIN mdl_groups_members eu4_gm ON (eu4_gm.userid = eu4_u.id AND eu4_gm.groupid = $25)
      JOIN mdl_user_enrolments eu4_ue ON eu4_ue.userid = eu4_u.id
      JOIN mdl_enrol eu4_e ON (eu4_e.id = eu4_ue.enrolid AND eu4_e.courseid = $26)
                 WHERE eu4_u.deleted = 0 AND eu4_u.id <> $27 AND eu4_ue.status = $28 AND eu4_e.status = $29 AND eu4_ue.timestart < $30 AND (eu4_ue.timeend = 0 OR eu4_ue.timeend > $31)) je ON (je.id = u.id AND u.deleted = 0)  JOIN mdl_workshop_submissions ws ON (ws.authorid = u.id AND ws.example = 0 AND ws.workshopid = $32)  ORDER BY u.lastname, u.firstname, u.id
      [array (
        0 => 5774,
        1 => '200381',
        2 => '1',
        3 => 0,
        4 => 0,
        5 => 1379371100,
        6 => 1379371100,
        7 => '1',
        8 => 5775,
        9 => '200381',
        10 => '1',
        11 => 0,
        12 => 0,
        13 => 1379371100,
        14 => 1379371100,
        15 => '1',
        16 => 5776,
        17 => '200381',
        18 => '1',
        19 => 0,
        20 => 0,
        21 => 1379371100,
        22 => 1379371100,
        23 => '1',
        24 => 5778,
        25 => '200381',
        26 => '1',
        27 => 0,
        28 => 0,
        29 => 1379371100,
        30 => 1379371100,
        31 => '1',
      )]
      Error code: dmlreadexception
      * line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
      * line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      * line 764 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      * line 424 of /mod/workshop/locallib.php: call to pgsql_native_moodle_database->get_records_sql()
      * line 91 of /mod/workshop/allocation/random/lib.php: call to workshop->get_potential_authors()
      * line 185 of /mod/workshop/allocation/scheduled/lib.php: call to workshop_random_allocator->execute()
      * line 283 of /mod/workshop/allocation/scheduled/lib.php: call to workshop_scheduled_allocator->execute()
      * line 640 of /lib/cronlib.php: call to workshopallocation_scheduled_cron()
      * line 935 of /mod/workshop/lib.php: call to cron_execute_plugin_type()
      * line 345 of /lib/cronlib.php: call to workshop_cron()
      * line 61 of /admin/cli/cron.php: call to cron_run()
      

      This is running on PostgreSQL 9.0.13 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54), 64-bit

      I am sorry, but I cannot get you the error we were seeing in the Workshop UI. In order to keep our site running, we have disabled the Workshop module on admin/modules.php for now.

            mudrd8mz David Mudrák (@mudrd8mz)
            timhunt Tim Hunt
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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