[ 
https://issues.apache.org/jira/browse/ARTEMIS-5890?focusedWorklogId=1003354&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1003354
 ]

ASF GitHub Bot logged work on ARTEMIS-5890:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Feb/26 21:17
            Start Date: 03/Feb/26 21:17
    Worklog Time Spent: 10m 
      Work Description: tabish121 commented on code in PR #6218:
URL: https://github.com/apache/artemis/pull/6218#discussion_r2761045252


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPLargeMessageWriter.java:
##########
@@ -173,6 +173,11 @@ private void tryDelivering() {
          logger.trace("AMQP Large Message Writer was closed before queued 
write attempt was executed");
          return;
       }
+      if (protonSender.getSession().getConnection().getRemoteState() != 
EndpointState.ACTIVE || 
protonSender.getSession().getConnection().getLocalState() != 
EndpointState.ACTIVE) {

Review Comment:
   The code actually already has several checks for closed state related to the 
sender but in reality even this is not a guarantee that you won't see this 
error as the proton code was not meant to be used outside the thread that 
manages the engine so the visibility of these values is not ensured to be 
updated in this delivering thread.   





Issue Time Tracking
-------------------

    Worklog Id:     (was: 1003354)
    Time Spent: 20m  (was: 10m)

> Closing a connection while large message is being delivered could show 
> exceptions in the log
> --------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-5890
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5890
>             Project: Artemis
>          Issue Type: Bug
>            Reporter: Clebert Suconic
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.51.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> If you close a connection while the server still delivering large messages, 
> you could see exceptions in the logs (IllegalArgumentException).
> The delivery thread should check the state of the connection before issuing 
> more deliveries.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to