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
"Could not read archive" error when trying to examine a submission #1461
Comments
Hi Bryan, we've faced similar issues previously during testing when tarfiles created from an environment that resembles the Andrew servers results in the error you mentioned. In our case we faced the issue when testing our Git Submission feature on a bare metal installation of Autolab on AFS, and the tar command that Rails forks in order to tar a student's repository creates an archive that cannot be read. @cg2v resolved the issue on the deployment side but we're not sure how. @cg2v is it possible to elaborate on how you fixed it? Thanks! |
@fanpu Thanks for your response! I'd be very interested in the workaround that the Andrew folks came up with. |
The internal reader in autolab that's used for submission view uses Gem::Package::TarReader from rubygems to read tar files. Depending on which exception occurs when reading the archive, either rubygems/rubygems#3146 or rubygems/rubygems#2213 could be the cause. The fix is to upgrade rubygems to at least 3.2 when building the image ( |
@cg2v Thanks very much for the tip! That seems to have done the trick! FWIW, when editing the Dockerfile (https://github.com/autolab/Autolab/blob/526b3b6767f61c69b922bab8345349f23f1b47cc/Dockerfile), adding
deep in the bowels of Moving the Thanks very much for the help! |
Your environment
We're using AutoLab's Docker (https://github.com/autolab/docker) as of commit
b98f28d254036d9ffc6d349ca27191cf37ddd687
.Steps To Reproduce
In the attached zip file submissions.zip,
there are two tar files. If we submit
handin-bad.tar
to an assignment, the Autograder appears to execute successfully (since the points for the problems populate correctly), but when you click on the more detail link to see the contents of the assignment and the Autograder output, you get a 500 error from the website and an error message saying "Could not read archive".FWIW, the code that generates this message appears to be this line:
Autolab/app/controllers/submissions_controller.rb
Line 290 in 7677e55
There are other places that return that message, but I modified the code to indicate which one it is and to print the actual error message, which turns out to be:
The bad
handin.tar
file was produced on thelinux.ece.cmu.edu
servers using:where the version of
tar
istar (GNU tar) 1.30
. We see similar behavior if we run the tar command on the Andrew servers.However, if I untar the archive on my machine and tar it back up with the same command, we get the
handin-good.tar
file, which doesn't provoke the error message. My version oftar
isbsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
.Current behavior
See above re: error message.
Expected behavior
The submission loads properly.
Any tips or assistance would be much appreciated.
The text was updated successfully, but these errors were encountered: