Bug 35701 - Broken pollset data in poll/unix/port.c
Summary: Broken pollset data in poll/unix/port.c
Status: RESOLVED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: All Solaris
: P2 major (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks: 35702
  Show dependency tree
 
Reported: 2005-07-12 13:13 UTC by Masaoki Kobayashi
Modified: 2005-08-26 20:51 UTC (History)
0 users



Attachments
A patch to fix add_ring disorder in port.c (4.75 KB, patch)
2005-07-12 13:23 UTC, Masaoki Kobayashi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masaoki Kobayashi 2005-07-12 13:13:08 UTC
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.
Comment 1 Masaoki Kobayashi 2005-07-12 13:23:25 UTC
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.
Comment 2 Paul Querna 2005-07-19 11:34:31 UTC
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
Comment 3 Joe Orton 2005-08-24 13:10:27 UTC
Can someone retest with the APR 1.2.1 release?
Comment 4 Masaoki Kobayashi 2005-08-27 04:51:57 UTC
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.