You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is would cause #92 to recur (both nodes keep trying to redo the reservation process forever, causing the openlcb network stack to become unusable).
This is apparently undefined behavior in the Standard: It just says to make them unique, not what to do if they aren't (?)
How do detect this during alias reservation isn't clear (to me). Alias reservation loop occurs when two instances are open #92 isn't resolved by implementing the Standard's alias reservation process (It is mitigated by generating a unique NodeID) because the issue occurs based on a duplicate NodeID not duplicate alias.
If a NodeID collision is detected, the solution would be to:
:edit: Go offline (see comment)
Clear nodeIdToAlias and aliasToNodeID (as a part of going offline), except potentially keep it somewhere for:
Make an improved increment method (replacing generate_node_id_str) that checks the alias map and skips any used NodeID (It would have to detect if there is an increment loop--rare, as described elsewhere in this issue--see id_range_prefix note below).
increment the NodeID. This could be done using my function: generate_node_id_str(increment=True). The increment option would cause it to be incremented rather than relying on a hash of IP Address + process ID.
Extremely rare except:
If user specifies a local NodeID manually rather than using generate_node_id_str.
More likely if fewer than last three octets at the end are generated (Using id_range_prefix with more than 3 octets).
If there is a rollover of generate_node_id_str due to many calls over time and never closing the program, especially if there is a large number of virtual nodes, and/or they are deleted and re-created multiple times before closing the program.
This is would cause #92 to recur (both nodes keep trying to redo the reservation process forever, causing the openlcb network stack to become unusable).
If a NodeID collision is detected, the solution would be to:
nodeIdToAliasandaliasToNodeID(as a part of going offline), except potentially keep it somewhere for:generate_node_id_str) that checks the alias map and skips any used NodeID (It would have to detect if there is an increment loop--rare, as described elsewhere in this issue--seeid_range_prefixnote below).generate_node_id_str(increment=True). Theincrementoption would cause it to be incremented rather than relying on a hash of IP Address + process ID.Extremely rare except:
generate_node_id_str.id_range_prefixwith more than 3 octets).generate_node_id_strdue to many calls over time and never closing the program, especially if there is a large number of virtual nodes, and/or they are deleted and re-created multiple times before closing the program.Related issues: