Skip to content
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

Connection timeouts not effective on blocking write of DIMSE #1129

Closed
gunterze opened this issue Feb 12, 2022 · 0 comments
Closed

Connection timeouts not effective on blocking write of DIMSE #1129

gunterze opened this issue Feb 12, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@gunterze
Copy link
Member

gunterze commented Feb 12, 2022

Configured Network Connection Extension attributes:

Name Type Description (LDAP Attribute)
Send Timeout integer Timeout in ms for sending other DIMSE RQs than C-STORE RQs; no timeout if absent (dcmSendTimeout)
Store Timeout integer Timeout in ms for sending C-STORE RQs; no timeout if absent (dcmStoreTimeout)
Response Timeout integer Timeout in ms for receive of other outstanding DIMSE RSPs than C-MOVE or C-GET RSPs; no timeout if absent (dcmResponseTimeout)
Idle Timeout integer Indicates aborting of idle Associations after specified timeout in ms; no timeout if absent (dcmIdleTimeout)

not effective, if the peer DICOM Application stops reading from the TCP channel, so writing blocks after 2x of configured

Name Type Description (LDAP Attribute)
TCP Send Buffer Size integer TCP send buffer size; use system defaults if absent (dcmTCPSendBufferSize)

bytes are written to the socket and so also writing the A-ABORT PDU, triggered on expiration of a configured timeout, get blocked.

Solution:
Block writing the A-ABORT PDU a finite time configurable by new Network Connection Extension attribute:

Name Type Description (LDAP Attribute)
A-ABORT Timeout integer Timeout in ms for waiting for finishing sending any DIMSE before sending an A-ABORT PDU, triggered by the application or by expiration of a configured other timeout of this Connection. If the timeout expires, the TCP connection will be closed without sending the A-ABORT PDU before. (dcmAATimeout)

Apply the same timeout also for writing A-RELEASE RP, to also prevents blocking in the (unlikely) case of a DICOM peer application stopping DIMSE reading, but sending an A-RELEASE RQ.

Writing A-RELEASE RQ are still blocked by writing DIMSE messages, now even preventing to interrupt emission of P-DATA-PDUs for one DIMSE by a A-RELEASE RQ.

@gunterze gunterze added the bug label Feb 12, 2022
@gunterze gunterze added this to the 5.25.2 milestone Feb 12, 2022
@gunterze gunterze self-assigned this Feb 12, 2022
@gunterze gunterze changed the title Connection timeout not effective on blocking write of DIMSE Connection timeouts not effective on blocking write of DIMSE Feb 12, 2022
mdoris pushed a commit that referenced this issue Mar 10, 2022
mdoris pushed a commit that referenced this issue Mar 10, 2022
(cherry picked from commit e0ca15d)
(cherry picked from commit 3a3b134)
mdoris added a commit that referenced this issue Mar 11, 2022
* Revert "Blocked dimse timeouts gc (#1126)"

This reverts commit 2ad8dc6.

(cherry picked from commit deb23e1)

* Connection timeouts not effective on blocking write of DIMSE fix #1129

(cherry picked from commit e0ca15d)
(cherry picked from commit 3a3b134)

Co-authored-by: Gunter Zeilinger <gunterze@protonmail.com>
mdoris added a commit that referenced this issue Mar 11, 2022
* Revert "Blocked dimse timeouts gc (#1126)"

This reverts commit 2ad8dc6.

* Connection timeouts not effective on blocking write of DIMSE fix #1129

(cherry picked from commit e0ca15d)

Co-authored-by: Gunter Zeilinger <gunterze@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant