testmycode / tmc-server

Test My Code exercise server used by e.g. http://mooc.fi/
GNU General Public License v2.0
46 stars 41 forks source link

When submission size exceed free disk space on sandbox don't even send it to the sandbox #253

Open jamo opened 9 years ago

jamo commented 9 years ago

e.g. https://tmc.mooc.fi/mooc/submissions/759113#logs contained 164M text file and we run out of space on sandbox.

Really we should have just warned that submission exceeds max submission size.

[3.296072] tar: ./src/sanat.txt: Wrote only 4096 of 10240 bytes
[4.461435] tar: ./src/sanakirja/Main.java: Cannot write: No space left on device
[4.461547] tar: ./src/sanakirja/MuistavaSanakirja.java: Cannot write: No space left on device
[4.461805] tar: ./test/tmp/tmp65111.txt: Cannot write: No space left on device
[4.461988] tar: ./test/MuistavaSanakirjaTest.java: Cannot write: No space left on device
[4.462106] tar: ./test/sanat.txt: Cannot write: No space left on device
[4.469226] tar: Exiting with failure status due to previous errors
[4.469559] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
jamo commented 9 years ago

We probably should add warning for the user should the submission exceed per exercise/per course(/per instance) set default size limit. And still submit it to the sandbox, as we currently are unable to confirm max allowed space on the sandbox