[jira] [Work logged] (ARTEMIS-4771) NPE between AMQPLargeMessageWriter::tryDelivering and resetClose

2024-05-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/May/24 09:16
Start Date: 20/May/24 09:16
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4932:
URL: https://github.com/apache/activemq-artemis/pull/4932#discussion_r1606489945


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPLargeMessageWriter.java:
##
@@ -170,16 +170,26 @@ private void resume() {
}
 
private void tryDelivering() {
+
+  final Delivery localDelivery = delivery;
+  final MessageReference localReference = reference;
+  final LargeBodyReader localBodyReader = largeBodyReader;
+
+  if (localDelivery == null || localReference == null || localBodyReader 
== null) {
+ logger.debug("Write got closed before tryDelivering was called");
+ return;
+  }

Review Comment:
   The close method is only safe to call on the connection thread, which is 
where it appears to be being called. Are you seeing otherwise? If not there is 
no benefit in introducing the 3 additional variables and complicating the code 
with a huge if statement (might even mislead folks into thinking there is some 
safety there isnt). Should be no need for synchronization as the writing code 
is not called concurrently. It would seem its simply running from a previous 
scheduling, but no longer needs to. If so that can be addressed by checking 
'closed' at the start of the scheduled task if it was closed already before 
proceeding. 





Issue Time Tracking
---

Worklog Id: (was: 919982)
Time Spent: 2h 20m  (was: 2h 10m)

> NPE between AMQPLargeMessageWriter::tryDelivering and resetClose
> 
>
> Key: ARTEMIS-4771
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4771
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> This is using RedHat's bits:
> java.lang.NullPointerException: Cannot invoke 
> "org.apache.qpid.proton.engine.Delivery.getTag()" because "this.delivery" is 
> null
> at 
> org.apache.activemq.artemis.protocol.amqp.proton.AMQPLargeMessageWriter.tryDelivering(AMQPLargeMessageWriter.java:174)
>  ~[artemis-amqp-protocol-2.33.0.redhat-9.jar:2.33.0.redhat-9]
> at 
> io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
>  ~[netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
>  [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
>  [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) 
> [netty-transport-classes-epoll-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
>  [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 
> [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>  [artemis-commons-2.33.0.redhat-9.jar:2.33.0.redhat-9]



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


[jira] [Created] (AMQ-9503) Disable stacktrace for HTTP Connector

2024-05-20 Thread Colm O hEigeartaigh (Jira)
Colm O hEigeartaigh created AMQ-9503:


 Summary: Disable stacktrace for HTTP Connector
 Key: AMQ-9503
 URL: https://issues.apache.org/jira/browse/AMQ-9503
 Project: ActiveMQ Classic
  Issue Type: Task
Affects Versions: 5.18.4
Reporter: Colm O hEigeartaigh


 
The HTTP Connector is returning stack traces to clients, which is not a good 
idea from a security point of view as it may leak internal information. Please 
disable (at least by default)
 
To reproduce:
 
On 5.18.x I configure AMQ with  http://localhost:12345|http://localhost:12345/]"/
 
data.xml:
{code:java}
1234 {code}

Then with curl:
{code:java}
curl --data '@deser.xml' http://localhost:12345 {code}
I get the following stacktrace:
{code:java}
Caused by:java.lang.ClassCastException: class java.lang.String 
cannot be cast to class org.apache.activemq.command.Command (java.lang.String 
is in module java.base of loader 'bootstrap'; 
org.apache.activemq.command.Command is in unnamed module of loader 
java.net.URLClassLoader @6ce139a4)at 
org.apache.activemq.transport.http.HttpTunnelServlet.doPost(HttpTunnelServlet.java:137)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:764) at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)   at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)   at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)   
 at 
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:722)  
 at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)  at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 
 at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
   at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
 at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
 at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)   
 at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) 
 at org.eclipse.jetty.server.Server.handle(Server.java:516)  at 
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)   at 
org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)  at 
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)  at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)at 
org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
   at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
 at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
   at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
 at 
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:829)
 {code}



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


[jira] [Work logged] (ARTEMIS-4771) NPE between AMQPLargeMessageWriter::tryDelivering and resetClose

2024-05-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/May/24 16:17
Start Date: 20/May/24 16:17
Worklog Time Spent: 10m 
  Work Description: tabish121 commented on code in PR #4932:
