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
Multi-process bagit.validate breaks AIP re-ingest #708
Labels
Type: bug
A flaw in the code that causes the software to produce an incorrect or unexpected result.
Milestone
Comments
jrwdunham
added
the
Type: bug
A flaw in the code that causes the software to produce an incorrect or unexpected result.
label
Aug 10, 2017
Thanks to sevein for figuring out the source of this: it's an incompatibility between Gunicorn's gevent worker class and BagIt's use of multiprocessing. In order for |
qubot
pushed a commit
to artefactual/archivematica-storage-service
that referenced
this issue
Aug 11, 2017
Allows user to configure number of processes to use when calling BagIt-python's ``validate`` method. Using more than one when the Gunicorn worker class is 'gevent' causes BagIt validate to hang. This change warns the user/installer of Archivematica about that in two places.
qubot
pushed a commit
to artefactual/archivematica-storage-service
that referenced
this issue
Aug 11, 2017
Allows user to configure number of processes to use when calling BagIt-python's ``validate`` method. Using more than one when the Gunicorn worker class is 'gevent' causes BagIt validate to hang. This change warns the user/installer of Archivematica about that in two places.
qubot
pushed a commit
to artefactual/archivematica-storage-service
that referenced
this issue
Aug 11, 2017
Allows user to configure number of processes to use when calling BagIt-python's ``validate`` method. Using more than one when the Gunicorn worker class is 'gevent' causes BagIt validate to hang. This change warns the user/installer of Archivematica about that in two places.
helenst
pushed a commit
to JiscSD/archivematica-storage-service
that referenced
this issue
Aug 23, 2017
Allows user to configure number of processes to use when calling BagIt-python's ``validate`` method. Using more than one when the Gunicorn worker class is 'gevent' causes BagIt validate to hang. This change warns the user/installer of Archivematica about that in two places.
helenst
added a commit
to JiscSD/archivematica-storage-service
that referenced
this issue
Aug 23, 2017
Allows user to configure number of processes to use when calling BagIt-python's ``validate`` method. Using more than one when the Gunicorn worker class is 'gevent' causes BagIt validate to hang. This change warns the user/installer of Archivematica about that in two places.
Bug still present (augustus.qa) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Type: bug
A flaw in the code that causes the software to produce an incorrect or unexpected result.
To re-create: using AM qa/1.x and SS qa/0.x, create an AIP and then attempt to do a metadata-only reingest on it. AM should spin its wheels for 5 seconds and then notify you that "Error re-ingesting package: An unknown error occurred." If you insert some logging lines before and after https://github.com/artefactual/archivematica-storage-service/blob/qa/0.x/storage_service/locations/models/package.py#L843, you will see that the log messages after that line do not get called: the call to
bag.validate(processes=4)
hangs indefinitely. If you replace that call with the originalbag.validate()
everything works as normal.Note that the bag should be valid and validation should pass—and does pass when the
processes
kwarg is NOT passed in.I have tried to recreate this issue in a simplified environment but have not had success. The following python script tries multi-process BagIt validation (on a separate thread for good measure) using a bag created on the fly as well as on a preexisting bag called
'breaking-transfer'
that you must place in the same directory as the script. Create a file called testbagit.py and copy this code into it and then callpython testbagit.py
; you should see bagit behaving correctly:Does anyone have any idea what is causing this issue? Are you able to re-create the issue given my description above? I plan to create a SS PR that reverts the
bag.validate(processes=4)
calls tobag.validate()
but obviously I would prefer to keep the multi-process call figure out the real cause of the problem...The text was updated successfully, but these errors were encountered: