Comments (4)
Can you please share the following details?
1- Your command line arguments.
2- Contents of mos.conf file.
3- Contents of simple_firewall.conf file.
4. Backtrace without gcc's "-O3" switch
5. Output of cat /proc/cpuinfo
6. The values of mctx->cpu
and num_cpus
.
Thanks!
The program crashes during initialisation which means that the start-up parameters are not correctly being set (which also means that I am missing some error handling in api.c as well). I will patch-up the code once I know more details.
from mos-networking-stack.
It is long but here it is:
1- Your command line arguments.
/home/dpdk/mOS-networking-stack/samples/simple_firewall# ./simple_firewall
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 0 on socket 0
EAL: Detected lcore 2 as core 1 on socket 0
EAL: Detected lcore 3 as core 1 on socket 0
EAL: Detected lcore 4 as core 2 on socket 0
EAL: Detected lcore 5 as core 2 on socket 0
EAL: Detected lcore 6 as core 3 on socket 0
EAL: Detected lcore 7 as core 3 on socket 0
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 8 lcore(s)
.....................CUT.........
===== MOS configuration =====
| num_cores: 8 <================ 8 logical cores
| nb_mem_channels: 4
| max_concurrency: 100000
| rmem_size: 8192
| wmem_size: 8192
| tcp_tw_interval: 0
| tcp_timeout: 30000
| multiprocess: false
| mos_log: logs/
| stat_print: dpdk0 dpdk1
| forward: forward
...........................CUT...............
+===== NIC Forwarding table configuration (1 entries) =====
| NIC Forwarding Entry: dpdk0 <---> dpdk1 |
| NIC Forwarding Index Table: |
| 0 --> 1 |
| 1 --> 0 |
| 2 --> -1 |
| 3 --> -1 |
| 4 --> -1 |
| 5 --> -1 |
| 6 --> -1 |
| 7 --> -1 |
| 8 --> -1 |
| 9 --> -1 |
| 10 --> -1 |
| 11 --> -1 |
| 12 --> -1 |
| 13 --> -1 |
| 14 --> -1 |
| 15 --> -1 |
Configuration updated by mtcp_setconf().
Segmentation fault (core dumped)
I ran gdb ./simple_firewall to get the backtrace.
2- Contents of mos.conf file.
root@r210:/home/dpdk/mOS-networking-stack/samples/simple_firewall# cat config/mos.conf
############### MOS configuration file ###############
#######################
MOS-RELATED OPTIONS
#######################
mos {
forward = 1
#######################
##### I/O OPTIONS #####
#######################
# number of memory channels per socket [mandatory for DPDK]
nb_mem_channels = 4
# devices used for MOS applications [mandatory]
netdev {
dpdk0 0x00FF
dpdk1 0x00FF
}
#######################
### LOGGING OPTIONS ###
#######################
# NICs to print network statistics per second
# if enabled, mTCP will print xx Gbps and xx pps for RX and TX
stat_print = dpdk0 dpdk1
# A directory contains MOS system log files
mos_log = logs/
########################
## NETWORK PARAMETERS ##
########################
# This to configure static arp table
# (Destination IP address) (Destination MAC address)
arp_table {
}
# This is to configure static routing table
# (Destination address)/(Prefix) (Device name)
route_table {
}
# This is to configure static bump-in-the-wire NIC forwarding table
# DEVNIC_A DEVNIC_B ## (e.g. dpdk0 dpdk1)
nic_forward_table {
dpdk0 dpdk1
}
########################
### ADVANCED OPTIONS ###
########################
# if required, uncomment the following options and change them
# maximum concurrency per core [optional / default : 100000]
# (MOS-specific parameter for preallocation)
# max_concurrency = 100000
# disable the ring buffer [optional / default : 0]
# use disabled buffered managment only for standalone monitors.
# end host applications always need recv buffers for TCP!
# no_ring_buffers = 1
# receive buffer size of sockets [optional / default : 8192]
# rmem_size = 8192
# send buffer size of sockets [optional / default : 8192]
# wmem_size = 8192
# tcp timewait seconds [optional / default : 0]
# tcp_tw_interval = 30
# tcp timeout seconds [optional / default : 30]
# (set tcp_timeout = -1 to disable timeout checking)
# tcp_timeout = 30
}
3- Contents of simple_firewall.conf file.
root@r210:/home/dpdk/mOS-networking-stack/samples/simple_firewall# cat config/simple_firewall.conf
Simple firewall rules
#(act) (src) (dst) (port)
#ACCEPT 10.0.0.7/24 10.0.0.8/24 dport:80
DROP 10.0.0.0/24 10.0.0.0/24 dport:80
ACCEPT 10.0.1.7 10.0.1.9 sport:1024
ACCEPT 10.0.2.7 10.0.2.9
ACCEPT 10.0.3.0/24 10.0.3.0/24
4. Backtrace without gcc's "-O3" switch
Program received signal SIGSEGV, Segmentation fault.
0x00000000004403ff in GetMTCPManager (mctx=0x7fffffffd290) at api.c:64
64 if (g_mtcp[mctx->cpu]->ctx->done || g_mtcp[mctx->cpu]->ctx->exit) {
(gdb) bt
#0 0x00000000004403ff in GetMTCPManager (mctx=0x7fffffffd290) at api.c:64
#1 0x00000000004733c6 in mtcp_define_event (event=1, filter=0x43410c , arg=0x0) at scalable_event.c:718
#2 0x00000000004345d2 in main (argc=1, argv=0x7fffffffe6c8) at simple_firewall.c:475
5. Output of cat /proc/cpuinfo
root@r210:/home/dpdk/mOS-networking-stack/samples/simple_firewall# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
microcode : 0x14
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 6400.26
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
6. The values of mctx->cpu and num_cpus.
(gdb) p mctx->cpu
$1 = 0
(gdb) p num_cpus
$2 = 8
from mos-networking-stack.
Hi Vincent,
I added some error checks that will hopefully fix the crash that you are seeing.
from mos-networking-stack.
yes it fixed the crash.
from mos-networking-stack.
Related Issues (20)
- Error compile dpdk HOT 19
- compile example error HOT 5
- mOS Configuration HOT 4
- i40e/XL710 not receiving packets HOT 4
- segfault when using only some interfaces HOT 1
- insmod: ERROR: could not insert module drivers/dpdk-16.11/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko: Unknown symbol in module HOT 6
- [nat] Packets not translated when using 3 cores HOT 10
- Mac address prevent change? HOT 2
- Can mOS be used in conjunction with IPS, not IDS? HOT 1
- mOS with mlx5 HOT 7
- Can mOS API run on a Raspberry Pi B+? HOT 10
- DBG_OPT flag cause compiling error HOT 1
- how to use vhost-user in mOS HOT 3
- Performance problem HOT 6
- Example for mtcp_peek?
- insmod: ERROR: could not insert module drivers/dpdk-16.04/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko: Invalid module format HOT 1
- QOS implementation support with mOS HOT 4
- Problem starting midstat: EAL: Error - exiting with code: 1 Cause: Cannot init mbuf pool HOT 7
- Issue with running sample application using > 2 cores. HOT 3
- Problems with more than 23 flows. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mos-networking-stack.