Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-517

CancelledKeyException in ControlProtocolTest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-M3
    • 1.0-M4
    • general
    • None
    • x86 Linux Mandrake 9.1, J2SE 1.4.2_03, 700 MHz PIII (Coppermine), 256KB cache, 450 MB RAM, 49 MB free, Dell laptop

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            cjohan Craig Johannsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: