[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #16 from Mark Thomas ma...@apache.org ---
Looks good to me. The failing tests pass. I haven't done a full test run
though.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #8 from Mladen Turk mt...@apache.org ---
Hmm, reading the code it seems that a socket is member of two pollsets
(timeouts and connections). Is this correct. Note that socket can be member of
only one pollset and 1.1.26 kind of enforces that.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #9 from Mark Thomas ma...@apache.org ---
(In reply to comment #8)
 Hmm, reading the code it seems that a socket is member of two pollsets
 (timeouts and connections). Is this correct. Note that socket can be member
 of only one pollset and 1.1.26 kind of enforces that.

Neither of those are pollsets. There are local lists of sockets.

There are a handful of bugs I have found in the new AprEndpoint. Fixes are on
the way. In the meantime, I would be helpful if you could look at the return
value of Poll.pollset. The use of n++ twice inside the loop looks like a bug to
me.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #10 from Mladen Turk mt...@apache.org ---
Not sure what you mean by double increment. Is it?

p-set[n++]   = (jlong)(fd-rtnevents);
p-set[n++]   = P2J(fd-client_data);

That should be fine.
The returned array consist of pair of values odd being event and even being the
socket. It was always like that.

But you are right, there is a bug. Returned number should be n/2 not n.
I'll fix that.
If you create a shortcut in Java which calls .pollset(...)
and divide by two in case the value is  0 doesn't that help?
Anyhow, I'll fix the native and create test 1.1.27-dev binaries for further
test.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

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

   What|Removed |Added

  Component|Library |Connectors
Version|unspecified |trunk
Product|Tomcat Native   |Tomcat 8
   Target Milestone|--- |

--- Comment #11 from Mark Thomas ma...@apache.org ---
(In reply to comment #10)
 Not sure what you mean by double increment. Is it?
 
 p-set[n++]   = (jlong)(fd-rtnevents);
 p-set[n++]   = P2J(fd-client_data);
 
 That should be fine.
 The returned array consist of pair of values odd being event and even being
 the socket. It was always like that.
 
 But you are right, there is a bug. Returned number should be n/2 not n.
 I'll fix that.

Thanks.

 If you create a shortcut in Java which calls .pollset(...)
 and divide by two in case the value is  0 doesn't that help?

Already doing this locally. That was how I moved past this issue and found the
others.

 Anyhow, I'll fix the native and create test 1.1.27-dev binaries for further
 test.

Perfect. I see your commit, so I'm going to move this back to Tomact 8 to track
the remaining AprEndpoint issies.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Mark Thomas ma...@apache.org ---
The root cause of the initial issue is the tc native bug that Mladen has now
fixed. This affected Tomcat 7 and 8.

The other issues (the poller threads not stopping, socket reads hanging) are
Tomcat 8 specific and have been fixed in trunk.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #13 from Mladen Turk mt...@apache.org ---
Please try with the binaries from
http://people.apache.org/~mturk/native/1.1.27-dev-20130202/

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #14 from Mark Thomas ma...@apache.org ---
Sure. Just as soon as you make those files world readable ;)

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #15 from Mladen Turk mt...@apache.org ---
Attrs should be fine now.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #5 from Mark Thomas ma...@apache.org ---
I can repeat this on 64-bit Windows.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

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

   What|Removed |Added

  Component|Connectors  |Library
Version|trunk   |unspecified
Product|Tomcat 8|Tomcat Native
   Target Milestone||---

--- Comment #6 from Mark Thomas ma...@apache.org ---
I believe I have found the root cause of this. There is a bug in tc native
introduced in r1412919 in the implementation of Poll.pollset(). n is
incremented twice inside the for each loop for each entry in the poller. That
means the return value is 2 * number of entries rather than number of entries.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-02-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #7 from Mark Thomas ma...@apache.org ---
Hmm. There may be more to this problem than just that. I still see issues even
with a workaround for the Poll.poollset() return value problem.

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-01-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com ---
Created attachment 29911
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=29911action=edit
TEST-org.apache.catalina.loader.TestVirtualContext.APR.txt

JUnit test result file

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-01-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com ---
Created attachment 29912
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=29912action=edit
thread_dump_2013-02-01.txt

Thread dump, taken with jvisualvm during the 15-minutes pause

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-01-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com ---
 I suspect that wrapper is null here.

Yes, it is null. I added the following code at line 1632: 

[[[
if (wrapper==null) throw new NullPointerException(wrapper is null, n:  + n +
, rv: +rv+, desc[n*2+1]:  + desc[n*2+1]);
]]]

It results in the following on console:
[junit] WARNING: Unexpected poller error
[junit] java.lang.NullPointerException: wrapper is null, n: 0, rv: 1,
desc[n*2+1]: 52898296
[junit] at
org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1632)
[junit] at java.lang.Thread.run(Thread.java:722)

-- 
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



[Bug 54513] NullPointerException in AprEndpoint$Poller.run

2013-01-31 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54513

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com ---
Reproduced this issue with Native 1.1.24, but a bit different.
I was not able to reproduce the NPE, but SocketInputStream.socketRead0 in the
test hung in the same way. There were two variants:
a) no error message is printed
b) Feb 01, 2013 H:MM:SS AM org.apache.tomcat.util.net.AprEndpoint$Poller run
WARNING: Error processing socket timeout


There were a pair of runs with 1.1.26 and with 1.1.24 when the issue did not
reproduce.


  thread_dump_2013-02-01.txt (14.90 KB, text/plain) 

What is odd in the thread dump is that there are two threads:
http-apr-127.0.0.1-auto-2-Poller
http-apr-127.0.0.1-auto-1-Poller

All other threads besides this poller one are auto-2.
It is the second test, but the poller thread from the first test has not
stopped.

-- 
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