geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Johannsen (JIRA)" <...@geronimo.apache.org>
Subject [jira] Created: (GERONIMO-517) CancelledKeyException in ControlProtocolTest
Date Mon, 06 Dec 2004 01:10:20 GMT
CancelledKeyException in ControlProtocolTest
--------------------------------------------

         Key: GERONIMO-517
         URL: http://nagoya.apache.org/jira/browse/GERONIMO-517
     Project: Apache Geronimo
        Type: Bug
  Components: general  
    Versions: 1.0-M3    
 Environment: x86 Linux Mandrake 9.1, J2SE 1.4.2_03, 700 MHz PIII (Coppermine), 256KB cache,
450 MB RAM, 49 MB free, Dell laptop
    Reporter: Craig Johannsen


Building the network module from the latest source using "maven m:fresh-checkout m:rebuild-all":
   [junit] [ERROR] TEST org.apache.geronimo.network.protocol.control.ControlProtocolTest FAILED

The test gets a CancelledKeyException in the addInterestOps function of SelectorManager.
It is near the end of the test and ProtocolFactory.drain has been called.
The ControlServerProtocol.drain function is sending a ShutdownRequestDownPacket down the stack.
At the very end of SocketProtocol.sendDown, addInterestOps is called.
Perhaps addInterestOps should test for a cancelled SelectionKey by calling selectorKey.isValid()
before calling selectorKey.interestOps.
The key may have been cancelled by closing the channel or closing the selector.

Testcase: test(org.apache.geronimo.network.protocol.control.ControlProtocolTest):    Caused
an ERROR
null
java.nio.channels.CancelledKeyException
    at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
    at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:59)
    at org.apache.geronimo.network.SelectorManager.addInterestOps(SelectorManager.java:238)
    at org.apache.geronimo.network.protocol.SocketProtocol.sendDown(SocketProtocol.java:268)
    at org.apache.geronimo.network.protocol.control.ControlServerProtocol.drain(ControlServerProtocol.java:112)
    at org.apache.geronimo.network.protocol.AcceptableProtocolStack.drain(AcceptableProtocolStack.java:114)
    at org.apache.geronimo.network.protocol.ProtocolFactory.drain(ProtocolFactory.java:141)
    at org.apache.geronimo.network.protocol.control.ControlProtocolTest.test(ControlProtocolTest.java:150)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message