8000 DicomServer stuck in infinite loop in C-move when forced close of client connection · Issue #1319 · fo-dicom/fo-dicom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
DicomServer stuck in infinite loop in C-move when forced close of client connection #1319
Closed
@p33215

Description

@p33215

When doing a CMOVE and forcibly killing the client, the DicomServer get stuck in an infinite loop and logs warnings, (got about 500/s, killing the diskspace...) until you restart the server process. It happened every attempt so far (i.e. reproducable locally).

Versions:
Fellow Oak DICOM version 5.0.2
OS: Windows 10

The code issue seems to be empty 'runningDicomServiceTasks' causing exception and infinite while loop in:

private async Task RemoveUnusedServicesAsync(){
 while (!_cancellationToken.IsCancellationRequested){
......
            await Task.WhenAny(runningDicomServiceTasks).ConfigureAwait(false);
......
               catch (Exception e)
                {
                    Logger.Warn("Exception removing disconnected clients, {@error}", e);
                }
......
 }
}

From the log trace:

"@timestamp": "2022-02-01T14:04:53.5028649Z", "Level": "Info", "Message": "DIMSETester -> C-Move response [1]: Pending\n\t\tCompleted:\t1\n\t\tRemaining:\t939\n\t\tFailures:\t7", "Host": "SE-00197-WKS", "Logger": "FellowOakDicom.Network", "Thread": "20" }

{ "@timestamp": "2022-02-01T14:04:53.5028649Z", "Level": "Info", "Message": "Socket error while writing PDU: ConnectionReset [10054]", "Host": "SE-00197-WKS", "Logger": "FellowOakDicom.Network", "Thread": "20" }

{ "@timestamp": "2022-02-01T14:04:53.5028649Z", "Level": "Info", "Message": "Connection closed", "Host": "SE-00197-WKS", "Logger": "FellowOakDicom.Network", "Thread": "20" }

{ "@timestamp": "2022-02-01T14:04:53.6218665Z", "Level": "Info", "Message": "Socket error while reading PDU: ConnectionReset [10054]", "Host": "SE-00197-WKS", "Logger": "FellowOakDicom.Network", "Thread": "20" }

{ "@timestamp": "2022-02-01T14:04:53.6418551Z", "Level": "Warn", "Message": "Exception removing disconnected clients, System.ArgumentException: The tasks argument contains no tasks.\r\nParameter name: tasks\r\n   at System.Threading.Tasks.Task.WhenAny(IEnumerable`1 tasks)\r\n   at FellowOakDicom.Network.DicomServer`1.<RemoveUnusedServicesAsync>d__57.MoveNext()", "Host": "SE-00197-WKS", "Logger": "FellowOakDicom.Network", "Thread": "20", "Exception": "System.ArgumentException: The tasks argument contains no tasks.\r\nParameter name: tasks\r\n   at System.Threading.Tasks.Task.WhenAny(IEnumerable`1 tasks)\r\n   at FellowOakDicom.Network.DicomServer`1.<RemoveUnusedServicesAsync>d__57.MoveNext()    at System.Threading.Tasks.Task.WhenAny(IEnumerable`1 tasks)\r\n   at FellowOakDicom.Network.DicomServer`1.<RemoveUnusedServicesAsync>d__57.MoveNext()" }

[last entry repeated]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0