Actions
Issue #1646
closedIt is theoretically possible for a v2 sync to enter an infinite recursion loop
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
Platform Release:
2.8.5
Target Release - Docker:
2.0.2
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 2
Quarter:
Description
While looking through the code, it occurred to me that this line could theoretically cause the function it is part of to be called synchronously:
If something were to go wrong in acquiring an auth token or with Docker's ability to inspect auth tokens, and we submitted a new request on this line and it failed the same way, download_failed() would get called again inside itself. This could happen a large number of times, leading to the famous MaxRecursionDepthExceeded exception.
As this is theoretical (but not impossible - all it would take is for Docker to have a failure in checking their auth tokens), I'll leave it to the triage team to decide on target release.
Related issues
Actions
Download docker blobs in parallel
closes #1644 closes #1646
Allow Nectar to download with multiple threads at the same time, and allow each thread to update the session's bearer token. It also addresses the possibility of infinite recursion if a download remains unauthorized after retrieving a new token.