-
Bug
-
Resolution: Done
-
Medium
-
None
VPP crashes or exit abnormally at initialization time. On debugging, it's has been found that TLS (Thread local storage) variables are getting corrupted. Few per thread variable/s lost its assigned value and return invalid values on read.
Following are the observation:
- Its has been seen when VPP is running with DPDK DPAA /DPAA2 drivers. The catch is that NXP dpaa2/dpaa drivers uses its own set of "__thread" data holders.
- This happens only when VPP uses DPDK as dynamic plugin. If we link DPDK plugin statically with VPP, No issue is observed without any code change.
- Noted that VPP and DPDK EAL layes already uses their own per thread variables.
Following snap shot shows that, at DPDK eal layer, per thread _socket_id is set to 0 but when read retruns 1. Also, the 2 threads (main + 1 worker) have been launched on different Lcore but CPU id (another per thread variable) return 0 always.
Moreover address assigned to CPU 0 __socket_id is not 48 bit VA.
Logs:
vpp[2904]: dpdk: EAL init args: -c 3 -n 1 --huge-dir /mnt/hugepages --no-pci --master-lcore 0 --socket-mem 512
rte_thread_set_affinity: ----------> RTE_PER_LCORE(_socket_id)[0xd626c02] set to 0 @ CPU 0
rte_thread_set_affinity: ----------> RTE_PER_LCORE(_socket_id)[0xffff40000c02] set to 0 @ CPU 0
rte_socket_id: RTE_PER_LCORE(_socket_id)[0xd626c02] 1
error allocating rte services array
EAL: FATAL: rte_service_init() failed