From 9e66cc1fc7934f09ba600ff73ddc09ff4c729f4d Mon Sep 17 00:00:00 2001 From: Yue Gao Date: Tue, 28 Apr 2026 13:07:00 -0700 Subject: [PATCH] Fix race condition causing syncd crash Signed-off-by: Yue Gao --- vslib/vpp/vppxlate/SaiVppXlate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vslib/vpp/vppxlate/SaiVppXlate.c b/vslib/vpp/vppxlate/SaiVppXlate.c index 0c6d2eee92..ae0182e891 100644 --- a/vslib/vpp/vppxlate/SaiVppXlate.c +++ b/vslib/vpp/vppxlate/SaiVppXlate.c @@ -1690,6 +1690,12 @@ int init_vpp_client() } dump_interface_table(vam); + /* Initialize the event queue before enabling any VPP event source, + * otherwise an early sw_interface_event from VPP can be dispatched + * to vl_api_sw_interface_event_t_handler -> vpp_ev_enqueue while + * vpp_evq_p is still NULL, causing a SIGSEGV. */ + vpp_evq_init(); + vpp_acl_counters_enable_disable(true); /* Enable LACP punt/xc in linux-cp */ @@ -1712,7 +1718,6 @@ int init_vpp_client() /* Enable BFD multihop support in VPP */ vpp_bfd_udp_enable_multihop(); - vpp_evq_init(); vpp_client_init = 1; return 0; } else {