[qpid-proton] branch main updated: PROTON-2484: epoll proactor - update fix for new introduced TSAN race

2022-01-13 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
 new 5101a6f  PROTON-2484: epoll proactor - update fix for new introduced 
TSAN race
5101a6f is described below

commit 5101a6f72485bd21e39ca62c956edd122954d260
Author: Cliff Jansen 
AuthorDate: Thu Jan 13 11:24:54 2022 -0800

PROTON-2484: epoll proactor - update fix for new introduced TSAN race
---
 c/src/proactor/epoll.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index aa1bd1b..e375f11 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -1670,9 +1670,9 @@ static void listener_begin_close(pn_listener_t* l) {
 
 void pn_listener_close(pn_listener_t* l) {
   bool notify = false;
-  pn_proactor_t *p = l->task.proactor;
   lock(&l->task.mutex);
-  if (l->task.proactor && !l->task.closing) {
+  pn_proactor_t *p = l->task.proactor;
+  if (p && !l->task.closing) {
 listener_begin_close(l);
 notify = schedule(&l->task);
   }

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-proton] branch main updated: PROTON-2484: epoll proactor - remove task memory reference after possible free

2022-01-13 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
 new a19aa87  PROTON-2484: epoll proactor - remove task memory reference 
after possible free
a19aa87 is described below

commit a19aa87e66e4207da0dee51d0315bc087aabcd30
Author: Cliff Jansen 
AuthorDate: Thu Jan 13 09:19:35 2022 -0800

PROTON-2484: epoll proactor - remove task memory reference after possible 
free
---
 c/src/proactor/epoll.c| 22 ++
 c/src/proactor/epoll_raw_connection.c |  8 +---
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index d2f394a..aa1bd1b 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -900,6 +900,7 @@ static void pconnection_forced_shutdown(pconnection_t *pc) {
 // Called from timer_manager with no locks.
 void pni_pconnection_timeout(pconnection_t  *pc) {
   bool notify = false;
+  pn_proactor_t *p = pc->task.proactor;
   uint64_t now = pn_proactor_now_64();
   lock(&pc->task.mutex);
   if (!pc->task.closing) {
@@ -912,7 +913,7 @@ void pni_pconnection_timeout(pconnection_t  *pc) {
   }
   unlock(&pc->task.mutex);
   if (notify)
-notify_poller(pc->task.proactor);
+notify_poller(p);
 }
 
 static pn_event_t *pconnection_batch_next(pn_event_batch_t *batch) {
@@ -1460,21 +1461,24 @@ static void pconnection_tick(pconnection_t *pc) {
 }
 
 void pn_connection_wake(pn_connection_t* c) {
-  bool notify = false;
   pconnection_t *pc = get_pconnection(c);
   if (pc) {
+pn_proactor_t *p = pc->task.proactor;
+bool notify = false;
+
 lock(&pc->task.mutex);
 if (!pc->task.closing) {
   notify = pni_task_wake(&pc->task);
 }
 unlock(&pc->task.mutex);
+if (notify) notify_poller(p);
   }
-  if (notify) notify_poller(pc->task.proactor);
 }
 
 void pn_proactor_release_connection(pn_connection_t *c) {
   bool notify = false;
   pconnection_t *pc = get_pconnection(c);
+  pn_proactor_t *p = pc->task.proactor;
   if (pc) {
 set_pconnection(c, NULL);
 lock(&pc->task.mutex);
@@ -1483,7 +1487,7 @@ void pn_proactor_release_connection(pn_connection_t *c) {
 notify = schedule(&pc->task);
 unlock(&pc->task.mutex);
   }
-  if (notify) notify_poller(pc->task.proactor);
+  if (notify) notify_poller(p);
 }
 
 // 
@@ -1666,13 +1670,14 @@ static void listener_begin_close(pn_listener_t* l) {
 
 void pn_listener_close(pn_listener_t* l) {
   bool notify = false;
+  pn_proactor_t *p = l->task.proactor;
   lock(&l->task.mutex);
   if (l->task.proactor && !l->task.closing) {
 listener_begin_close(l);
 notify = schedule(&l->task);
   }
   unlock(&l->task.mutex);
-  if (notify) notify_poller(l->task.proactor);
+  if (notify) notify_poller(p);
 }
 
 static void listener_forced_shutdown(pn_listener_t *l) {
@@ -1859,8 +1864,9 @@ pn_record_t *pn_listener_attachments(pn_listener_t *l) {
 
 void pn_listener_accept2(pn_listener_t *l, pn_connection_t *c, pn_transport_t 
*t) {
   pconnection_t *pc = (pconnection_t*) malloc(sizeof(pconnection_t));
-  assert(pc); // TODO: memory safety
-  const char *err = pconnection_setup(pc, pn_listener_proactor(l), c, t, true, 
"", 0);
+  pn_proactor_t *p = pn_listener_proactor(l);
+  assert(pc && p); // TODO: memory safety
+  const char *err = pconnection_setup(pc, p, c, t, true, "", 0);
   if (err) {
 PN_LOG_DEFAULT(PN_SUBSYSTEM_EVENT, PN_LEVEL_ERROR, "pn_listener_accept 
failure: %s", err);
 return;
@@ -1895,7 +1901,7 @@ void pn_listener_accept2(pn_listener_t *l, 
pn_connection_t *c, pn_transport_t *t
 notify = schedule(&l->task);
   unlock(&pc->task.mutex);
   unlock(&l->task.mutex);
-  if (notify) notify_poller(l->task.proactor);
+  if (notify) notify_poller(p);
 }
 
 
diff --git a/c/src/proactor/epoll_raw_connection.c 
b/c/src/proactor/epoll_raw_connection.c
index 89e315f..a025698 100644
--- a/c/src/proactor/epoll_raw_connection.c
+++ b/c/src/proactor/epoll_raw_connection.c
@@ -211,8 +211,9 @@ void pn_proactor_raw_connect(pn_proactor_t *p, 
pn_raw_connection_t *rc, const ch
 
 void pn_listener_raw_accept(pn_listener_t *l, pn_raw_connection_t *rc) {
   assert(rc);
+  pn_proactor_t *p = pn_listener_proactor(l);
   praw_connection_t *prc = containerof(rc, praw_connection_t, raw_connection);
-  praw_connection_init(prc, pn_listener_proactor(l), rc);
+  praw_connection_init(prc, p, rc);
   // TODO: fuller sanity check on input args
 
   int err = 0;
@@ -246,7 +247,7 @@ void pn_listener_raw_accept(pn_listener_t *l, 
pn_raw_connection_t *rc) {
   }
   unlock(&prc->task.mutex);
   unlock(&l->task.mutex);
-  if (notify) notify_poller(l->task.proactor);
+  if (notify) notify_poller(p);
 }
 
 const pn_netaddr_t *pn_raw_connection_local_addr(pn_raw_connection_t *rc) {
@@ -264,12 +26

[qpid-jms] branch main updated: QPIDJMS-561: update to mockito 4.2.0

2022-01-13 Thread robbie
This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-jms.git


The following commit(s) were added to refs/heads/main by this push:
 new 6b59981  QPIDJMS-561: update to mockito 4.2.0
6b59981 is described below

commit 6b599812543df2c62b88a5e8142947760a1df642
Author: Robbie Gemmell 
AuthorDate: Thu Jan 13 10:24:28 2022 +

QPIDJMS-561: update to mockito 4.2.0
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index f00bda1..06618ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,7 +50,7 @@
 4.13.2
 1.0
 9.4.43.v20210629
-3.12.4
+4.2.0
 2.2
 3.3.1
 2.10.0

-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org