On 04/28/2015 09:19 AM, Jeff Trawick wrote:
On 04/28/2015 09:12 AM, Jim Jagielski wrote:
Yeah, that's it, at least from what I can see. If I add a sleep(1)
right after the send_msg, we pass.

To cover the potential regression concern, I'll backport the new test to 1.5.1 and confirm that it fails for me on FreeBSD 9 and Lion (even if intermittently).

I copied 1.5.2/test/testpoll.c to 1.5.1/test/ and now see the same issue on FreeBSD 9, which passed the 1.5.1 tests just before. For Lion, 1.5.2 testpoll.c on top of 1.5.1 fails intermittently (15% of the time?).


FWIW, the kqueue changes in 1.5.2 are all of this form,

@@ -115,12 +115,20 @@
     {
         int flags;

-        if ((flags = fcntl(pollset->p->kqueue_fd, F_GETFD)) == -1)
-            return errno;
+        if ((flags = fcntl(pollset->p->kqueue_fd, F_GETFD)) == -1) {
+            rv = errno;
+            close(pollset->p->kqueue_fd);
+            pollset->p = NULL;
+            return rv;
+        }


On Apr 28, 2015, at 9:10 AM, Jim Jagielski <[email protected]> wrote:

Could it be that we are seeing a race condition... that the
data isn't available by the time we wakeup and poll?

On Apr 28, 2015, at 9:02 AM, Jeff Trawick <[email protected]> wrote:

On 04/28/2015 08:52 AM, Jim Jagielski wrote:
Under FreeBSD 10, I see no issue w/ testpoll.

So it's looking like an OSX issue and not kqueue per-se.
Fails on FreeBSD 9 (also kqueue)...

Note that this is a new test I added in 1.5.2-dev. The history of that is something like this:

* I had an uncommitted change to poll on my OS X box for a long time, to report APR_INTR (4) when both data and wakeup occurred, along with configure bits to use poll instead of kqueue. * I committed the change to poll recently but luckily Yann didn't let me get away with it. * As penance, I added a test to confirm that when both data and wakeup occur the caller sees APR_SUCCESS instead of APR_EINTR.

But with N apr_pollset_poll() implementations they may not be acting consistently. We should see if the kqueue implementation can change behaviors intermittently???

On Apr 28, 2015, at 8:40 AM, Jeff Trawick <[email protected]> wrote:

On 04/28/2015 08:38 AM, Jim Jagielski wrote:
Hmmm... seeing a regression on OSX 10.10.3 w/ Xcode 6.3.1:

   % ./testall -v testpoll
   testpoll            : /Line 816: expected <0>, but saw <4>
   FAILED 1 of 23
   Failed Tests           Total    Fail    Failed %
   ===================================================
   testpoll                  23       1      4.35%

Investigating.

PS: OSX sets HAVE_KQUEUE 1
"Cool" :)  I'll fire up Lion and FreeBSD...

On Apr 25, 2015, at 9:39 AM, Jeff Trawick <[email protected]> wrote:

Tarballs/zipfiles are at http://apr.apache.org/dev/dist/

Shortcut to CHANGES:
http://apr.apache.org/dev/dist/CHANGES-APR-1.5.2

autoconf version: 2.69 (same as apr 1.5.1)
libtool version: 2.4.2 (same as apr 1.5.1)

+/-1
[  ] Release APR 1.5.2 as GA

I'll hold the vote open for 72 hours unless something out of the ordinary occurs.

Thanks in advance for testing!



Reply via email to