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

V2 feed parser doesn't have retry mechanism #5322

Closed
alpaix opened this issue Jun 1, 2017 · 2 comments
Closed

V2 feed parser doesn't have retry mechanism #5322

alpaix opened this issue Jun 1, 2017 · 2 comments
Assignees
Labels
Area:HttpCommunication Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Product:VS.Client Type:DCR Design Change Request
Milestone

Comments

@alpaix
Copy link

alpaix commented Jun 1, 2017

V2 feed parser is vulnerable to intermittent network issues. It should get resilient to connectivity problems by getting a retry mechanism implemented similar to or based on existing one added earlier for V3 feed.

This issue results in functional tests flakiness due to slow ecosystem servers.

Typical call stack looks like following:

System.IO.IOException : The read operation failed, see inner exception.
---- System.Net.Http.WinHttpException : The connection with the server was terminated abnormally
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.TimeoutUtility.<StartWithTimeout>d__0`1.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\Utility\TimeoutUtility.cs:line 50
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.DownloadTimeoutStream.<ReadAsync>d__6.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\Utility\DownloadTimeoutStream.cs:line 81
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.Stream.<CopyToAsyncInternal>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.StreamExtensions.<AsSeekableStreamAsync>d__4.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\Utility\StreamExtensions.cs:line 72
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.V2FeedParser.<LoadXmlAsync>d__52.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\LegacyFeed\V2FeedParser.cs:line 560
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.V2FeedParser.<>c__DisplayClass50_0.<<LoadXmlAsync>b__1>d.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\LegacyFeed\V2FeedParser.cs:line 520
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__14`1.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\HttpSource\HttpSource.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.V2FeedParser.<LoadXmlAsync>d__50.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\LegacyFeed\V2FeedParser.cs:line 506
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.V2FeedParser.<QueryV2FeedAsync>d__49.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\LegacyFeed\V2FeedParser.cs:line 454
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.V2FeedParser.<Search>d__42.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\src\NuGet.Core\NuGet.Protocol\LegacyFeed\V2FeedParser.cs:line 258
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.FuncTest.V2FeedParserTests.<V2FeedParser_SearchWithPortableFramework>d__5.MoveNext() in C:\BuildAgent\work\787fa45fbef6ac7c\NuGet.Client\test\NuGet.Core.FuncTests\NuGet.Protocol.FuncTest\V2FeedParserTests.cs:line 173
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
----- Inner Stack Trace -----
@alpaix alpaix self-assigned this Jun 1, 2017
@alpaix alpaix added this to the Future-0 milestone Jun 1, 2017
@emgarten emgarten assigned emgarten and unassigned alpaix Jun 5, 2017
emgarten added a commit to NuGet/NuGet.Client that referenced this issue Jun 5, 2017
Try up to three times when requesting v2 feed pages.

Fixes NuGet/Home#5322
@mishra14 mishra14 added the Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. label Nov 30, 2017
@mishra14
Copy link
Contributor

@emgarten who has a fix in private branch.

@mishra14
Copy link
Contributor

closing in favor of #2269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:HttpCommunication Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Product:VS.Client Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

3 participants