Ab (apache benchmark) uses pollset to handle asynchronous I/O. However, the usage is a little bit different from httpd's one, because ab frequently does apr_pollset_remove. New apr-1.x uses port_xxx system calls on Solaris 10, instead of traditional poll() system call. The port_getn() is peculiar as it deletes the fds from list after the event. Current port.c implementation manages the deleted port list in pollset->add_ring. The list can be broken because add_ring contains the data which is also in query_ring. The "next" and "prev" links in add_ring is broken when it is removed from query_ring.
Created attachment 15652 [details] A patch to fix add_ring disorder in port.c This patch fixes the add_ring disorder in port.c on Solaris 10. I tested this change on testall, on httpd 2.1.6-alpha, and also on ab.
I believe this was already fixed with a slitghtly different patch in APR-Trunk, but it has not been put in a released version of APR, and hence, not in httpd 2.1.6
Can someone retest with the APR 1.2.1 release?
I confirmed the change in apr-1.2.1, and tested it on Solaris 10 with apache httpd in trunk. The add_ring disorder has gone. I believe this issue is fixed.