Opened 6 years ago

Closed 6 years ago

#928 closed defect (fixed)

CancelledKeyExceptions in ntcp.EventPumper

Reported by: zab Owned by: zab
Priority: maintenance Milestone: 0.9.6
Component: router/transport Version: 0.9.5
Keywords: NTCP Cc: zab@…
Parent Tickets:

Description

Most probably harmless...

04:30:00:52:52:206 ERROR [NTCP Pumper ] ter.transport.ntcp.EventPumper: Error in the event pumper
java.nio.channels.CancelledKeyException
        at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
        at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:69)
        at sun.nio.ch.KQueueSelectorImpl.updateSelectedKeys(KQueueSelectorImpl.java:105)
        at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:74)
        at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
        at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
        at net.i2p.router.transport.ntcp.EventPumper.run(EventPumper.java:175)
        at java.lang.Thread.run(Thread.java:680)
        at net.i2p.util.I2PThread.run(I2PThread.java:85)

For the time being I'll reduce the severity from ERROR to WARN

Subtickets

Change History (5)

comment:1 follow-up: Changed 6 years ago by zzz

java version?

comment:2 in reply to: ↑ 1 Changed 6 years ago by zab

Replying to zzz:

java version?

Apple Inc. 1.6.0_43 but I've seen the same exception on oracle jvms as well.

comment:3 Changed 6 years ago by zzz

  • Milestone set to 0.9.6
  • Resolution set to fixed
  • Status changed from new to closed

Interesting because that's an unchecked exception not mentioned in the Selector.select() javadocs. But we catch it lots of other places in EventPumper? too. So your fix looks sufficient to me. Closing on the assumption there's nothing more to do.

comment:4 Changed 6 years ago by zab

  • Milestone 0.9.6 deleted
  • Resolution fixed deleted
  • Status changed from closed to reopened

/me no likes this, reopening

5:21:21:02:00:888 WARN  [NTCP Pumper ] ter.transport.ntcp.EventPumper: error writing on NTCP conn from ABgE0g created 122ms ago
java.nio.channels.CancelledKeyException
        at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
        at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:59)
        at net.i2p.router.transport.ntcp.EventPumper.processWrite(EventPumper.java:695)
        at net.i2p.router.transport.ntcp.EventPumper.processKeys(EventPumper.java:362)
        at net.i2p.router.transport.ntcp.EventPumper.run(EventPumper.java:181)
        at java.lang.Thread.run(Thread.java:680)
        at net.i2p.util.I2PThread.run(I2PThread.java:85)

comment:5 Changed 6 years ago by zab

  • Milestone set to 0.9.6
  • Resolution set to fixed
  • Status changed from reopened to closed

Looking good after last commit

Note: See TracTickets for help on using tickets.