URL: https://github.com/apache/activemq-artemis/pull/4932#discussion_r1606982803


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPLargeMessageWriter.java:
##
@@ -170,16 +170,26 @@ private void resume() {
}
 
private void tryDelivering() {
+
+  final Delivery localDelivery = delivery;
+  final MessageReference localReference = reference;
+  final LargeBodyReader localBodyReader = largeBodyReader;
+
+  if (localDelivery == null || localReference == null || localBodyReader 
== null) {
+ logger.debug("Write got closed before tryDelivering was called");
+ return;
+  }

Review Comment:
   I reviewed the existing code again and the Writer is still confined to the 
connection thread unlike the modifications that moved some of the large message 
reader off that thread.  This would imply that a simple check on closed is 
sufficient here as this case would just be an already scheduled run of this 
writer that was behind the remote close handling.  





Issue Time Tracking
---

Worklog Id: (was: 920072)
Time Spent: 2.5h  (was: 2h 20m)

> NPE between AMQPLargeMessageWriter::tryDelivering and resetClose
> 
>
> Key: ARTEMIS-4771
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4771
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> This is using RedHat's bits:
> java.lang.NullPointerException: Cannot invoke 
> "org.apache.qpid.proton.engine.Delivery.getTag()" because "this.delivery" is 
> null
> at 
> org.apache.activemq.artemis.protocol.amqp.proton.AMQPLargeMessageWriter.tryDelivering(AMQPLargeMessageWriter.java:174)
>  ~[artemis-amqp-protocol-2.33.0.redhat-9.jar:2.33.0.redhat-9]
> at 
> io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
>  ~[netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
>  [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
>  [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) 
> [netty-transport-classes-epoll-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
>  [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 
> [netty-common-4.1.108.Final-redhat-1.jar:4.1.108.Final-redhat-1]
> at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>  [artemis-commons-2.33.0.redhat-9.jar:2.33.0.redhat-9]



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


[jira] [Commented] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17847968#comment-17847968
 ] 

ASF subversion and git services commented on ARTEMIS-4772:
--

Commit f7b15e351ef712213e0db1d072a2f0ce84f7bb8e in activemq-artemis's branch 
refs/heads/main from m.napieraj
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=f7b15e351e ]

ARTEMIS-4772 expose broker plugin classes via management


> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: JMX
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
>  Labels: features, pull-request-available
> Fix For: 2.34.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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


[jira] [Work logged] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/May/24 19:34
Start Date: 20/May/24 19:34
Worklog Time Spent: 10m 
  Work Description: asfgit closed pull request #4935: ARTEMIS-4772 Expose 
registered broker plugin class names as JMX Attribute
URL: https://github.com/apache/activemq-artemis/pull/4935




Issue Time Tracking
---

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

> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: JMX
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
>  Labels: features, pull-request-available
> Fix For: 2.34.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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


[jira] [Updated] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-4772:

Labels:   (was: features pull-request-available)

> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: JMX
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
> Fix For: 2.34.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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


[jira] [Updated] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-4772:

Component/s: management
 (was: JMX)

> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: management
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
> Fix For: 2.34.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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


[jira] [Updated] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-4772:

Language:   (was: Java)

> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: JMX
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
> Fix For: 2.34.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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


[jira] [Resolved] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram resolved ARTEMIS-4772.
-
Resolution: Fixed

> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
> Fix For: 2.34.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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


[jira] [Work logged] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 20/May/24 19:42
Start Date: 20/May/24 19:42
Worklog Time Spent: 10m 
  Work Description: jbertram commented on PR #4935:
URL: 
https://github.com/apache/activemq-artemis/pull/4935#issuecomment-2121086774

   Thanks for the contribution! I squashed the commits and cleaned up a few 
things during the merging process. Nice work!




Issue Time Tracking
---

Worklog Id: (was: 920095)
Time Spent: 0.5h  (was: 20m)

> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
> Fix For: 2.34.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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


[jira] [Updated] (ARTEMIS-4772) Expose registered broker plugin class names in JMX

2024-05-20 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-4772:

Component/s: (was: management)

> Expose registered broker plugin class names in JMX
> --
>
> Key: ARTEMIS-4772
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4772
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Affects Versions: 2.33.0
>Reporter: Marek Napieraj
>Priority: Minor
> Fix For: 2.34.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Make broker plugin class names available as a JMX Attribute for better 
> debug/monitoring of Artemis instances.



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