openmrn icon indicating copy to clipboard operation
openmrn copied to clipboard

Crash on Destination Alias 0x000

Open bakerstu opened this issue 2 years ago • 7 comments

08:33:28.759: [[195ebf3b] 00 00 01 00 00 02 00 01]  R: 02.01.57.20.00.32 - 00.00.00.00.00.00 TractionControlRequest set fn 2 to 1
  Src: Throttle test
08:33:29.323: [[195ebf3b] 00 00 01 00 00 02 00 00]  R: 02.01.57.20.00.32 - 00.00.00.00.00.00 TractionControlRequest set fn 2 to 0
  Src: Throttle test
08:33:30.093: [[195ebf3b] 00 00 01 00 00 03 00 01]  R: 02.01.57.20.00.32 - 00.00.00.00.00.00 TractionControlRequest set fn 3 to 1
  Src: Throttle test
08:33:30.973: [[195ebf3b] 00 00 01 00 00 01 00 00]  R: 02.01.57.20.00.32 - 00.00.00.00.00.00 TractionControlRequest set fn 1 to 0
  Src: Throttle test
08:33:31.948: [[195ebf3b] 00 00 01 00 00 00 00 01]  R: 02.01.57.20.00.32 - 00.00.00.00.00.00 TractionControlRequest set fn 0 to 1
  Src: Throttle test
08:33:32.742: [[195ebf3b] 00 00 01 00 00 00 00 00]  R: 02.01.57.20.00.32 - 00.00.00.00.00.00 TractionControlRequest set fn 0 to 0
  Src: Throttle test

bakerstu avatar Aug 25 '23 13:08 bakerstu

I'm curious how this might have happened, I saw something similar in one of my tests (it wasn't throttle related) but found that my node-id wasn't initializing correctly (it was passed in as zero to SimpleStack somehow).

Can / should there be an HASSERT in SimpleStack to ensure node id is not zero? For throttles should the node id be also checked for non-zero and raise an error to the caller or HASSERT?

atanisoft avatar Aug 25 '23 13:08 atanisoft

I'm curious how this might have happened, I saw something similar in one of my tests (it wasn't throttle related) but found that my node-id wasn't initializing correctly (it was passed in as zero to SimpleStack somehow).

The 0x000 alias was produced by an LCC LocoNet Gateway with "old" firmware. It is believed that RR-CirKits already fixed this on their end. The LCC LocoNet Gateway was updated, and this seems to have allowed us to move forward for now.

bakerstu avatar Aug 25 '23 13:08 bakerstu

Interesting, I wonder then if OpenMRN should discard the 0x000 alias frames or reply with an error to the caller (though with an invalid alias it may raise other issues).

atanisoft avatar Aug 25 '23 14:08 atanisoft

Interesting, I wonder then if OpenMRN should discard the 0x000 alias frames or reply with an error to the caller (though with an invalid alias it may raise other issues).

OpenMRN should do something that does not equate to a crash. That is the purpose of filing this issue.

bakerstu avatar Aug 25 '23 14:08 bakerstu

At 9:48, same testing session, the LCC LocoNet Gateway still produces a 0x000 alias crash. This is with the latest firmware version "B8f".

bakerstu avatar Aug 25 '23 14:08 bakerstu

Fixed by #751

balazsracz avatar Feb 04 '24 13:02 balazsracz

We should still add unit tests for messages with zero alias in the source field or the destination field.

balazsracz avatar Feb 04 '24 13:02 balazsracz