-
Notifications
You must be signed in to change notification settings - Fork 5k
ObjectDisposedException intermittently crashes test process from DefaultHttpClientFactory.ExpiryTimer_Tick #90386
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
Comments
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection Issue DetailsDescriptionI have some repositories that I've hooked up to ingest the daily builds of .NET 8. In this morning's update I have two repos (one public, one private) where the existing test suite is starting to fail due to this error:
It appears that something running in the background for HttpClientFactory is trying to use the service provider after it's torn down and throwing an exception. This doesn't seem to happen 100% of the time though based on the attempts for this workflow run where macOS passes every time, Windows and Linux fail twice, and then all three pass. Reproduction StepsClone martincostello/alexa-london-travel-site@74309e7 and run Expected behaviorThe tests pass. Actual behaviorThe tests sometimes crashes with the above error on Linux and Windows. Regression?Yes. Known WorkaroundsNo response Configuration
Other informationMaybe have been introduced by #89531.
|
Yeah, looks like it's because of this: https://github.com/dotnet/runtime/pull/89531/files#diff-940dba6ffc5ae548fca7105241869c1a78442c04b968f129ce645407022e83cbR98 /cc @CarnaViire |
@martincostello can you please point me to the specific test that triggers the exception? Would it be possible to you to create a standalone minimal repro? |
Sorry I don't know specifically which one it is as it seems to be failing due to a background thread sometime after some test happens to do an HTTP call through I can try making a standalone repro, but if you need that I'm not going to be able to have the time to do that until next week. |
Based on the fact all the tests themselves are passing seems like you just need to run "enough" tests for the background timer to fire to do some cleanup after the HTTP server is torn down at the end of the test run, which then kills |
No worries. I think I know what happened -- DefaultHttpClientFactory's timer is not disposed when it should be, so it ended up firing when everything including ServiceProvider is already torn down. This was present before, but became prominent since the ILogger object is now Lazy. |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionI have some repositories that I've hooked up to ingest the daily builds of .NET 8. In this morning's update I have two repos (one public, one private) where the existing test suite is starting to fail due to this error:
It appears that something running in the background for HttpClientFactory is trying to use the service provider after it's torn down and throwing an exception. This doesn't seem to happen 100% of the time though based on the attempts for this workflow run where macOS passes every time, Windows and Linux fail twice, and then all three pass. Edit: Fails on macOS too in a third repo Reproduction StepsClone martincostello/alexa-london-travel-site@74309e7 and run Expected behaviorThe tests pass. Actual behaviorThe tests sometimes crashes with the above error on Linux and Windows. Regression?Yes. Known WorkaroundsNo response Configuration
Other informationMaybe have been introduced by #89531.
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionI have some repositories that I've hooked up to ingest the daily builds of .NET 8. In this morning's update I have two repos (one public, one private) where the existing test suite is starting to fail due to this error:
It appears that something running in the background for HttpClientFactory is trying to use the service provider after it's torn down and throwing an exception. This doesn't seem to happen 100% of the time though based on the attempts for this workflow run where macOS passes every time, Windows and Linux fail twice, and then all three pass. Edit: Fails on macOS too in a third repo Reproduction StepsClone martincostello/alexa-london-travel-site@74309e7 and run Expected behaviorThe tests pass. Actual behaviorThe tests sometimes crashes with the above error on Linux and Windows. Regression?Yes. Known WorkaroundsNo response Configuration
Other informationMaybe have been introduced by #89531.
|
@CarnaViire I'm not sure if this issue has been fully resolved. I'm still experiencing this as of .NET SDK version The stack trace seems to have changed, and I see the error logged multiple times now instead of just once.
|
Never mind, you filed it and it was already closed -- see #90919 |
Fixed in 8.0 (main) in PR #90503. |
Uh oh!
There was an error while loading. Please reload this page.
Description
I have some repositories that I've hooked up to ingest the daily builds of .NET 8. In this morning's update I have two repos (one public, one private) where the existing test suite is starting to fail due to this error:
It appears that something running in the background for HttpClientFactory is trying to use the service provider after it's torn down and throwing an exception. This doesn't seem to happen 100% of the time though based on the attempts for this workflow run where macOS passes every time, Windows and Linux fail twice, and then all three pass.
Edit: Fails on macOS too in a third repo
Reproduction Steps
Clone martincostello/alexa-london-travel-site@74309e7 and run
build.ps1
in the root of the repository.Expected behavior
The tests pass.
Actual behavior
The tests sometimes crashes with the above error on Linux and Windows.
Regression?
Yes.
Known Workarounds
No response
Configuration
8.0.100-rc.1.23410.12
8.0.0-rc.1.23410.15
Other information
Maybe have been introduced by #89531.
The text was updated successfully, but these errors were encountered: