microsoft / fhir-server

A service that implements the FHIR standard
MIT License
1.16k stars 492 forks source link

FhirTimer crashes the process on shutdown #3736

Open brendankowitz opened 5 months ago

brendankowitz commented 5 months ago

Describe the bug

FhirTimer crashes the process on shutdown.

The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Microsoft.Health.Fhir.SqlServer.Features.Watchdogs.FhirTimer`1.RunInternalAsync() in /_/src/Microsoft.Health.Fhir.SqlServer/Features/Watchdogs/FhirTimer.cs:line 61
   at Microsoft.Health.Fhir.SqlServer.Features.Watchdogs.FhirTimer`1.<StartAsync>b__25_0(Object _) in /_/src/Microsoft.Health.Fhir.SqlServer/Features/Watchdogs/FhirTimer.cs:line 51
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart(

FHIR Version? All

Data provider? CosmosDB/SQL Server

To Reproduce Steps to reproduce the behavior:

  1. Run an e2e test in debug
  2. When test ends process crashes
brendankowitz commented 5 months ago

Also crashed here: https://microsofthealthoss.visualstudio.com/FhirServer/_build/results?buildId=39845&view=logs&j=03924bc3-c56c-5400-9204-0ddba736edf4&t=7ae96948-4549-5a4f-2044-57bed17e3542

image