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

ASF subversion and git services commented on PROTON-2984:
---------------------------------------------------------

Commit c44b683b11edca99f21bbead013c2052d00a10d2 in qpid-proton's branch 
refs/heads/main from Andrew Stitcher
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=c44b683b1 ]

PROTON-2984: Don't restart an in-flight libuv connect

leader_process_pconnection() called leader_connect() on every pass while
pc->connected was still 0, including while an outbound connect was already in
flight. That re-ran uv_tcp_init() on the live uv_tcp_t, which unconditionally
re-initializes its io_watcher; if the loop still had that watcher queued,
loop->watcher_queue was left with a self-linked node that uv__queue_remove()
can never unlink. uv__io_poll() then spun forever, so the leader thread never
returned from uv_run() and never picked up any further proactor state. The
other proactor threads stayed parked on pn_proactor_t::cond, hanging the
process with one core pegged.

Any work_notify() during the connect window triggered it, e.g.
pn_connection_wake() from another thread.

Start the connect sequence once; retries are already driven by the libuv
connect callbacks, and a later pass only needs to deliver pending driver
events so that a terminal connect failure is still reported.

Reproduced with c-threaderciser, which hung roughly 1 run in 10 before this
change and 70 of 70 clean after it.

Assisted-By: Claude Opus 5 <[email protected]>


> Shutdown issues in libuv proactor
> ---------------------------------
>
>                 Key: PROTON-2984
>                 URL: https://issues.apache.org/jira/browse/PROTON-2984
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>            Priority: Major
>
> The libuv based proactor was observed hanging on exit when running the 
> threaderciser tester.



--
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