-
Notifications
You must be signed in to change notification settings - Fork 193
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
Tycho 4.0.10: Stackoverflow when fetching from p2 repository that responds with 301 #4451
Comments
also saw problems similarly here
|
@merks true, but still imho a solid implementation in tycho should protect itself against a redirect loop as it can happen any time by accident - also via multiple redirect steps (across multiple servers) |
Indeed, even firefox doesn't go into a tailspin but rather detects the cycle. It would be even trickier to implement detection if the cycle is longer... |
Jumping on the train, we have the same exact error. I noticed the error happening in 4.0.8 but suspect it to also happen in 4.0.10 as the implementation hasn't changed. It started this morning and is highly blocking our pipelines. It seems that in Is there a way to disable the cache for now to continue working while the loop gets fixed in Tycho? I will try to see if I can propose a fix real quick. Dumping a few looks, maybe they are useful (or not): |
If the problem is the same as above with a bad mirror it should be possible to suppress the use of mirrors, maybe with |
It should be possible, yes, I will have to test it tho. But generally speaking, when Tycho encounters a redirect that is the same as before, it should remove it from the cache (if it was already there) and handle it like it is non-cached. Then maybe it should not use mirrors for this very URI. |
Do you like to provide an integration-test to demonstrate the issue? That way we would make sure it does not reoccur in the future if it is fixed. |
In case of a redirection loop for URI of a p2 repository, fail fast on a redirection loop. In this case provide a warning to the user and let the rest be handled by Tycho. Otherwise there might be a StackOverflowError due to the recursion used and no check for whether the base URI is the same as the redirected URI. This links to eclipse-tycho#4451 but does not fix it, only raising visibility for such cases.
I have a small PR for providing visibility in such cases (including which URI is the one causing this in one glance). This does not fix the issue here and I have to say I have no idea how to create an IT for that. My guess would be to set up a small web server hosting a simple "p2 repository" for which the web server is redirecting it to itself? Or am I thinking to complex here 😄 |
@merks Using |
I'm glad to be of limited help and glad this unblocks folks for the time being. Thanks also for the feedback that this actually works. |
Today the issue 2358 re-occurred with Tycho 4.0.10 when the p2 server respond with a "301 Moved Permanently".
This is the log out from tycho:
When trying to download the file manually using wget I see it got moved permanently:
The text was updated successfully, but these errors were encountered: