Uh oh!
There was an error while loading. Please reload this page.
Fix incorrect nativeaot event thread / sequence number on shutdown - #88941
Conversation
ghost
commented
Jul 15, 2023
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsOn shutdown of the event pipe infrastructure, any active session is disabled and the process info event is written (and rundown - but nativeaot doesn't emit any). The shutdown was being done in the This separates the shutdown of the event pipe infrastructure into an explicit call rather than part of process exit.
|
jkotas
commented
Jul 15, 2023
Would it be better to not destruct it by keeping this info in a thread static that does not have a destructor? Re-introducing RhShutdown that we got rid of in #80063 is replacing one set of problems with a different set of problems. |
a0f47c4 to
c04bff5Comparec04bff5 to
035833aCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
On shutdown of the event pipe infrastructure, any active session is disabled and the process info event is written (and rundown - but nativeaot doesn't emit any). The shutdown was being done in the
atexithandler. We use athread_local EventPipeAotThreadHolderTLSto track information about that thread as it pertains to event pipe - for example, the sequence number for events from that thread. That gets destructed, such that when we get to writing out the process info event during process exit, we write the event with the incorrect information (a reset sequence number). As a result, analysis (via TraceEvent, for example) flags that all the events before it have been dropped.This switches to using our existing thread exit callbacks to handle event pipe thread info cleanup instead of relying on the destructor and merges the paths around event pipe thread holder management for windows/non-windows.