Billy,

Apologies, that was a convenience I did for the attendees of the devboot
course last year.

In the course notes I had the git checksum of the commit, but as Dave
points out, a bit stale.

I find a combo of "ldd" against the VPP binary you have built and
ultimately want to install and "ldconfig -p | grep" to be useful. Grep
against "vpp" and "vlib" tends to show what's hanging around and the diff
usually is defunct jetsam from prior packaging.

Be a little careful though as I don't believe vlib is unique to VPP/fdio

As the project evolves , so too packaging.... (I've felt your pain)

A "find" over /usr/include for headers is not a bad sanity check too


On Mar 27, 2017 6:52 AM, "Dave Barach (dbarach)" <dbar...@cisco.com> wrote:

Dear Billy,



Looks like a stale tree...



vm = vlib_mains[os_get_cpu_number ()] from within vpp_api_test was always a
mistake. I cleaned this up a while ago. Vpp_api_test was spuriously linked
against libvlib.so, leading to this very crash in vpp_api_test until I
cleaned up the set of libraries, etc.



Please update, “make distclean”, rebuild, and reinstall. If that doesn’t
fix it, please unicast me.



Thanks… Dave



*From:* vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] *On
Behalf Of *Billy McFall
*Sent:* Monday, March 27, 2017 9:37 AM
*To:* vpp-dev@lists.fd.io
*Subject:* [vpp-dev] VPP API Test Crash - Need help debugging



I have screwed up my system and need some help fixing. Long email because
of the traces, so quick summary up front.



I was playing with pluggins and had some notes from over the summer on
running the MacSwap pluggin. I downloaded the code via:

  git clone https://github.com/alagalah/macswap-plugin



