Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005252 [Resin] minor have not tried 10-22-12 04:01 10-22-12 10:08
Reporter harsha View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.33 Product Version 4.0.31
  Product Build
Summary 0005252: NPE during getSession()
Description We've bumped into a NPE when trying to access the Session for a given request. The relevant section of the stacktrace is given. The simple fix would be to check to see if the request is non-null inside getCookies().

java.lang.NullPointerException
at com.caucho.server.http.HttpServletRequestImpl.getCookies(HttpServletRequestImpl.java:908)
at com.caucho.server.http.HttpServletRequestImpl.findCookie(HttpServletRequestImpl.java:955)
at com.caucho.server.http.HttpServletRequestImpl.getCookie(HttpServletRequestImpl.java:950)
at com.caucho.server.http.HttpServletRequestImpl.findSessionIdFromCookie(HttpServletRequestImpl.java:1019)
at com.caucho.server.http.HttpServletRequestImpl.getRequestedSessionId(HttpServletRequestImpl.java:987)
at com.caucho.server.http.HttpServletRequestImpl.getSessionId(HttpServletRequestImpl.java:1043)
at com.caucho.server.http.AbstractCauchoRequest.createSession(AbstractCauchoRequest.java:684)
at com.caucho.server.http.AbstractCauchoRequest.getSession(AbstractCauchoRequest.java:630)



As an aside, I think this is a race condition due to:

 - The caucho layer tears down a session at some point and an event is fired to let the application layer know of a session tear down.
 - Our application layer has a reaper-thread to detect timed-out sessions.
 - I think the caucho layer has invalidated the session and then fired the session-invalidated event, but we have tried to access that session before we have received that invalidation event.

Steps To Reproduce
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
10-22-12 04:01 harsha New Issue
10-22-12 10:08 ferg Assigned To  => ferg
10-22-12 10:08 ferg Status new => closed
10-22-12 10:08 ferg Resolution open => fixed
10-22-12 10:08 ferg Fixed in Version  => 4.0.33


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker