HttpContext dispose diagnostics don't get processed (not always) #53820
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Description
When using the diagnostics, sometimes, they don't arrive.
This seems to happen because the HttpContext disposal is handing this.
The server that handled that context however, allows to shutdown.
Maybe due to GC running later there's a problem in this area.
It seems to have started with .net8
I did some tests and traces because of this PR: opentracing-contrib/csharp-netcore#104
(The delay shouldn't be needed. The host should wait for shutting down)
Quite often the diagnostics triggers don't hit before shutdown.
Which I believe eventually comes from the framework, which is allowing a shutdown before all data regarding a request (HttpContext with disposal) is finished
@
Reproduction Steps
opentracing-contrib/csharp-netcore#104
It started failing from .net8
Expected behavior
Host shouldn't shut down before processing all diagnostics
Actual behavior
Host shuts down before processing all diagnostics
Regression?
No response
Known Workarounds
Applying a Delay
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: