Skip to content

Datagram buffer state machine problem #128

@balazsracz

Description

@balazsracz

In certain situations the datagram handler in the openlcb library locks up in a way that it becomes impossible to send datagrams anymore.
A good way to trigger this is to have a target node that does not send back ack or nack for the datagram (but presumably it times out).
I saw the following on the console:

2018-05-10 17:53:17,877 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught Exception caught by jmri.util.exceptionhandler.UncaughtExceptionHandler [Olcb-Pool-1-Thread-22]
java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:397)
at java.util.Timer.schedule(Timer.java:193)
at org.openlcb.implementations.DatagramMeteringBuffer$MessageMemo.startTimeout(DatagramMeteringBuffer.java:213)
at org.openlcb.implementations.DatagramMeteringBuffer$MessageMemo.forwardDownstream(DatagramMeteringBuffer.java:203)
at org.openlcb.implementations.DatagramMeteringBuffer$MessageMemo.sendIt(DatagramMeteringBuffer.java:199)
at org.openlcb.implementations.DatagramMeteringBuffer$Consumer.consume(DatagramMeteringBuffer.java:338)
at org.openlcb.implementations.DatagramMeteringBuffer$Consumer.run(DatagramMeteringBuffer.java:325)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
2018-05-10 18:03:15,565 implementations.DatagramService ERROR - Overriding datagram transmit memo. old DatagramServiceTransmitMemo to 06.01.00.00.00.04: 20.00.7F.00.00.00.F8.00.00.00.01 new DatagramServiceTransmitMemo to 06.01.00.00.00.04: 20.40.7F.00.00.00.F8.04 [AWT-EventQueue-0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions