networkservicemesh / sdk-kernel

Apache License 2.0
6 stars 17 forks source link

Infinite loop using Policy routes #628

Open LionelJouin opened 9 months ago

LionelJouin commented 9 months ago

I observed an infinite loop generating these logs while using policy routes:

2023-11-14T13:35:52.430492551Z stderr F Nov 14 13:35:52.430 [DEBU] [id:8467b2f1-b369-4877-a4c1-7d0a0239cfa1] [netlink:getFreeTableID] [tableID:4] [type:networkService] (22.1132689)                        completed
2023-11-14T13:35:52.430495728Z stderr F Nov 14 13:35:52.430 [DEBU] [id:8467b2f1-b369-4877-a4c1-7d0a0239cfa1] [ConnID:dd62cc20-4a40-4b30-959f-893e6b82cbdd] [nsrtid:{NS(4:4026535987) 4}] [type:networkService] (22.1132690)                        storedTableID

The loop is from here: https://github.com/networkservicemesh/sdk-kernel/blob/v1.11.0/pkg/kernel/networkservice/connectioncontextkernel/ipcontext/iprule/common.go#L93

I have no easy way to reproduce it, but when I could, this patch was not applied: https://github.com/networkservicemesh/sdk-kernel/pull/627

LionelJouin commented 9 months ago

This will solve the problem if delRule fails: https://github.com/networkservicemesh/sdk-kernel/pull/629, but the entry would still exist in nsRTableNextIDToConnID, so other problems could still exist around this problem.

NikitaSkrynnik commented 9 months ago

Hello @LionelJouin

Could you please clarify: Do you want to fix this problem yourself?