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

Roddie Kieley commented on PROTON-2231:
---------------------------------------

Assuming that the assert in remove_active_lh is correct and that active 
requires being greater than zero then then the problem appears to be that the 
threaderciser does not attempt to adhere to that rule. By that I mean that it 
will attempt to close more listeners than were opened thus ensuring that the 
number of active listeners becomes less than zero.

At the moment I have a partial fix with which it appears in that over the 
course of 20 runs we never see it assert during the run but at the moment in 
shutting down it can either hang or infrequently assert, which was also 
observed in the unmodified code. See my [PROTON-2231 
|https://github.com/apache/qpid-proton/compare/master...RoddieKieley:PROTON-2231]
 branch, commit 
[49efdd5c17d6f5f0b83ec9820da54841df18145d|https://github.com/RoddieKieley/qpid-proton/commit/49efdd5c17d6f5f0b83ec9820da54841df18145d]
 in particular. Needs a bit more work but appears to be on the right track.

Here's snippet from a failed run:
{code}
.
.
.
(70000556e000) [0x7f971b80de00] close-listen
(7000055f1000) [0x7f971b80de00] PN_LISTEN_CLOSE on :::53389, opened: 0
(700005050000) [0x7f9719200100] wake
(70000525c000) [0x7f9718500330] connect
(700005468000) [0x7f9718600c20] wake
(700005156000) [0x7f971b80d800] listen
(700005156000) [0x7f9719100850] wake
(7000055f1000) [0x7f971b80d800] PN_LISTEN_OPEN on :::53396, opened: 1
(700005362000) [0x7f971b801600] listen
(7000050d3000) [0x7f971b801600] PN_LISTEN_OPEN on :::53397, opened: 2
(700005468000) [0x7f971b80ea00] listen
(7000053e5000) [0x7f971b80ea00] PN_LISTEN_OPEN on :::53398, opened: 3
(700005362000) [0x7f97184036c0] wake
(70000556e000) [0x7f9718600570] wake
(70000556e000) [0x7f9718600c20] wake
(700005468000) [0x7f971b801600] close-listen
(7000052df000) [0x7f971b801600] PN_LISTEN_CLOSE on :::53397, opened: 2
(700005156000) [0x7f9719200100] wake
(700005050000) [0x7f9719100850] wake
(70000525c000) [0x7f9718809800] listen
(70000525c000) [0x7f9718500330] wake
(7000054eb000) [0x7f9718809800] PN_LISTEN_OPEN on :::53399, opened: 3
(70000525c000) [0x7f9719200100] wake
(70000556e000) [0x7f971c007e00] close-listen
(7000054eb000) [0x7f971c007e00] PN_LISTEN_CLOSE on :::53371, opened: 2
(700005362000) [0x7f9718404a70] connect
(700005362000) [0x7f97184036c0] wake
(700005468000) [0x7f9718602830] connect
(700005468000) [0x7f971b805600] listen
(7000050d3000) [0x7f971b805600] PN_LISTEN_OPEN on :::53402, opened: 3
(7000050d3000) [0x7f9718600e30] connect
(10d6625c0) shut down
(700005156000) user_thread end
(70000525c000) user_thread end
(700005050000) user_thread end
(700005362000) user_thread end
(70000556e000) user_thread end
(700005468000) user_thread end
(10d6625c0) disconnect
(7000055f1000) [0x7f971b805600] PN_LISTEN_CLOSE on :::53402, opened: 2
(7000051d9000) [0x7f971b80ea00] PN_LISTEN_CLOSE on :::53398, opened: 1
(7000055f1000) [0x7f971c000600] PN_LISTEN_CLOSE on :::53392, opened: 0
(7000053e5000) [0x7f971b80d800] PN_LISTEN_CLOSE on :::53396, opened: -3
(7000050d3000) [0x7f9718809800] PN_LISTEN_CLOSE on :::53399, opened: -1
(7000052df000) [0x7f971b008c00] PN_LISTEN_CLOSE on :::53391, opened: -2
Assertion failed: (p->active > 0), function remove_active_lh, file 
/wip/src/github.com/apache/qpid-proton/c/src/proactor/libuv.c, line 394.
{code}

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

Reply via email to