[
https://issues.apache.org/jira/browse/PROTON-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17257900#comment-17257900
]
Clifford Jansen commented on PROTON-2231:
-----------------------------------------
I took a look at the stack of a run that hung in pn_proactor_wait/uv_run.
I see the p->disconnect boolean is set and the proactor is stuck unable to
process the pending disconnect operation. My guess is that
static inline void notify(pn_proactor_t* p) {
uv_async_send(&p->notify);
}
does not wake the "leader" thread in the following circumstance:
L thread is prepping to do uv_run()
X thread uv_async_send part 1: register uv callback (no-op since NULL
callback provided)
X thread uv_async_sync part 2: wake uv loop (also no-op, not currently
running)
L thread uv_run()
Whereas if the uv_run() wins the race against uv_async_send(), the run loop
returns and the disconnect cleanup activity winds things up as expected.
All speculation, but if relevant, there probably should be a proactor callback
that temporarily sets the next uv_run_mode to UV_RUN_NOWAIT (with appropriate
synchronization).
> Assertion fail on macOS with libuv in c-threaderciser test
> ----------------------------------------------------------
>
> Key: PROTON-2231
> URL: https://issues.apache.org/jira/browse/PROTON-2231
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: proton-c-0.32.0
> Reporter: Jiri Daněk
> Assignee: Roddie Kieley
> Priority: Major
> Labels: freebsd, macOS
>
> As described on PROTON-2225, the test fails with assertion error. It is
> currently disabled on macOS for this reason (in .travis.yml).
> {noformat}
> 6: Test command: /usr/local/opt/python/libexec/bin/python
> "/Users/travis/build/jiridanek/qpid-proton/scripts/env.py" "--"
> "/Users/travis/build/jiridanek/qpid-proton/build/c/tests/c-threaderciser"
> 6: Test timeout computed to be: 1500
> 6: threaderciser start: threads=8, time=1, actions=[listen, close-listen,
> connect, close-connect, wake, timeout, cancel-timeout]
> 6: Assertion failed: (p->active > 0), function remove_active_lh, file
> /Users/travis/build/jiridanek/qpid-proton/c/src/proactor/libuv.c, line 392.
> 6/31 Test #6: c-threaderciser ..................***Failed 0.18 sec
> {noformat}
> If the test is meant to stay disabled for a longer time, it will have to be
> disabled in CMakeLists.txt, so that users compiling the project do not run it
> accidentally.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]