This is an automated email from the ASF dual-hosted git repository.

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

commit 7a3dc78ac85ca5044c58757fc5164da4dd951ae4
Author: Andrew Stitcher <[email protected]>
AuthorDate: Tue Oct 6 17:39:01 2026 -0400

    PROTON-2987: Always release the proactor lock in work_start()
    
    We were only unlocking in the 'if' which could make the lock/unlock not
    match. A latent bug today, as every caller passes a freshly created item,
    but it would deadlock any caller that does not.
    
    Assisted-By: Claude Opus 5 <[email protected]>
---
 c/src/proactor/libuv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/proactor/libuv.c b/c/src/proactor/libuv.c
index c12e1d4d8..f8898e497 100644
--- a/c/src/proactor/libuv.c
+++ b/c/src/proactor/libuv.c
@@ -299,8 +299,8 @@ static void work_start(work_t *w) {
     w->working = false;
     work_push(&w->proactor->leader_q, w);
     notify(w->proactor);
-    uv_mutex_unlock(&w->proactor->lock);
   }
+  uv_mutex_unlock(&w->proactor->lock);
 }
 
 static void parse_addr(addr_t *addr, const char *str) {


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

Reply via email to