FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Intermittent 404s during summarize

Open arinwt opened this issue 6 years ago • 7 comments

Error 404s are due to nodes not found:

End OpStreamController.ExecuteAsync (System.Web.Http.Controllers) Microsoft.Antler.Schemas.Prague.ElementNotFoundPragueException: Cannot locate node with path 'defaultComponent/b3769558-4e99-49dc-a5d0-a8602ee22526/header' under 'bOxEAAAABAAAABgAAAA==' for part b3769558-4e99-49dc-a5d0-a8602ee22526

arinwt avatar Apr 22 '20 19:04 arinwt

@arinwt, do we have enough data in telemetry to get that error message? If not, is the issue in telemetry, or we are missing right info in response?

vladsud avatar Apr 22 '20 21:04 vladsud

I am wondering the same thing; when I find a doc to reproduce the issue with, I will try to find out.

I have a feeling it might be lost in the underlying odsp driver, because it might be in the body of the response. In the past, I have tried to grab the body but can't do so while debugging since it is an async stream.

arinwt avatar Apr 22 '20 21:04 arinwt

I still haven't reproduced this issue, but looking at telemetry, I'm seeing that it seems to occur directly after server 500 errors or other errors.

These 2 docIds both occur directly after 500 errors:

  • jlAr6sZpyo7zE%2BrSqzwmqO7In46gr%2FZotDoUS59Mbj8%3D
  • WO5DwwffDVHtf2tGuzgvDp4IAzRu3TR702EfV7e2WBg%3D

This one occurs with same clientId as parent container + assert error in summarizer, and also getting a SummaryAckWaitTimeout. I suspect Summarizer client is getting screwed in this scenario.

  • OBQ2svKyrYROJ7yZrgjIjy1XiyCep5t5fBkT%2BZN4JPU%3D

Using the following pair of queries to investigate

Office_Fluid_FluidRuntime_Generic
| union Office_Fluid_FluidRuntime_Performance
| union Office_Fluid_FluidRuntime_Error
| where Data_eventName == "fluid:telemetry:Summarizer:Summarizing_cancel"
| where Data_error == "Error 404 from the server, msg = , type = cors"
// | where Data_sprequestguid == "bf0d4b9f-8074-0000-cbe6-706eab761ffa"
// | where Data_docId == "jlAr6sZpyo7zE%2BrSqzwmqO7In46gr%2FZotDoUS59Mbj8%3D"
| top 100 by Event_Time desc | project Event_Time, Data_docId, Data_sprequestguid

Office_Fluid_FluidRuntime_Generic
| union Office_Fluid_FluidRuntime_Performance
| union Office_Fluid_FluidRuntime_Error
| where Data_docId == "jlAr6sZpyo7zE%2BrSqzwmqO7In46gr%2FZotDoUS59Mbj8%3D"
| where dayofyear(Event_Time) == dayofyear(datetime(2020-04-21 21:40:09.9830016))
| sort by Event_Time asc, Event_Sequence asc
| project Event_Time, Data_eventName, Data_error, Data_clientType, Data_clientId, Data_onBehalfOf

arinwt avatar Apr 24 '20 23:04 arinwt

Found a likely root cause for this: when retrying summarizing in safe mode, it will update the latest summary sequence number to the current ref seq number, but that isn't correct!

Options:

  1. We can get the exact sequence number by also downloading the snapshot and parsing it from protocol attributes.
  2. We can choose to not update the last acked summary sequence number, since that is safer. The drawback being that we may not be getting the latest sequence, meaning we may re-summarizing unnecessarily. This is probably an adequate solution since we currently only hit this solution during retry in safe mode- and safe mode does a "fullTree" summary anyway.

arinwt avatar Apr 30 '20 02:04 arinwt

While testing the fix for the above issue, I found that 404s are still possible because of the blob cache in OdspDocumentStorageManager. It can't seem to find the blobs using the path of uncommitted summaries, but the cache doesn't remove them.

@jatgarg - we need to address this

arinwt avatar Apr 30 '20 06:04 arinwt

While testing the fix for the above issue, I found that 404s are still possible because of the blob cache in OdspDocumentStorageManager. It can't seem to find the blobs using the path of uncommitted summaries, but the cache doesn't remove them.

@jatgarg - we need to address this

So for odsp, we never refer to uncommitted summaries. We always refer to the previous summary.

jatgarg avatar Apr 30 '20 23:04 jatgarg

PR for proposed handle issueL https://github.com/microsoft/FluidFramework/pull/2009

jatgarg avatar May 04 '20 06:05 jatgarg