dev@glassfish.java.net

PortUnification exception AS9.1 EE - buildl 30 - PortUnificationException java.nio.BufferUnderflowException

From: jothir ganesan <Jothir.Ganesan_at_Sun.COM>
Date: Fri, 05 Jan 2007 14:31:28 +0530

Hi

I was executing a list of tests for testing the high availability and
session failover features of appserver. Our tests typically does the
following:

- start the cluster
- send a(or 2-3) request(s) throught the lbplugin to the instance in a
cluster. The instance listed first in Loadbalancer.xml serves the
request. (In our case, it is instance1)
- stop and start the instance(say instance1) that handled the request
- send the next (remaining) request(s) to check for session availability.
- Undeploy the app.

For the first few tests, instance1 handled the requests and was working
fine. After ~10 tests, instance 1 threw the exception given below:

[#|2007-01-04T17:19:06.173+0530|WARNING|sun-appserver-ee9.1|GRIZZLY|_ThreadID=13;_ThreadName=httpSSLWorkerThread-1111-0;_RequestID=31671a9f-7684-44b2-af0e-4bd7eb981122;|PortUnification exception
java.nio.BufferUnderflowException
        at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127)
        at java.nio.ByteBuffer.get(ByteBuffer.java:674)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.cancel(PortUnificationPipeline.java:386)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:344)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
|#]

[#|2007-01-04T17:19:11.184+0530|WARNING|sun-appserver-ee9.1|GRIZZLY|_ThreadID=14;_ThreadName=httpSSLWorkerThread-1111-1;_RequestID=4df046c1-87c0-4def-90d0-0e429cafa0ea;|PortUnification exception
java.nio.BufferUnderflowException
        at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127)
        at java.nio.ByteBuffer.get(ByteBuffer.java:674)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.cancel(PortUnificationPipeline.java:386)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:344)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
|#]

[#|2007-01-04T17:19:15.859+0530|INFO|sun-appserver-ee9.1|javax.ee.enterprise.system.tools.synchronization|_ThreadID=15;_ThreadName=RMI TCP Connection(37)-10.12.163.192;|SYNC062: Synchronization for SimpleSession is complete. Total time spent 711 milli second(s).|#]

[#|2007-01-04T17:19:15.926+0530|INFO|sun-appserver-ee9.1|javax.enterprise.system.stream.out|_ThreadID=15;_ThreadName=RMI TCP Connection(37)-10.12.163.192;|
IN HaWebmethodSessionStrategyBuilder NEW|#]

[#|2007-01-04T17:19:15.928+0530|INFO|sun-appserver-ee9.1|javax.enterprise.system.container.web|_ThreadID=15;_ThreadName=RMI TCP Connection(37)-10.12.163.192;/SimpleSession;ha;web-method;session;|WEB0130: Enabling ha-based persistence for web module [/SimpleSession]'s sessions: persistence-type = [ha] / persistenceFrequency = [web-method] / persistenceScope = [session]|#]

[#|2007-01-04T17:19:16.194+0530|WARNING|sun-appserver-ee9.1|GRIZZLY|_ThreadID=13;_ThreadName=httpSSLWorkerThread-1111-0;_RequestID=31671a9f-7684-44b2-af0e-4bd7eb981122;|PortUnification exception
java.nio.BufferUnderflowException
        at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127)
        at java.nio.ByteBuffer.get(ByteBuffer.java:674)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.cancel(PortUnificationPipeline.java:386)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:344)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
|#]

[#|2007-01-04T17:19:21.206+0530|WARNING|sun-appserver-ee9.1|GRIZZLY|_ThreadID=14;_ThreadName=httpSSLWorkerThread-1111-1;_RequestID=4df046c1-87c0-4def-90d0-0e429cafa0ea;|PortUnification exception
java.nio.BufferUnderflowException
        at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127)
        at java.nio.ByteBuffer.get(ByteBuffer.java:674)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.cancel(PortUnificationPipeline.java:386)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:344)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
|#]

and instance1 was not serving requests any more. instance1 was
unhealthy, so lbplugin routed the requests to instance2. But after a few
number of tests, instance2 became not reachable because of the same
exception. Finally, instance 3 is handling the requests and is throwing
the same exception.......

Could anyone please let me know the cause of this issue? This is
blocking HA execution.

Thanks
Jothir