https://bz.apache.org/bugzilla/show_bug.cgi?id=57653

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Product|Tomcat 9                    |Tomcat Native
           Hardware|PC                          |Macintosh
          Component|Connectors                  |Library
            Version|unspecified                 |1.1.32
   Target Milestone|-----                       |---

--- Comment #5 from Mark Thomas <ma...@apache.org> ---
I think I have got to the bottom of this.

Looking at the docs for apr_pollset_poll [1], it states "Multiple signalled
conditions for the same descriptor may be reported in one or more returned
apr_pollfd_t structures, depending on the implementation.".

The crash is occurring when the socket is registered for read and write.

The tc-native code assumes that there is only ever one returned structure per
descriptor.

The unit test + modified code I am using just happens - if the timing is right
- to register a socket for read and write which almost instantly becomes
available for both. It looks like OSX rerurns mutiple apr_pollfd_t structures
for mutliple events on the same descriptor and that triggers the crash.

I've thrown together a quick patch to test this theory and the unit test has
been running in a loop now for 20+ minutes without crashing so I am fairly
confident this is the issue.


[1]
http://apr.apache.org/docs/apr/1.4/group__apr__poll.html#ga6b31d7b3a7b2d356370403dd2b79ecf3

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to