DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
741 stars 260 forks source link

Judgedaemon dies when server runs into max_allowed_packet #396

Closed meisterT closed 6 years ago

meisterT commented 6 years ago

To reproduce, set max_allowed_packet to 1M and do cd tests ; make test-normal.

The judgedaemon should not crash but get a useful error message back and disable the problem with an internal error.

Log snippet: [2018-07-28 09:59:54] request.INFO: Matched route "fallback". {"route":"fallback","route_parameters":{"_controller":"legacy.controller.fallback:fallback","path":"api/v4/judging_runs","_route":"fallback"},"request_uri":"http://localhost/domjudge/api/v4/judging_runs","method":"POST"} [] [2018-07-28 09:59:54] security.INFO: Basic authentication Authorization header found for user. {"username":"judgehost"} [] [2018-07-28 09:59:54] request.CRITICAL: Uncaught PHP Exception RuntimeException: "MySQL error 1153: Got a packet bigger than the configured "max_allowed_packet" (current query was ~4MB)." at /home/sitowert/domjudge/lib/lib.database.php line 317 {"exception":"[object] (RuntimeException(code: 0): MySQL error 1153: Got a packet bigger than the configured \"max_allowed_packet\" (current query was ~4MB). at /home/sitowert/domjudge/lib/lib.database.php:317)"} []

meisterT commented 6 years ago

I've now added an explicit config check and will close the issue as we have good error messages now and you'll hit it during contest setup if at all.