Apparently, the filter I set only filters it in the Web UI. To filter out
tests for purpose of e-mail notification, I have to explicitly enable what
I care about.
This time I went through the report manually and deleted the 4 instances
reported in test code and examples. I also removed two finds which are
obviously false positives. They are at the end


---------- Forwarded message ----------
From: <[email protected]>
Date: Sat, Apr 1, 2017 at 3:49 PM
Subject: New Defects reported by Coverity Scan for Apache ActiveMQ Artemis
To: [email protected]



Hi,

Please find the latest report on new defect(s) introduced to Apache
ActiveMQ Artemis found with Coverity Scan.

10 new defect(s) introduced to Apache ActiveMQ Artemis found with Coverity
Scan.
6 defect(s), reported by Coverity Scan earlier, were marked fixed in the
recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 10 of 10 defect(s)


** CID 1422915:  Null pointer dereferences  (FORWARD_NULL)
/artemis-protocols/artemis-amqp-protocol/src/main/java/
org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java: 283 in
org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage.setRoutingType(
org.apache.activemq.artemis.api.core.RoutingType)()


____________________________________________________________
____________________________________________
*** CID 1422915:  Null pointer dereferences  (FORWARD_NULL)
/artemis-protocols/artemis-amqp-protocol/src/main/java/
org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java: 283 in
org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage.setRoutingType(
org.apache.activemq.artemis.api.core.RoutingType)()
277        @Override
278        public org.apache.activemq.artemis.api.core.Message
setRoutingType(RoutingType routingType) {
279           parseHeaders();
280           if (routingType == null) {
281              removeSymbol(AMQPMessageSupport.ROUTING_TYPE);
282           }
>>>     CID 1422915:  Null pointer dereferences  (FORWARD_NULL)
>>>     Calling a method on null object "routingType".
283           setSymbol(AMQPMessageSupport.ROUTING_TYPE,
routingType.getType());
284           return this;
285        }
286
287        @Override
288        public SimpleString getGroupID() {

____________________________________________________________
____________________________________________
*** CID 1422918:  Concurrent data access violations  (GUARDED_BY_VIOLATION)
/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/
PagingStoreFactoryDatabase.java: 89 in org.apache.activemq.artemis.
core.paging.impl.PagingStoreFactoryDatabase.newExecutor()()
83        public ScheduledExecutorService getScheduledExecutor() {
84           return scheduledExecutor;
85        }
86
87        @Override
88        public Executor newExecutor() {
>>>     CID 1422918:  Concurrent data access violations
(GUARDED_BY_VIOLATION)
>>>     Accessing "executorFactory" without holding lock
"PagingStoreFactoryDatabase.this". Elsewhere, "org.apache.activemq.artemis.
core.paging.impl.PagingStoreFactoryDatabase.executorFactory" is accessed
with "PagingStoreFactoryDatabase.this" held 5 out of 6 times.
89           return executorFactory.getExecutor();
90        }
91
92        private boolean started = false;
93
94        public PagingStoreFactoryDatabase(final
DatabaseStorageConfiguration dbConf,

** CID 1422919:  Concurrent data access violations  (GUARDED_BY_VIOLATION)
/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/
ActiveMQThreadPoolExecutor.java: 60 in org.apache.activemq.artemis.utils.
ActiveMQThreadPoolExecutor$ThreadPoolQueue.setExecutor(
org.apache.activemq.artemis.utils.ActiveMQThreadPoolExecutor)()


____________________________________________________________
____________________________________________
*** CID 1422919:  Concurrent data access violations  (GUARDED_BY_VIOLATION)
/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/
ActiveMQThreadPoolExecutor.java: 60 in org.apache.activemq.artemis.utils.
ActiveMQThreadPoolExecutor$ThreadPoolQueue.setExecutor(
org.apache.activemq.artemis.utils.ActiveMQThreadPoolExecutor)()
54           // idle threads than queued tasks and can add more tasks into
the queue.
55           // The delta is incremented if a thread becomes idle or if a
task is taken from the queue.
56           // The delta is decremented if a thread leaves idle state or
if a task is added to the queue.
57           private int threadTaskDelta = 0;
58
59           public void setExecutor(ActiveMQThreadPoolExecutor executor) {
>>>     CID 1422919:  Concurrent data access violations
(GUARDED_BY_VIOLATION)
>>>     Accessing "this.executor" without holding lock
"ThreadPoolQueue.lock". Elsewhere, "org.apache.activemq.artemis.utils.
ActiveMQThreadPoolExecutor$ThreadPoolQueue.executor" is accessed with
"ThreadPoolQueue.lock" held 2 out of 3 times.
60              this.executor = executor;
61           }
62
63           @Override
64           public boolean offer(Runnable runnable) {
65              boolean retval = false;

** CID 1422920:  Null pointer dereferences  (NULL_RETURNS)
/artemis-protocols/artemis-amqp-protocol/src/main/java/
org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java:
156 in org.apache.activemq.artemis.protocol.amqp.proton.handler.
ProtonHandler.flushBytes()()


____________________________________________________________
____________________________________________
*** CID 1422920:  Null pointer dereferences  (NULL_RETURNS)
/artemis-protocols/artemis-amqp-protocol/src/main/java/
org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java:
156 in org.apache.activemq.artemis.protocol.amqp.proton.handler.
ProtonHandler.flushBytes()()
150                    break;
151                 }
152
153                 // We allocated a Pooled Direct Buffer, that will be
sent down the stream
154                 ByteBuf buffer = PooledByteBufAllocator.
DEFAULT.directBuffer(pending);
155                 ByteBuffer head = transport.head();
>>>     CID 1422920:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "head" when calling
"writeBytes". (The virtual call resolves to "io.netty.buffer.
AbstractByteBuf.writeBytes".)
156                 buffer.writeBytes(head);
157
158                 for (EventHandler handler : handlers) {
159                    handler.pushBytes(buffer);
160                 }
161

___________________________________________________________
____________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.
net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-
2Bd2MGckcRZSbhom32dlDl11LWEm9nX1rtAWaC-2BDSVBpUSy28m9Zb8yC8TsR8PEkb70
GF-2BiZPHs-3D_FskC5xBa3KJMdLzpQ7DMPdi-2Bg7iORJg0iEJDpvzM9wAoFGpCKXPq
Hg46Wuh9HLHsluwhatflFRLFlJhuPbFONE5iUGlirP6eVdPuDLIDLC0TsnhdcMbXqfo6LoIMxF0-
2FR2IhWwHvgTSWN-2FhtsoXXoY38utbJq9RpdAfVowdqLGqwvy3-
2BC7HcpYGA9ksz0rChzXs8G4YA-2BBC7eJZCyEjUhg-3D-3D


And the false positives

** CID 1422916:  Null pointer dereferences  (FORWARD_NULL)
/tests/integration-tests/src/test/java/org/apache/activemq/
artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java: 60
in org.apache.activemq.artemis.tests.integration.openwire.amq.
ProducerFlowControlBaseTest$1.run()()


____________________________________________________________
____________________________________________
*** CID 1422916:  Null pointer dereferences  (FORWARD_NULL)
/tests/integration-tests/src/test/java/org/apache/activemq/
artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java: 60
in org.apache.activemq.artemis.tests.integration.openwire.amq.
ProducerFlowControlBaseTest$1.run()()
54              // flag to false.
55              // Once the send starts to block it will not reset the done
flag
56              // anymore.
57              asyncThread = new Thread("Fill thread.") {
58                 @Override
59                 public void run() {
>>>     CID 1422916:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "session" = "null".
60                    Session session = null;
61                    try {
62                       session = flowControlConnection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
63                       MessageProducer producer =
session.createProducer(queue);
64                       producer.setDeliveryMode(
DeliveryMode.NON_PERSISTENT);
65                       while (keepGoing.get()) {

** CID 1422917:  Null pointer dereferences  (FORWARD_NULL)
/tests/integration-tests/src/test/java/org/apache/activemq/
artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java:
100 in org.apache.activemq.artemis.tests.integration.openwire.amq.
ProducerFlowControlBaseTest$2.run()()


____________________________________________________________
____________________________________________
*** CID 1422917:  Null pointer dereferences  (FORWARD_NULL)
/tests/integration-tests/src/test/java/org/apache/activemq/
artemis/tests/integration/openwire/amq/ProducerFlowControlBaseTest.java:
100 in org.apache.activemq.artemis.tests.integration.openwire.amq.
ProducerFlowControlBaseTest$2.run()()
94
95        protected CountDownLatch asyncSendTo(final ActiveMQQueue queue,
final String message) throws JMSException {
96           final CountDownLatch done = new CountDownLatch(1);
97           new Thread("Send thread.") {
98              @Override
99              public void run() {
>>>     CID 1422917:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "session" = "null".
100                 Session session = null;
101                 try {
102                    session = flowControlConnection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
103                    MessageProducer producer =
session.createProducer(queue);
104                    producer.setDeliveryMode(
DeliveryMode.NON_PERSISTENT);
105                    producer.send(session.createTextMessage(message));

** CID 1422918:  Concurrent data access violations  (GUARDED_BY_VIOLATION)
/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/
PagingStoreFactoryDatabase.java: 89 in org.apache.activemq.artemis.
core.paging.impl.PagingStoreFactoryDatabase.newExecutor()()

-- 
Jiří Daněk
Messaging QA

Reply via email to