The code did not compile initially because the pluggin registration code
changed from a function call to a MACRO. I fiddle with the code and got it
to compile and install. As soon as I fired up VPP it crashed. I did not
collect the output (sorry), but in the mean time I found the sample pluggin
on the Wiki and figured it was the better route anyway. So I deleted the
all macswap*.so files I could find under /usr/* and deleted my local
sandbox with the MAC Swap changes. Now when I run VPP, it crashes, even a
recent, clean sandbox. Builds and loads fine. But when I "show
interfaces", vpp_api_test crashes (see below).



Is there something in the pluggin registration that needs to be cleaned up
that I am missing? Running on Fedora 25. Recent builds on my CentOS system
work as expect, so this most likely has something to do with how I
installed and more likely how I deleted the MAC Swap pluggin on my laptop.



Any help would be greatly appreciated,

Billy McFall





The rest is logs on the crash:



START VPP FROM CLEAN SANDBOX:

----------------------------------------------------

Mar 27 09:11:40 localhost systemd: Starting Vector Packet Processing
Process...

Mar 27 09:11:40 localhost systemd: Started Vector Packet Processing Process.

Mar 27 09:11:40 localhost vpp: vlib_plugin_early_init:357: plugin path
/usr/lib/vpp_plugins/

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
acl_plugin.so

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
dpdk_plugin.so

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
flowperpkt_plugin.so

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
ila_plugin.so

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
ioam_plugin.so

Mar 27 09:11:40 localhost vpp: load_one_plugin:114: Plugin disabled:
ixge_plugin.so (default)

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
lb_plugin.so

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
libsixrd_plugin.so

Mar 27 09:11:40 localhost vpp: load_one_plugin:187: Loaded plugin:
snat_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/udp_ping_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/ioam_vxlan_gpe_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/acl_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/snat_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/ioam_trace_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/dpdk_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/ioam_pot_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/vxlan_gpe_ioam_export_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/flowperpkt_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/ioam_export_test_plugin.so

Mar 27 09:11:40 localhost vpp: 0: load_one_plugin:63: Loaded plugin:
/usr/lib/vpp_api_test_plugins/lb_test_plugin.so

Mar 27 09:11:40 localhost vpp: EAL: Detected 4 lcore(s)

Mar 27 09:11:40 localhost vpp: EAL: No free hugepages reported in
hugepages-1048576kB

Mar 27 09:11:40 localhost vpp: /usr/bin/vpp[31951]: dpdk_ipsec_process:241:
DPDK Cryptodev support is disabled, default to OpenSSL IPsec

Mar 27 09:11:40 localhost vpp: /usr/bin/vpp[31951]: dpdk_lib_init:557: DPDK
drivers found no ports...

Mar 27 09:11:40 localhost /usr/bin/vpp[31951]: dpdk_ipsec_process:241: DPDK
Cryptodev support is disabled, default to OpenSSL IPsec

Mar 27 09:11:40 localhost /usr/bin/vpp[31951]: dpdk_lib_init:557: DPDK
drivers found no ports...





RUN DEBUG CLI SESSION (WORKS FINE):

------------------------------------------------------------

$ telnet 0 5002

Trying 0.0.0.0...

Connected to 0.

Escape character is '^]'.

    _______    _        _   _____  ___

 __/ __/ _ \  (_)__    | | / / _ \/ _ \

 _/ _// // / / / _ \   | |/ / ___/ ___/

 /_/ /____(_)_/\___/   |___/_/  /_/



vpp# show interfaces

              Name               Idx       State          Counter
 Count

local0                            0        down

vpp#





RUN NON-DEBUG CLI SESSION (CRASH):

------------------------------------------------------------

$ vppctl

    _______    _        _   _____  ___

 __/ __/ _ \  (_)__    | | / / _ \/ _ \

 _/ _// // / / / _ \   | |/ / ___/ ___/

 /_/ /____(_)_/\___/   |___/_/  /_/



vpp#

vpp#

vpp#

vpp# show interfaces



vpp#





Mar 27 09:13:06 localhost kernel: vpp_api_test[32017]: segfault at 0 ip
00007f87648547f7 sp 00007ffcbaf9f6e0 error 4 in libvlibmemory.so.0.0.0[
7f8764851000+1c000]





GDB BACKTRACE:

-------------------------

$ gdb vpp_api_test /home/bmcfall/coredumps/core-vpp_api_test-11-0-0-32017-
1490620386

GNU gdb (GDB) Fedora 7.12.1-47.fc25

Copyright (C) 2017 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-redhat-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from vpp_api_test...Reading symbols from
/usr/lib/debug/usr/bin/vpp_api_test.debug...done.

done.

[New LWP 32017]

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib64/libthread_db.so.1".

Core was generated by `vpp_api_test'.

Program terminated with signal SIGSEGV, Segmentation fault.

#0  vlib_get_main () at /home/bmcfall/dev/2017_03_22_
VPP_Master/vpp/src/vlib/global_funcs.h:26

26         vm = vlib_mains[os_get_cpu_number ()];

Missing separate debuginfos, use: dnf debuginfo-install
openssl-libs-1.0.2j-3.fc25.x86_64

(gdb)

(gdb) bt

#0  vlib_get_main () at /home/bmcfall/dev/2017_03_22_
VPP_Master/vpp/src/vlib/global_funcs.h:26

#1  __vlib_cli_command_registration_cli_show_api_histogram_command ()

    at /home/bmcfall/dev/2017_03_22_VPP_Master/vpp/src/vlibmemory/
memory_vlib.c:727

#2  0x00007f8764f14a3a in call_init (l=<optimized out>, argc=argc@entry=1,
argv=argv@entry=0x7ffcbaf9f768, env=env@entry=0x7ffcbaf9f778)

    at dl-init.c:72

#3  0x00007f8764f14b4b in call_init (env=0x7ffcbaf9f778,
argv=0x7ffcbaf9f768, argc=1, l=<optimized out>) at dl-init.c:30

#4  _dl_init (main_map=0x7f876512b128, argc=1, argv=0x7ffcbaf9f768,
env=0x7ffcbaf9f778) at dl-init.c:120

#5  0x00007f8764f04d0a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2

#6  0x0000000000000001 in ?? ()

#7  0x00007ffcbafa07b6 in ?? ()

#8  0x0000000000000000 in ?? ()

(gdb)





-- 

*Billy McFall*
SDN Group
Office of Technology
*Red Hat*

_______________________________________________
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

Reply via email to