ASF subversion and git services commented on PROTON-1771:

Commit 188ce28066df8f5e965fb63593f419f49c950760 in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=188ce28 ]

PROTON-1771: [c] locking around epoll_extended_t

Add locking for epoll_extended_t structure to fix race conditions revealed
by threaderciser.c

We pass pointers to this struct between threads via epoll, and epoll does not
guarantee that memory writes by one thread will be visible in the next thread
that gets the pointer. Since helgrind reports the races, it suggests that epoll
is not acting as a memory barrier in practice either.

These mutexes will not be contended so they are not expensive. We could use an
acquire/release memory barrier, but an un-contended mutex is basically exactly
that, and is portable.

> [c-proactor] multi-thread race test for proactor
> ------------------------------------------------
>                 Key: PROTON-1771
>                 URL: https://issues.apache.org/jira/browse/PROTON-1771
>             Project: Qpid Proton
>          Issue Type: Test
>          Components: proton-c
>    Affects Versions: proton-c-0.20.0
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>            Priority: Major
>             Fix For: proton-c-0.23.0
> Crate a new test exe that runs for a (configurable, default short) period of
> time, with a single proactor acted on by multiple proactor and user threads. 
> Run
> with helgrind or tsan to detect races.
> Exercise potentially racy APIs concurrently:
> - making, accepting and closing (from both ends) a connection.
> - pn_connection_wake
> - pn_proactor_release_connection
> - re-use of released pn_connection_t on a new connection
> - timeout
> - concurrent with some normal use: sending/receiving messages.

This message was sent by Atlassian JIRA

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

Reply via email to