The SIO2 project
  1. The SIO2 project
  2. SIO-1254

Problem reupload causes evaluating submission error

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Current Version, 0.1.10
    • Component/s: OIOIOI
    • Labels:
      None

      Description

      Sentry: SZKOPUL-8, SZKOPUL-9

      Traceback (most recent call last):
        File "/home/sio2/sio2/oioioi/oioioi/evalmgr/__init__.py", line 137, in evalmgr_job
          env = _run_phase(env, phase)
        File "/home/sio2/sio2/oioioi/oioioi/evalmgr/__init__.py", line 67, in _run_phase
          env = handler_func(env, **kwargs)
        File "/home/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/transaction.py", line 224, in inner
          return inner
        File "/home/sio2/sio2/oioioi/oioioi/programs/handlers.py", line 368, in make_report
          submission, submission_report = _make_base_report(env, kind)
        File "/home/sio2/sio2/oioioi/oioioi/programs/handlers.py", line 328, in _make_base_report
          submission = Submission.objects.get(id=env['submission_id'])
        File "/home/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 131, in get
          return self.get_query_set().count()
        File "/home/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get
          If the QuerySet is already fully cached this simply returns the length
      DoesNotExist: Submission matching query does not exist.

        Issue Links

          Activity

          Hide
          Cezary Siłuszyk added a comment -
          It seems that error occurs only if reuploaded problem has more than one model solutions.
          Show
          Cezary Siłuszyk added a comment - It seems that error occurs only if reuploaded problem has more than one model solutions.
          Hide
          Maciej Borsz added a comment -
          In my opinion error occurs only if you reupload problem when previous ModelSolution has not been judged yet. Reuploading removes all previous ModelSolutions even if they are during judgment. Judge code assumes that Submission won't be removed during judgment and raises exception.
          Show
          Maciej Borsz added a comment - In my opinion error occurs only if you reupload problem when previous ModelSolution has not been judged yet. Reuploading removes all previous ModelSolutions even if they are during judgment. Judge code assumes that Submission won't be removed during judgment and raises exception.
          Hide
          Cezary Siłuszyk added a comment -
          I don't think so... Error occurs even if I reupload problem after judging all submissions. But when I rejudge manually this model solutions and after rejudge reupload this package there is no error.
          Show
          Cezary Siłuszyk added a comment - I don't think so... Error occurs even if I reupload problem after judging all submissions. But when I rejudge manually this model solutions and after rejudge reupload this package there is no error.
          Hide
          Szymon Acedański added a comment -
          This is somewhat tricky. Every time we re-upload a package, all model solutions are re-added. This triggers regeneration of model submissions, but this many times as we have model solutions. That's why many rejudges fail, trying to evaluate submissions that existed milliseconds.

          I have a fix for this committed locally on oioioi.dasie.mimuw.edu.pl (not spamming admins specifically in the case, when the evaluation of non-existent submission fails), pending later merge.
          Show
          Szymon Acedański added a comment - This is somewhat tricky. Every time we re-upload a package, all model solutions are re-added. This triggers regeneration of model submissions, but this many times as we have model solutions. That's why many rejudges fail, trying to evaluate submissions that existed milliseconds. I have a fix for this committed locally on oioioi.dasie.mimuw.edu.pl (not spamming admins specifically in the case, when the evaluation of non-existent submission fails), pending later merge.
          Hide
          Gerrit Gerrit added a comment -
          Change Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369, patchset 1
          https://gerrit.sio2project.mimuw.edu.pl/1761

          SIO-1254 Do not spam admins when evaluation of a deleted submission fails

          Change-Id: Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369
          Show
          Gerrit Gerrit added a comment - Change Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369, patchset 1 https://gerrit.sio2project.mimuw.edu.pl/1761 SIO-1254 Do not spam admins when evaluation of a deleted submission fails Change-Id: Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369
          Hide
          Gerrit Gerrit added a comment -
          Change Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369, patchset 2
          https://gerrit.sio2project.mimuw.edu.pl/1761

          SIO-1254 Do not spam admins when evaluation of a deleted submission fails

          Change-Id: Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369
          Show
          Gerrit Gerrit added a comment - Change Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369, patchset 2 https://gerrit.sio2project.mimuw.edu.pl/1761 SIO-1254 Do not spam admins when evaluation of a deleted submission fails Change-Id: Ic0a8a29f6d78891ad3db2eb8c6ae563a7629a369
          Hide
          Michał Łazowik added a comment -
          We have a regression: https://sentry.io/the-sio2-project/szkopul/issues/229822174/

          Bonus: each job creates two error, the 2nd one happens when trying to set SE status the the submission: https://sentry.io/the-sio2-project/szkopul/issues/229822231/
          Show
          Michał Łazowik added a comment - We have a regression: https://sentry.io/the-sio2-project/szkopul/issues/229822174/ Bonus: each job creates two error, the 2nd one happens when trying to set SE status the the submission: https://sentry.io/the-sio2-project/szkopul/issues/229822231/
          Hide
          Michał Łazowik added a comment -
          Btw. I'd suggest a more flexible solution: a separate logger for these errors, so you can set where it is sent and logged in django logging configuration instead in code.
          Show
          Michał Łazowik added a comment - Btw. I'd suggest a more flexible solution: a separate logger for these errors, so you can set where it is sent and logged in django logging configuration instead in code.

            People

            • Assignee:
              Szymon Acedański
              Reporter:
              Cezary Siłuszyk
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: