When executing VPP - built with the option below - I do get a nice print of all the misaligned memory being accessed.
Among many, I can also see the one causing the SEGFAULT: /home/mvarlese/repo/vpp/build- data/../src/vnet/mfib/mfib_entry.c:405:27: runtime error: member access within misaligned address 0x7f7703c3cd4c for type 'struct mfib_entry_t', which requires 64 byte alignment 0x7f7703c3cd4c: note: pointer points here 01 00 00 00 80 ee c9 03 77 7f 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ /home/mvarlese/repo/vpp/build- data/../src/vnet/mfib/mfib_entry.c:406:31: runtime error: member access within misaligned address 0x7f7703c3cd4c for type 'struct mfib_entry_t', which requires 64 byte alignment 0x7f7703c3cd4c: note: pointer points here 01 00 00 00 80 ee c9 03 77 7f 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Cheers, Marco On Tue, 2017-08-29 at 13:29 +0200, Marco Varlese wrote: > Dave & all, > > I was suggested by some compiler guys to turn on the gcc option > -fsanitize=undefined since the error (and the actual way I used to > fix it) might be caused by unaligned memory. > > I did try that in my local repo and a lot of errors show up for > src/vppinfra/memcpy_sse3.h regarding a "load/store of misaligned > address". > > I wonder if this is something we can address? > > I did submit a fix to gerrit but - as suggested - it may only be a > way > to workaround the underlying rootcause. > > > Cheers, > Marco > > On Tue, 2017-08-29 at 08:50 +0200, Marco Varlese wrote: > > Hi Dave, > > > > On Mon, 2017-08-28 at 14:12 -0400, Dave Wallace wrote: > > > Marco, > > > > > > Thanks for the follow up. Could you please file a Jira for this > > > issue (https://jira.fd.io/secure/RapidBoard.jspa?rapidView=20&pro > > > je > > > ctKey=VPP) and/or submit a patch if you find a workaround? > > > > Sure, I filed the bug and the link is https://jira.fd.io/browse/VPP > > -9 > > 64 > > I keep digging and hopefully find the solution soon! :) > > > > > Thanks, > > > -daw- > > > > Cheers, > > Marco > > > > > On 08/28/2017 12:22 PM, Marco Varlese wrote: > > > > After long digging I managed to find the issue... > > > > > > > > The problem happens when building VPP using gcc-7 compiler but > > > > it > > > > doesn't come up when building it with gcc-6. > > > > > > > > I will keep digging into this but I hope it might be of help to > > > > you > > > > folks too... > > > > > > > > > > > > Cheers, > > > > Marco > > > > > > > > On Mon, 2017-08-28 at 16:05 +0200, Marco Varlese wrote: > > > > > And a even more complete BT with sources below: > > > > > > > > > > [Thread debugging using libthread_db enabled] > > > > > Using host libthread_db library "/lib64/libthread_db.so.1". > > > > > vlib_plugin_early_init:356: plugin path > > > > > /usr/lib64/vpp_plugins > > > > > load_one_plugin:184: Loaded plugin: acl_plugin.so (Access > > > > > Control > > > > > Lists) > > > > > load_one_plugin:184: Loaded plugin: dpdk_plugin.so (Data > > > > > Plane > > > > > Development Kit (DPDK)) > > > > > load_one_plugin:184: Loaded plugin: flowprobe_plugin.so (Flow > > > > > per > > > > > Packet) > > > > > load_one_plugin:184: Loaded plugin: gtpu_plugin.so (GTPv1-U) > > > > > load_one_plugin:184: Loaded plugin: ila_plugin.so > > > > > (Identifier- > > > > > locator > > > > > addressing for IPv6) > > > > > load_one_plugin:184: Loaded plugin: ioam_plugin.so (Inbound > > > > > OAM) > > > > > load_one_plugin:114: Plugin disabled (default): > > > > > ixge_plugin.so > > > > > load_one_plugin:184: Loaded plugin: lb_plugin.so (Load > > > > > Balancer) > > > > > load_one_plugin:184: Loaded plugin: libsixrd_plugin.so (IPv6 > > > > > Rapid > > > > > Deployment on IPv4 Infrastructure (RFC5969)) > > > > > load_one_plugin:184: Loaded plugin: memif_plugin.so (Packet > > > > > Memory > > > > > Interface (experimetal)) > > > > > load_one_plugin:184: Loaded plugin: nat_plugin.so (Network > > > > > Address > > > > > Translation) > > > > > load_one_plugin:184: Loaded plugin: pppoe_plugin.so (PPPoE) > > > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > mfib_entry_alloc (mfib_entry_index=<synthetic pointer>, > > > > > prefix=0x7fffb60f0ce0, fib_index=0) at /usr/src/debug/vpp- > > > > > 17.10/src/vnet/mfib/mfib_entry.c:407 > > > > > 407 mfib_entry->mfe_prefix = *prefix; > > > > > Missing separate debuginfos, use: zypper install libdpdk- > > > > > 17_08- > > > > > 0- > > > > > debuginfo-17.08-82.1.x86_64 libnuma1-debuginfo-2.0.9- > > > > > 10.2.x86_64 > > > > > libopenssl1_0_0-debuginfo-1.0.2j-6.3.1.x86_64 libz1- > > > > > debuginfo- > > > > > 1.2.8- > > > > > 10.1.x86_64 vpp-plugins-debuginfo-17.10-14.2.x86_64 > > > > > > > > > > (gdb) bt > > > > > #0 mfib_entry_alloc (mfib_entry_index=<synthetic pointer>, > > > > > prefix=0x7fffb60f0ce0, fib_index=0) at /usr/src/debug/vpp- > > > > > 17.10/src/vnet/mfib/mfib_entry.c:407 > > > > > #1 mfib_entry_create (fib_index=fib_index@entry=0, > > > > > source=sour > > > > > ce@ent > > > > > ry > > > > > =MFIB_SOURCE_DEFAULT_ROUTE, prefix=prefix@entry=0x7fffb60f0ce > > > > > 0, > > > > > rpf_id= > > > > > rpf_id@entry=0, entry_flags=entry_flags@entry=MFIB_ENTRY_FLAG > > > > > _D > > > > > ROP) > > > > > at /usr/src/debug/vpp- > > > > > 17.10/src/vnet/mfib/mfib_entry.c:719 > > > > > #2 0x00007ffff765cdc7 in mfib_table_entry_update > > > > > (fib_index=0, > > > > > prefix= > > > > > prefix@entry=0x7fffb60f0ce0, source=source@entry=MFIB_SOURCE_ > > > > > DE > > > > > FAULT_ > > > > > RO > > > > > UTE, rpf_id=rpf_id@entry=0, > > > > > entry_flags=entry_flags@entry=MFIB_ENTRY_FLAG_DROP) at > > > > > /usr/src/debug/vpp-17.10/src/vnet/mfib/mfib_table.c:184 > > > > > #3 0x00007ffff7656b85 in ip4_create_mfib_with_table_id > > > > > (table_id=0) > > > > > at > > > > > /usr/src/debug/vpp-17.10/src/vnet/mfib/ip4_mfib.c:72 > > > > > #4 ip4_mfib_table_find_or_create_and_lock (table_id=table_id > > > > > @e > > > > > ntry=0 > > > > > ) > > > > > at /usr/src/debug/vpp-17.10/src/vnet/mfib/ip4_mfib.c:122 > > > > > #5 0x00007ffff765d257 in mfib_table_find_or_create_and_lock > > > > > (proto=pro > > > > > to@entry=FIB_PROTOCOL_IP4, table_id=table_id@entry=0) at > > > > > /usr/src/debug/vpp-17.10/src/vnet/mfib/mfib_table.c:435 > > > > > #6 0x00007ffff7338b14 in ip4_lookup_init (vm=vm@entry=0x7fff > > > > > f7 > > > > > bb62e0 > > > > > <vlib_global_main>) at /usr/src/debug/vpp- > > > > > 17.10/src/vnet/ip/ip4_forward.c:1202 > > > > > #7 0x00007ffff7273bff in vnet_main_init (vm=vm@entry=0x7ffff > > > > > 7b > > > > > b62e0 > > > > > <vlib_global_main>) at /usr/src/debug/vpp- > > > > > 17.10/src/vnet/misc.c:92 > > > > > #8 0x00007ffff73a4507 in ip_main_init (vm=0x7ffff7bb62e0 > > > > > <vlib_global_main>) at /usr/src/debug/vpp- > > > > > 17.10/src/vnet/ip/ip_init.c:104 > > > > > #9 0x00007fffb35d8572 in ?? () from > > > > > /usr/lib64/vpp_plugins/ioam_plugin.so > > > > > #10 0x00007ffff796128d in vlib_call_init_exit_functions > > > > > (vm=0x7ffff7bb62e0 <vlib_global_main>, head=<optimized out>, > > > > > call_once= > > > > > call_once@entry=1) at /usr/src/debug/vpp- > > > > > 17.10/src/vlib/init.c:57 > > > > > #11 0x00007ffff79612d3 in vlib_call_all_init_functions > > > > > (vm=<optimized > > > > > out>) at /usr/src/debug/vpp-17.10/src/vlib/init.c:75 > > > > > #12 0x00007ffff79657a5 in vlib_main (vm=<optimized out>, vm@e > > > > > nt > > > > > ry=0x7 > > > > > ff > > > > > ff7bb62e0 <vlib_global_main>, input=input@entry=0x7fffb60f0fa > > > > > 0) > > > > > at > > > > > /usr/src/debug/vpp-17.10/src/vlib/main.c:1754 > > > > > #13 0x00007ffff799d3c6 in thread0 (arg=140737349640928) at > > > > > /usr/src/debug/vpp-17.10/src/vlib/unix/main.c:525 > > > > > #14 0x00007ffff6f7a250 in clib_calljmp () at > > > > > /usr/src/debug/vpp- > > > > > 17.10/src/vppinfra/longjmp.S:110 > > > > > #15 0x00007fffffffd100 in ?? () > > > > > #16 0x00007ffff799df54 in vlib_unix_main (argc=<optimized > > > > > out>, > > > > > argv=<optimized out>) at /usr/src/debug/vpp- > > > > > 17.10/src/vlib/unix/main.c:588 > > > > > #17 0x0000000000000000 in ?? () > > > > > > > > > > > > > > > > > > > > Regards, > > > > > Marco > > > > > > > > > > On Mon, 2017-08-28 at 15:41 +0200, Marco Varlese wrote: > > > > > > Apologies, I forgot to also provide some extra information: > > > > > > > > > > > > > Using DPDK 17.08. > > > > > > > A backtrace below: > > > > > > > > > > > > (gdb) bt > > > > > > #0 0x00007ffff765bced in mfib_entry_create () from > > > > > > /usr/lib64/libvnet.so.0 > > > > > > #1 0x00007ffff765cdc7 in mfib_table_entry_update () from > > > > > > /usr/lib64/libvnet.so.0 > > > > > > #2 0x00007ffff7656b85 in > > > > > > ip4_mfib_table_find_or_create_and_lock () > > > > > > from /usr/lib64/libvnet.so.0 > > > > > > #3 0x00007ffff765d257 in > > > > > > mfib_table_find_or_create_and_lock > > > > > > () > > > > > > from > > > > > > /usr/lib64/libvnet.so.0 > > > > > > #4 0x00007ffff7338b14 in ip4_lookup_init () from > > > > > > /usr/lib64/libvnet.so.0 > > > > > > #5 0x00007ffff7273bff in vnet_main_init () from > > > > > > /usr/lib64/libvnet.so.0 > > > > > > #6 0x00007ffff73a4507 in ip_main_init () from > > > > > > /usr/lib64/libvnet.so.0 > > > > > > #7 0x00007fffb35d8572 in ?? () from > > > > > > /usr/lib64/vpp_plugins/ioam_plugin.so > > > > > > #8 0x00007ffff796128d in vlib_call_init_exit_functions () > > > > > > from > > > > > > /usr/lib64/libvlib.so.0 > > > > > > #9 0x00007ffff79657a5 in vlib_main () from > > > > > > /usr/lib64/libvlib.so.0 > > > > > > #10 0x00007ffff799d3c6 in ?? () from > > > > > > /usr/lib64/libvlib.so.0 > > > > > > #11 0x00007ffff6f7a250 in clib_calljmp () from > > > > > > /usr/lib64/libvppinfra.so.0 > > > > > > #12 0x00007fffffffd0f0 in ?? () > > > > > > #13 0x00007ffff799df54 in vlib_unix_main () from > > > > > > /usr/lib64/libvlib.so.0 > > > > > > #14 0x0000000000000000 in ?? () > > > > > > > > > > > > > > > > > > Cheers, > > > > > > Marco > > > > > > > > > > > > On Mon, 2017-08-28 at 15:10 +0200, Marco Varlese wrote: > > > > > > > Hi, > > > > > > > > > > > > > > I'm running the tip of master branch and I get a > > > > > > > segmentation > > > > > > > fault > > > > > > > when launcing "vpp -c /etc/vpp/startup.conf" > > > > > > > > > > > > > > My startup.conf is very simple, I don't even map dpdk > > > > > > > interfaces, > > > > > > > etc. > > > > > > > since I am using in a virt environment. > > > > > > > > > > > > > > I wonder if by any chance a new setting/parameter was > > > > > > > introduced > > > > > > > which > > > > > > > I am missing hence having such an issue? > > > > > > > > > > > > > > The stacktrace of the execution is below. > > > > > > > > > > > > > > load_one_plugin:184: Loaded plugin: dpdk_plugin.so (Data > > > > > > > Plane > > > > > > > Development Kit (DPDK)) > > > > > > > load_one_plugin:184: Loaded plugin: flowprobe_plugin.so > > > > > > > (Flow per > > > > > > > Packet) > > > > > > > load_one_plugin:184: Loaded plugin: gtpu_plugin.so > > > > > > > (GTPv1- > > > > > > > U) > > > > > > > load_one_plugin:184: Loaded plugin: ila_plugin.so > > > > > > > (Identifier- > > > > > > > locator > > > > > > > addressing for IPv6) > > > > > > > load_one_plugin:184: Loaded plugin: ioam_plugin.so > > > > > > > (Inbound > > > > > > > OAM) > > > > > > > load_one_plugin:114: Plugin disabled (default): > > > > > > > ixge_plugin.so > > > > > > > load_one_plugin:184: Loaded plugin: lb_plugin.so (Load > > > > > > > Balancer) > > > > > > > load_one_plugin:184: Loaded plugin: libsixrd_plugin.so > > > > > > > (IPv6 > > > > > > > Rapid > > > > > > > Deployment on IPv4 Infrastructure (RFC5969)) > > > > > > > load_one_plugin:184: Loaded plugin: memif_plugin.so > > > > > > > (Packet > > > > > > > Memory > > > > > > > Interface (experimetal)) > > > > > > > load_one_plugin:184: Loaded plugin: nat_plugin.so > > > > > > > (Network > > > > > > > Address > > > > > > > Translation) > > > > > > > load_one_plugin:184: Loaded plugin: pppoe_plugin.so > > > > > > > (PPPoE) > > > > > > > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > > > mfib_entry_alloc (mfib_entry_index=<synthetic pointer>, > > > > > > > prefix=0x7f1219818ce0, fib_index=0) at > > > > > > > /usr/src/debug/vpp- > > > > > > > 17.10/src/vnet/mfib/mfib_entry.c:407 > > > > > > > 407 mfib_entry->mfe_prefix = *prefix; > > > > > > > (gdb) > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > Marco > > > > > > > > > > > > > > _______________________________________________ > > > > > > > vpp-dev mailing list > > > > > > > vpp-dev@lists.fd.io > > > > > > > https://lists.fd.io/mailman/listinfo/vpp-dev > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > vpp-dev mailing list > > > > > > vpp-dev@lists.fd.io > > > > > > https://lists.fd.io/mailman/listinfo/vpp-dev > > > > > > > > > > > > > > > > _______________________________________________ > > > > > vpp-dev mailing list > > > > > vpp-dev@lists.fd.io > > > > > https://lists.fd.io/mailman/listinfo/vpp-dev > > > > > > > > > > > > > _______________________________________________ > > > > vpp-dev mailing list > > > > vpp-dev@lists.fd.io > > > > https://lists.fd.io/mailman/listinfo/vpp-dev > > > > > > > > > > _______________________________________________ > > vpp-dev mailing list > > vpp-dev@lists.fd.io > > https://lists.fd.io/mailman/listinfo/vpp-dev _______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev