Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vxlan example - segfault #320

Open
fedy85 opened this issue Oct 13, 2021 · 3 comments
Open

vxlan example - segfault #320

fedy85 opened this issue Oct 13, 2021 · 3 comments

Comments

@fedy85
Copy link

fedy85 commented Oct 13, 2021

Dear,

I always get Segmentation fault when I run your xvlan example.
I use Ubuntu 18.04.6 LTS with 4.15.0-159-generic kernel.

dmesg says

[ 5368.166617] igb 0000:0b:00.2: removed PHC on eth4
[ 5368.751405] igb 0000:0b:00.3: removed PHC on eth5
[ 5390.345730] show_signal_msg: 5 callbacks suppressed
[ 5390.345738] lcore-slave-1[2265]: segfault at 34 ip 000055cc7e435e68 sp 00007f0c14e407f0 error 6 in MoonGen[55cc7e33a000+3ea000]

when I run

../build/MoonGen ./vxlan-example.lua 0 1 1 1
[INFO] Initializing DPDK. This will take a few seconds...
EAL: Detected 8 lcore(s)
EAL: Probing VFIO support...
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL: probe driver: 8086:15ac net_ixgbe
EAL: PCI device 0000:04:00.1 on NUMA socket 0
EAL: probe driver: 8086:15ac net_ixgbe
EAL: PCI device 0000:07:00.0 on NUMA socket 0
EAL: probe driver: 8086:1533 net_e1000_igb
EAL: PCI device 0000:08:00.0 on NUMA socket 0
EAL: probe driver: 8086:1533 net_e1000_igb
EAL: PCI device 0000:0b:00.0 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:0b:00.1 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:0b:00.2 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:0b:00.3 on NUMA socket 0
EAL: probe driver: 8086:1521 net_e1000_igb
[INFO] Found 2 usable devices:
Device 0: 0C:C4:7A:97:EC:0A (Intel Corporation I350 Gigabit Network Connection)
Device 1: 0C:C4:7A:97:EC:0B (Intel Corporation I350 Gigabit Network Connection)
[INFO] Device 0 (0C:C4:7A:97:EC:0A) is up: 1000 MBit/s
[WARN] Per-queue rate limit is not supported on this device, setting per-device rate limit to 0 Mbit/s instead (note: this may fail as well if the NIC doesn't support any rate limiting).
[WARN] global rate limiting is not supported by the hardware or driver
[INFO] Device 1 (0C:C4:7A:97:EC:0B) is up: 1000 MBit/s
[WARN] dpdk.launchLua() is deprecated, use moongen.startTask() instead.
[WARN] dpdk.waitForSlaves() is deprecated, use moongen.waitForTasks() instead.
[INFO] Starting vtep decapsulation task
[WARN] dpdk.running() is deprecated, use moongen.running() instead.
Segmentation fault (core dumped)

Do you have an idea what could be wrong ?

@fedy85
Copy link
Author

fedy85 commented Oct 13, 2021

have figured out that it is caused by the

 txBufs:allocN(decPacketLen, 0)

in decapsulateSlave while loop. first time it goes OK but second round I get segfault

@emmericp emmericp reopened this Oct 18, 2021
@emmericp
Copy link
Owner

@scholzd I believe this is your example, can you please take a look?

@fedy85
Copy link
Author

fedy85 commented Oct 18, 2021

@scholzd I believe this is your example, can you please take a look?

I found kind of a solution, not sure if it is really correct.

  • commented out mentioned "txBufs:allocN(decPacketLen, 0)"
  • added "txBufs:alloc(rx)" in the for cycle withing the while mg.running() loop

Seems to be working now and no memory leaks seen.

Let me have a question - the process makes a core 100% used even when there is no ingress L2 traffic, so no L3 VXLAN encapsulated packets are sent. I guess it is done by the while mg.running() loop. Is it possible to decrease the usage during the idle time when there is no L2 traffic ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants