You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Randy Watler <wa...@wispertel.net> on 2006/03/28 20:56:42 UTC
Re: NullPointerException in LinkedList during
PageManager.removeListener()
Ethan,
I will take care of this for you now. There is an open JIRA to
strengthen the code in the PageManager implementations in the face of
concurrent sessions/threads.
http://issues.apache.org/jira/browse/JS2-479
Keep the observations coming... we appreciate it!
Randy
On Tue, 2006-03-28 at 11:33 -0500, Ethan Adams wrote:
> Not too much to elaborate on, but I'll try.
>
> We have a load test that cycles through 100 users, and then starts
> over at user one. The user logs in, hits a few pages, and then logs
> out.
>
> We will randomly get the NPE during the logout in which the
> request.getSession(true).invalidate() is called. This starts the
> chain of session cleanup which involves the removeListener() call on
> PageManager.
>
> The fact the an unsynchronized List is being used to manage the event
> listeners is what really concerned me. There will definitely be mutli
> threaded access to this...Unless I'm reading the code wrong.
>
> In addition, if you look at the LinkedList.java source and the line
> the NPE occurs, it seems that the "e" object is null. Another sign of
> something out of sync
>
> public boolean remove(Object o) {
> if (o==null) {
> for (Entry<E> e = header.next; e != header; e = e.next) {
> if (e.element==null) {
> remove(e);
> return true;
> }
> }
> } else {
> for (Entry<E> e = header.next; e != header; e = e.next) {
> LINE 220-->if (o.equals(e.element)) {
> remove(e);
> return true;
> }
> }
> }
> return false;
> }
>
> On 3/28/06, Aaron Evans <aa...@gmail.com> wrote:
> > Hey Ethan,
> > haven't run into that, but could you post some of your findings?
> >
> > On 3/28/06, Ethan Adams <et...@gmail.com> wrote:
> > > I'm running a 100 user load test on Jetspeed-2 final on Java 1.5.
> > > During the logout, a session invalidate is called which ultimately
> > > calls AbstractPageManager.removeListener(). This intern calls
> > > LinkedList.remove() which is throwing an NPE. I'm assuming this is
> > > happening because LinkedList is not synchronized, and neither are the
> > > methods accessing it.
> > >
> > > Anyone else run into this problem.
> > >
> > > java.lang.NullPointerException
> > > at java.util.LinkedList.remove(LinkedList.java:220)
> > > at org.apache.jetspeed.page.AbstractPageManager.removeListener(AbstractPageManager.java:678)
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: NullPointerException in LinkedList during PageManager.removeListener()
Posted by Ethan Adams <et...@gmail.com>.
Randy,
Great! I'll report back if there are any issues.
Thanks.
On 3/28/06, Randy Watler <wa...@wispertel.net> wrote:
> Ethan,
>
> Fixed in SVN HEAD. Let me know if it does not resolve you issue,
>
> Randy
>
> On Tue, 2006-03-28 at 11:56 -0700, Randy Watler wrote:
> > Ethan,
> >
> > I will take care of this for you now. There is an open JIRA to
> > strengthen the code in the PageManager implementations in the face of
> > concurrent sessions/threads.
> >
> > http://issues.apache.org/jira/browse/JS2-479
> >
> > Keep the observations coming... we appreciate it!
> >
> > Randy
> >
> > On Tue, 2006-03-28 at 11:33 -0500, Ethan Adams wrote:
> > > Not too much to elaborate on, but I'll try.
> > >
> > > We have a load test that cycles through 100 users, and then starts
> > > over at user one. The user logs in, hits a few pages, and then logs
> > > out.
> > >
> > > We will randomly get the NPE during the logout in which the
> > > request.getSession(true).invalidate() is called. This starts the
> > > chain of session cleanup which involves the removeListener() call on
> > > PageManager.
> > >
> > > The fact the an unsynchronized List is being used to manage the event
> > > listeners is what really concerned me. There will definitely be mutli
> > > threaded access to this...Unless I'm reading the code wrong.
> > >
> > > In addition, if you look at the LinkedList.java source and the line
> > > the NPE occurs, it seems that the "e" object is null. Another sign of
> > > something out of sync
> > >
> > > public boolean remove(Object o) {
> > > if (o==null) {
> > > for (Entry<E> e = header.next; e != header; e = e.next) {
> > > if (e.element==null) {
> > > remove(e);
> > > return true;
> > > }
> > > }
> > > } else {
> > > for (Entry<E> e = header.next; e != header; e = e.next) {
> > > LINE 220-->if (o.equals(e.element)) {
> > > remove(e);
> > > return true;
> > > }
> > > }
> > > }
> > > return false;
> > > }
> > >
> > > On 3/28/06, Aaron Evans <aa...@gmail.com> wrote:
> > > > Hey Ethan,
> > > > haven't run into that, but could you post some of your findings?
> > > >
> > > > On 3/28/06, Ethan Adams <et...@gmail.com> wrote:
> > > > > I'm running a 100 user load test on Jetspeed-2 final on Java 1.5.
> > > > > During the logout, a session invalidate is called which ultimately
> > > > > calls AbstractPageManager.removeListener(). This intern calls
> > > > > LinkedList.remove() which is throwing an NPE. I'm assuming this is
> > > > > happening because LinkedList is not synchronized, and neither are the
> > > > > methods accessing it.
> > > > >
> > > > > Anyone else run into this problem.
> > > > >
> > > > > java.lang.NullPointerException
> > > > > at java.util.LinkedList.remove(LinkedList.java:220)
> > > > > at org.apache.jetspeed.page.AbstractPageManager.removeListener(AbstractPageManager.java:678)
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > > > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
Re: NullPointerException in LinkedList during
PageManager.removeListener()
Posted by Randy Watler <wa...@wispertel.net>.
Ethan,
Fixed in SVN HEAD. Let me know if it does not resolve you issue,
Randy
On Tue, 2006-03-28 at 11:56 -0700, Randy Watler wrote:
> Ethan,
>
> I will take care of this for you now. There is an open JIRA to
> strengthen the code in the PageManager implementations in the face of
> concurrent sessions/threads.
>
> http://issues.apache.org/jira/browse/JS2-479
>
> Keep the observations coming... we appreciate it!
>
> Randy
>
> On Tue, 2006-03-28 at 11:33 -0500, Ethan Adams wrote:
> > Not too much to elaborate on, but I'll try.
> >
> > We have a load test that cycles through 100 users, and then starts
> > over at user one. The user logs in, hits a few pages, and then logs
> > out.
> >
> > We will randomly get the NPE during the logout in which the
> > request.getSession(true).invalidate() is called. This starts the
> > chain of session cleanup which involves the removeListener() call on
> > PageManager.
> >
> > The fact the an unsynchronized List is being used to manage the event
> > listeners is what really concerned me. There will definitely be mutli
> > threaded access to this...Unless I'm reading the code wrong.
> >
> > In addition, if you look at the LinkedList.java source and the line
> > the NPE occurs, it seems that the "e" object is null. Another sign of
> > something out of sync
> >
> > public boolean remove(Object o) {
> > if (o==null) {
> > for (Entry<E> e = header.next; e != header; e = e.next) {
> > if (e.element==null) {
> > remove(e);
> > return true;
> > }
> > }
> > } else {
> > for (Entry<E> e = header.next; e != header; e = e.next) {
> > LINE 220-->if (o.equals(e.element)) {
> > remove(e);
> > return true;
> > }
> > }
> > }
> > return false;
> > }
> >
> > On 3/28/06, Aaron Evans <aa...@gmail.com> wrote:
> > > Hey Ethan,
> > > haven't run into that, but could you post some of your findings?
> > >
> > > On 3/28/06, Ethan Adams <et...@gmail.com> wrote:
> > > > I'm running a 100 user load test on Jetspeed-2 final on Java 1.5.
> > > > During the logout, a session invalidate is called which ultimately
> > > > calls AbstractPageManager.removeListener(). This intern calls
> > > > LinkedList.remove() which is throwing an NPE. I'm assuming this is
> > > > happening because LinkedList is not synchronized, and neither are the
> > > > methods accessing it.
> > > >
> > > > Anyone else run into this problem.
> > > >
> > > > java.lang.NullPointerException
> > > > at java.util.LinkedList.remove(LinkedList.java:220)
> > > > at org.apache.jetspeed.page.AbstractPageManager.removeListener(AbstractPageManager.java:678)
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org