Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submissions can be ignored on the shadow feed if source zip has 0 length file. #1014

Open
johnbrvc opened this issue Nov 7, 2024 · 0 comments
Assignees
Labels
bug Something isn't working high priority Bugs that are high priority (to fix) NEXT Contest Consider fixing for next contet Shadow Bugs relating to Shadow Contest Feature

Comments

@johnbrvc
Copy link
Collaborator

johnbrvc commented Nov 7, 2024

Describe the issue:
In the event feeder client shadow mode, if the zip file containing the user source code (and auxiliary files) contains a zero length file, the submission is ignored and an error is generated.

To Reproduce:

  1. You'll have to create a contest to shadow and act as a primary CCS.
  2. Shadow the contest in another instance of PC2.
  3. On the shadow, start shadowing.
  4. Generate a contestant submission on the primary CCS that has a main source file and an empty auxiliary file.
  5. The submission will be ignored and an error will appear on the shadow indicating the submission failed.

Expected behavior:
The submission should not be ignored and no error should occur if a source zip contains a zero length file.

Actual behavior:
As described above, the submission is tossed and an error generated.

Environment:
All.

Log Info:

Screenshots:

Additional context:
The issue is related to the fact that PC2 reads the zip as a stream. If there is a zero length file in the zip, this fails. The exact issue is described here: OpenJDK Bug Report
The solution is to save the stream to a file first, the use ZipFile to extract it.
There is a fix for this in this branch: JohnB's branch for combined scoreboards and this commit. It will be integrated in the main develop branch after regionals. Affected file: ecs/pc2/shadow/RemoteContestAPIAdapter.java

@johnbrvc johnbrvc added bug Something isn't working high priority Bugs that are high priority (to fix) Shadow Bugs relating to Shadow Contest Feature NEXT Contest Consider fixing for next contet labels Nov 7, 2024
@johnbrvc johnbrvc self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority Bugs that are high priority (to fix) NEXT Contest Consider fixing for next contet Shadow Bugs relating to Shadow Contest Feature
Projects
None yet
Development

No branches or pull requests

1 participant