0.3.6 registering a channel sometimes assigns the same ID as an existing channel

Started by mikb

mikb

I've seen this problem with previous versions as well.
Rebooting the canZero fixes the problem.

Alain

Do you have some sample code to reproduce this issue? Anything special about your setup (e.g. a very large number of channels)?
We've been running nocan for several years and we have never seen such a problem.

mikb

41 channels. Channel 39 acquired the same ID as a previous channel.
Nocanc MQTT was sending inbound messages at the time the node was booted.

I've now added code to the canzero that halts the program if it detects a duplicate ID.

mikb

With 0.3.4 also I saw a number of problems with registerChannel failing so I have also added a check for that. My code now sits in a loop calling registerChannel at 100ms until it succeeds.

mikb

I saw the duplicate channel ID bug again today.
I only restart the system once per day, so based on this small sample it looks like 1 in every 50 or so startups results in a duplicate channel ID.