RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.86k stars 1.97k forks source link

gnrc_ipv6_nib: Neighbor Solicitation ping-pong #18164

Open benpicco opened 2 years ago

benpicco commented 2 years ago

Description

When debugging rapidly declining network performance, I noticed something weird: Two nodes would ping-pong neighbor solicitations to each other on the DOSE bus, life-locking the system:

image

Steps to reproduce the issue

To be determined…

Expected results

Nodes should answer to a neighbor solicitation with a neighbor advertisement, not another neighbor solicitation.

Actual results

NS-ping-pong.pcapng.gz

This was predated by one node seemingly ignoring the NAs before, it would keep re-sending NS: NS-weirdness.pcapng.gz

2022-06-02 18:28:01,432 - INFO # > nib neigh
2022-06-02 18:28:01,432 - INFO # 
2022-06-02 18:28:01,434 - INFO # fe80::18cf:efff:fe0d:9a97 dev #4 lladdr 1A:CF:EF:0D:9A:97  STALE
2022-06-02 18:28:01,435 - INFO # fe80::acde:b5ff:fe69:1703 dev #4 lladdr AE:DE:B5:69:17:03 router UNREACHABLE

2022-06-02 18:30:35,842 - INFO # > nib route
2022-06-02 18:30:35,842 - INFO # 
2022-06-02 18:30:35,843 - INFO # fd11:e000::/19 dev #4
2022-06-02 18:30:35,844 - INFO # default via fe80::acde:b5ff:fe69:1703 dev #4

2022-06-02 18:30:44,002 - INFO # > nib prefix
2022-06-02 18:30:44,002 - INFO # 
2022-06-02 18:30:44,004 - INFO # fd11:e000::/19 dev #4 

2022-06-02 18:30:53,611 - INFO # > ifconfig
2022-06-02 18:30:53,612 - INFO # 
2022-06-02 18:30:53,657 - INFO # Iface  4  HWaddr: 66:F6:D6:18:12:9A 
2022-06-02 18:30:53,658 - INFO #           L2-PDU:1500  MTU:1500  HL:64  Source address length: 6
2022-06-02 18:30:53,658 - INFO #           Link type: wired
2022-06-02 18:30:53,660 - INFO #           inet6 addr: fe80::64f6:d6ff:fe18:129a  scope: link  VAL
2022-06-02 18:30:53,661 - INFO #           inet6 addr: fd11:e000::64f6:d6ff:fe18:129a  scope: global  VAL
2022-06-02 18:30:53,662 - INFO #           inet6 group: ff02::1
2022-06-02 18:30:53,663 - INFO #           inet6 group: ff02::1:ff18:129a

Versions

RIOT b94dd60978

miri64 commented 2 years ago

Sure they are ping-ponging and not just sending them interlaced? If yes, a good starting point would be the neighbor solicitation handler _nbr_sol_handle and check how the NS is replied to with with an NS.

miri64 commented 2 years ago

Sure they are ping-ponging and not just sending them interlaced?

If they are just interlaced: Could it be, that the network device needs the interface to join the corresponding solicited nodes multicast address and if so, did that happen?