You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

同一主机双容器运行l2fwd触发Segmentation fault故障求助

容器中运行DPDK l2fwd触发Segmentation Fault问题求助

环境信息

  • 主机:启用4个SR-IOV VF,驱动为vfio-pci
  • container1启动命令:docker run --privileged --name="vhost_user" -v /dev:/dev -v /tmp:/tmp -itd centos-cu:v3
  • container2启动命令:docker run --privileged --name="virtio_user" -v /dev:/dev -v /tmp:/tmp -itd centos-cu:v3

问题现象

在同一主机的两个容器中尝试运行l2fwd:启动container1并成功运行l2fwd后,启动container2运行l2fwd时,两个容器均出现Segmentation fault(core dumped)错误。

运行日志

container1日志

container1:
#  ./l2fwd -l 2-3 -n 2 -w 0000:04:10.7 -w 0000:04:10.5 -- -p 0x3
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:04:10.5 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10ed net_ixgbe_vf
EAL:   using IOMMU type 1 (Type 1)
EAL: PCI device 0000:04:10.7 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10ed net_ixgbe_vf
MAC updating enabled
Lcore 2: RX port 0
Lcore 3: RX port 1
Initializing port 0... done: 
Port 0, MAC address: 02:09:C0:11:47:97

Initializing port 1... done: 
Port 1, MAC address: 02:09:C0:00:2C:47


Checking link statusdone
Port0 Link Up. Speed 10000 Mbps - full-duplex
Port1 Link Up. Speed 10000 Mbps - full-duplex
L2FWD: entering main loop on lcore 3
L2FWD:  -- lcoreid=3 portid=1
L2FWD: entering main loop on lcore 2
L2FWD:  -- lcoreid=2 portid=0

Port statistics ====================================
Statistics for port 0 ------------------------------
Packets sent:                        0
Packets received:                    0
Packets dropped:                     0
Statistics for port 1 ------------------------------
Packets sent:                        0
Packets received:                    5
Packets dropped:                     0
Aggregate statistics ===============================
Total packets sent:                  0
Total packets received:              5
Total packets dropped:               0
====================================================

Port statistics ====================================
Statistics for port 0 ------------------------------
Packets sent:                       23
Packets received:                   16
Packets dropped:                     0
Statistics for port 1 ------------------------------
Packets sent:                       16
Packets received:                   26
Packets dropped:                     0
Aggregate statistics ===============================
Total packets sent:                 39
Total packets received:             42
Total packets dropped:               0
====================================================

(start to run l2fwd in container2)
./run_l2fwd.sh: line 3:   116 Segmentation fault      (core dumped) ./l2fwd -l 2-3 -n 2 -w 0000:04:10.7 -w 0000:04:10.5 -- -p 0x3

container2日志

# /l2fwd -l 0-1 -n 2 -w 0000:04:10.3 -w 0000:04:10.1 -- -p 0x3
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:04:10.1 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10ed net_ixgbe_vf
EAL:   using IOMMU type 1 (Type 1)
EAL: PCI device 0000:04:10.3 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:10ed net_ixgbe_vf
MAC updating enabled
Lcore 0: RX port 0
Lcore 1: RX port 1
Initializing port 0... ./run_l2fwd.sh: line 3:    90 Segmentation fault      (core dumped) ./l2fwd -l 0-1 -n 2 -w 0000:04:10.3 -w 0000:04:10.1 -- -p 0x3

恳请遇到过此类问题的同行提供帮助,谢谢!

内容的提问来源于stack exchange,提问作者happy

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 21:46:06