ansyun / dpdk-ans

ANS(Accelerated Network Stack) on DPDK, DPDK native TCP/IP stack.
https://ansyun.com
BSD 3-Clause "New" or "Revised" License
1.15k stars 322 forks source link

Segmentation fault from anssock_ring_init() #110

Closed jihwanseo closed 4 years ago

jihwanseo commented 5 years ago

Hi. There is initialize error (anssock_ring_init) when i try to run my sample application. It is hard to analyze this error issue since i can't see open source codes. Do you have some advice to give me?

<# ./ans -c 0x2 --base-virtaddr=0x2aaa2aa0000 -- -p 0x1 --config="(0,0,1)" EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: PCI device 0000:03:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1563 net_ixgbe EAL: PCI device 0000:03:00.1 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1563 net_ixgbe

Start to Init port port 0:
port name net_ixgbe:
max_rx_queues 128: max_tx_queues:64 rx_offload_capa 0x12e5f: tx_offload_capa:0x80bf Creating queues: rx queue number=1 tx queue number=1... MAC Address:00:0A:CD:30:CC:BB Deault-- tx pthresh:32, tx hthresh:0, tx wthresh:0, tx offloads:0x0 lcore id:1, tx queue id:0, socket id:0 Conf-- tx pthresh:32, tx hthresh:0, tx wthresh:0, tx offloads:0x2e

Allocated mbuf pool on socket 0, mbuf number: 32768

Initializing rx queues on lcore 1 ... Default-- rx pthresh:8, rx hthresh:8, rx wthresh:0, rx offloads:0x0
Conf-- rx pthresh:8, rx hthresh:8, rx wthresh:0, rx offloads:0xf
port id:0, rx queue id: 0, socket id:0

rx core: 1, worker core: 0, sockets number:1, lcore number:1 start to init ans USER8: LCORE[1] lcore number 1 USER1: rte_ip_frag_table_create: allocated of 25165952 bytes at socket 0 add veth0 device, kni id 0 USER8: LCORE[1] Interface veth0 if_capabilities: 0x80bf add IP a000002 on device veth0 show all IPs:

veth0: mtu 1500 link/ether 00:0a:cd:30:cc:bb inet addr: 10.0.0.2/24

add static route

ANS IP routing table 10.0.0.0/24 via dev veth0 src 10.0.0.2 10.10.0.0/24 via 10.0.0.5 dev veth0

Checking link status ...............................................done Port 0 Link Up - speed 10000 Mbps - full-duplex USER8: main loop on lcore 1 USER8: -- lcoreid=1 portid=0 rxqueueid=0 hz: 3392310344

===============================================================

[Thread 0x7fffea8de700 (LWP 22309) exited] EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes [New Thread 0x7fffe9ecb700 (LWP 22310)] EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_22307_257671fe6124f [New Thread 0x7fffe96ca700 (LWP 22311)] EAL: Probing VFIO support... USER8: LCORE[-1] anssock any lcore id 0xffffffff Thread 1 "peerconnection_" received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x000055555716f6e8 in anssock_ring_init () #2 0x000055555716667e in anssock_init ()
bluenet13 commented 5 years ago

Something wrong with your makefile. Refor the makefile in example directory.

jihwanseo commented 5 years ago

OK. I'll check the makefile in the directory~ thanks~!