Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333106 - Occasional NullPointerException in SslSelectChannelEndpoint
Summary: Occasional NullPointerException in SslSelectChannelEndpoint
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: build (show other bugs)
Version: 7.1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.1.x   Edit
Assignee: Greg Wilkins CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-22 11:39 EST by Jeremy Stone CLA
Modified: 2011-09-06 01:10 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Stone CLA 2010-12-22 11:39:54 EST
Build Identifier: 7.1.6.v20100715

Stack trace:
2010-12-22 16:18:09,856 2324639 WARN  [org.eclipse.jetty.util.log] (jetty-364:)   handle failed
java.lang.NullPointerException
	at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.unwrap(SslSelectChannelEndPoint.java:727)
	at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.fill(SslSelectChannelEndPoint.java:327)
	at org.eclipse.jetty.websocket.WebSocketParser.parseNext(WebSocketParser.java:96)
	at org.eclipse.jetty.websocket.WebSocketConnection.handle(WebSocketConnection.java:177)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:506)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
	at java.lang.Thread.run(Thread.java:619)

Looks like a threading issue to me. Do you really need to use a field for the SSLEngineResult? Can a local variable not be used instead in those methods that make wrap/unwrap calls? (If toString() really needs it then maybe a volatile field containing a copy '_latestResult' should be used for this purpose only.)

Reproducible: Didn't try
Comment 1 Michael Gorovoy CLA 2011-01-24 17:35:04 EST
Assigned to Greg.
Comment 2 Greg Wilkins CLA 2011-09-06 01:10:09 EDT
Sorry for no explicit action on this issue for so long.

However we have been working on the SSL connector throughout this time and we believe we have solved a number of issues including this NPE (which was a bad call within a synchronized try{}finally{}.

however, we don't have an explicit test case for precisely this issue, so can you please try 7.5.x and reopen if you see the problem again.

thanks