TU-Wien-dataLAB / Grader-Service

Grader Service offers lecturers and students a well integrated teaching environment for data science, machine learning and programming classes.
https://grader-service.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
27 stars 2 forks source link

Grader pods gets stuck indefinitely if source code contains null bytes. #190

Closed florian-jaeger closed 5 months ago

florian-jaeger commented 5 months ago

Describe the bug Pods can get stuck indefinitely.

Logs:

[AutogradeApp] Autograding /var/lib/grader-service/convert_out/submission_7390/Assignment_3.ipynb
[AutogradeApp] Converting notebook /var/lib/grader-service/convert_out/submission_7390/Assignment_3.ipynb
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 412, in dispatch_shell
    await result
  File "/opt/conda/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 740, in execute_request
    reply_content = await reply_content
  File "/opt/conda/lib/python3.10/site-packages/ipykernel/ipkernel.py", line 383, in do_execute
    and should_run_async(
  File "/opt/conda/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3130, in should_run_async
    return _should_be_async(cell)
  File "/opt/conda/lib/python3.10/site-packages/IPython/core/async_helpers.py", line 151, in _should_be_async
    code = compile(
ValueError: source code string cannot contain null bytes
[AutogradeApp] ERROR | Timeout waiting for execute reply (720s).
[AutogradeApp] ERROR | Interrupting kernel
[AutogradeApp] ERROR | Timeout waiting for execute reply (720s).
[AutogradeApp] ERROR | Interrupting kernel
[AutogradeApp] ERROR | Timeout waiting for execute reply (720s).
[AutogradeApp] ERROR | Interrupting kernel
[AutogradeApp] ERROR | Timeout waiting for execute reply (720s).
[AutogradeApp] ERROR | Interrupting kernel
[AutogradeApp] ERROR | Timeout waiting for execute reply (720s).
[AutogradeApp] ERROR | Interrupting kernel
[AutogradeApp] ERROR | Timeout waiting for execute reply (720s).
[AutogradeApp] ERROR | Interrupting kernel
[AutogradeApp] ERROR | Timeout waiting for execute reply (720s).

Proposed solution Perform a grading cleanup ofter some time.