[jira] [Created] (PROTON-1538) Epoll proactor unguarded memory access

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

[jira] [Created] (PROTON-1538) Epoll proactor unguarded memory access

JIRA jira@apache.org
Cliff Jansen created PROTON-1538:

             Summary: Epoll proactor unguarded memory access
                 Key: PROTON-1538
                 URL: https://issues.apache.org/jira/browse/PROTON-1538
             Project: Qpid Proton
          Issue Type: Bug
          Components: proton-c
    Affects Versions: proton-c-0.18.0
            Reporter: Cliff Jansen
            Assignee: Cliff Jansen
             Fix For: proton-j-0.18.0

ThreadSanitizer singled out the epoll_event for network sockets to be a risk of  out of order access by multiple threads.

On inspection it is possible that two threads could try rearming the socket out of order, allowing the wrong events of interest to be registered.

Reusing the existing connection context mutex would be costly for
guarding this since the system call is frequent and relatively long
compared to other acquisitions of the mutex.  Adding a new mutex that
guards this operation should fix things with negligible performance

This message was sent by Atlassian JIRA

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