With the VPP dataplane for PPPoE and a RADIUS rate limit, VPP can crash with SIGBUS in policer_input_node_fn_hsw when sessions end. VPP restarts and every session is dropped.
Seen in T9211 by a tester on a fresh rolling VM (VPP 25.10.0, FreeRADIUS, 2 real CPEs and about 1,700 emulated clients, about 1,000 sessions connecting within a minute):
- SIGBUS in policer_input_node_fn_hsw at 13:44:52 UTC, VPP restarted, all sessions dropped
- a second VPP restart at 14:41:22 UTC with no configuration change
I have not reproduced the crash. This is from reading the code, it is a likely cause and not confirmed.
vpppolicer_remove_limiter() in accel-ppp-ng (accel-pppd/session_hooks/vyos_vpp/vpppolicer.c) does not undo vpppolicer_install_limiter() in reverse order. Installing binds the input policer to the interface and then adds the policer-input node to the ip4-unicast, ip6-unicast, ip4-multicast and ip6-multicast feature arcs. Removing unbinds and deletes the input policer first and takes the node out of the arcs afterwards. In between, packets of the interface can still reach policer_input_node_fn while the policer it uses is gone.
Fix proposed by the tester and prepared as a branch: remove the policer-input features first, then unbind and delete the policer (the reverse of the install order). The output policer needs no change.
What is still open:
- The change is untested. The window is small and a few sessions are not enough to hit it, so it needs a test with many sessions that end at once while traffic flows.
- It is not known if the order alone is enough, or if deleting a policer while packets are in flight needs more.
Related: T9211 (found there), T9499 (the abort of accel-pppd when a VPP session ends, a different problem).