Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350642 - SslSelectChannelEndPoint.unwrap causes java.lang.IllegalArgumentException: getIndex>putIndex: 23>0
Summary: SslSelectChannelEndPoint.unwrap causes java.lang.IllegalArgumentException: ge...
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: client (show other bugs)
Version: 7.4.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 7.2.x   Edit
Assignee: Greg Wilkins CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 19:45 EDT by Joakim Erdfelt CLA
Modified: 2011-08-30 15:03 EDT (History)
2 users (show)

See Also:


Attachments
Console Build Output for jetty-client (mvn clean install) (80.06 KB, application/octet-stream)
2011-06-28 19:45 EDT, Joakim Erdfelt CLA
no flags Details
New build output /jetty-client/ (81.56 KB, text/plain)
2011-06-28 23:48 EDT, Joakim Erdfelt CLA
no flags Details
Build log after changes (662.38 KB, text/x-log)
2011-06-29 20:03 EDT, Michael Gorovoy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Erdfelt CLA 2011-06-28 19:45:11 EDT
Created attachment 198780 [details]
Console Build Output for jetty-client (mvn clean install)

Various tests cases in jetty-client trigger many of the following exception during testing on OSX.

java.lang.IllegalArgumentException: getIndex>putIndex: 23>0
	at org.eclipse.jetty.io.AbstractBuffer.setPutIndex(AbstractBuffer.java:534)
	at org.eclipse.jetty.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:197)
	at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.unwrap(SslSelectChannelEndPoint.java:695)
	at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.fill(SslSelectChannelEndPoint.java:346)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:289)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
	at java.lang.Thread.run(Thread.java:680)

Build Info:

$ mvn --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 10:31:09-0700)
Maven home: /Users/joakim/Java/maven/apache-maven-3.0.3
Java version: 1.6.0_24, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.6.8", arch: "x86_64", family: "mac"
Comment 1 Greg Wilkins CLA 2011-06-28 22:52:38 EDT
I've found an issue where close was being called from within a try{}finally{} that was manipulating the buffer pointers.  

Can you try trunk and see if you still get this exception.
Comment 2 Joakim Erdfelt CLA 2011-06-28 23:48:19 EDT
Created attachment 198783 [details]
New build output /jetty-client/

Adding new build-2.log console output of /jetty-client/ build (mvn clean install) of current trunk.

Still have the IllegalArgumentException's (and a new IllegalStateException)
Comment 3 Michael Gorovoy CLA 2011-06-29 20:03:50 EDT
Created attachment 198870 [details]
Build log after changes
Comment 4 Michael Gorovoy CLA 2011-08-30 15:03:19 EDT
I have just ran the build on Mac OS X again and there are no more exceptions like this in the build log. Resolving this ticket now.