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

vpp generate callbak stack complied with asan which including ndpi libary. #643

Closed
nanfengnan1 opened this issue Oct 13, 2023 · 2 comments
Closed

Comments

@nanfengnan1
Copy link

prerequires:
vpp import include and lib file of the ndpi and the program may work out when don't start asan function .
compile steps:

make build VPP_EXTRA_CMAKE_ARGS=-DVPP_ENABLE_SANITIZE_ADDR=ON
gdb vpp and r -c vpp-startup.conf

questions:
it will be droped, when you execute second step op.

callback:
[root@localhost dpu]# gdb vpp
GNU gdb (GDB) Red Hat Enterprise Linux 8.2-16.el8
Copyright (C) 2018 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...done.
(gdb) r -c vpp-startup.conf
Starting program: /opt/dpu/build-root/install-vpp_debug-native/vpp/bin/vpp -c vpp-startup.conf
Missing separate debuginfos, use: yum debuginfo-install glibc-2.28-164.el8.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00000000004354a5 in __asan::FakeStack::AddrIsInFakeStack(unsigned long, unsigned long*, unsigned long*) ()
Missing separate debuginfos, use: yum debuginfo-install libgcc-8.5.0-4.el8_5.x86_64 libnl3-3.5.0-1.el8.x86_64 libstdc++-8.5.0-4.el8_5.x86_64 numactl-libs-2.0.12-13.el8.x86_64 openssl-libs-1.1.1k-5.el8_5.x86_64 pcre2-10.32-2.el8.x86_64 zlib-1.2.11-17.el8.x86_64
(gdb) bt
#0 0x00000000004354a5 in __asan::FakeStack::AddrIsInFakeStack(unsigned long, unsigned long*, unsigned long*) ()
ntop/nDPI#1 0x00000000004d1a85 in __asan::ThreadStackContainsAddress(__sanitizer::ThreadContextBase*, void*) ()
ntop/nDPI#2 0x00000000004e89ab in __sanitizer::ThreadRegistry::FindThreadContextLocked(bool ()(__sanitizer::ThreadContextBase, void*), void*) ()
ntop/nDPI#3 0x00000000004d3190 in __asan::FindThreadByStackAddress(unsigned long) ()
ntop/nDPI#4 0x0000000000431513 in __asan::AddressDescription::AddressDescription(unsigned long, unsigned long, bool) ()
ntop/nDPI#5 0x0000000000433e32 in __asan::ErrorGeneric::ErrorGeneric(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long) ()
ntop/nDPI#6 0x00000000004cc626 in __asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) ()
ntop/nDPI#7 0x00000000004418bf in __interceptor_memset.part.46 ()
ntop/nDPI#8 0x00007ffee397d3f1 in ndpi_init_detection_module (prefs=0) at ndpi_main.c:2347
ntop/nDPI#9 0x00007ffee3971012 in ndpi_workflow_init (prefs=0x7ffedba5ee60, pcap_handle=0x0) at reader_util.c:445
ntop/nDPI#10 0x00007ffee38ae77f in dpi_init (thread_id=0, discover_protocol=0x7ffee38aec00 <dpi_discovered_callback>,
no_discover_protocol=0x7ffee38aeee0 <dpi_not_discovered_callback>)
at /opt/dpu/src/plugins/intelligent-gw/gw_process/parse_l7.c:552
ntop/nDPI#11 0x00007ffee38add8b in parse_l7_init () at /opt/dpu/src/plugins/intelligent-gw/gw_process/parse_l7.c:1262
ntop/nDPI#12 0x00007ffee37df622 in gw_process_init (vm=0x7ffeefe00680) at /opt/dpu/src/plugins/intelligent-gw/gw_process/gw_process.c:5783
ntop/nDPI#13 0x00007ffff4130285 in call_init_exit_functions_internal (vm=0x7ffeefe00680, headp=0x7d38f0 <vlib_global_main+368>, call_once=1,
do_sort=1, is_global=1) at /opt/dpu/src/vlib/init.c:363
ntop/nDPI#14 0x00007ffff412fedf in vlib_call_init_exit_functions (vm=0x7ffeefe00680, headp=0x7d38f0 <vlib_global_main+368>, call_once=1,
is_global=1) at /opt/dpu/src/vlib/init.c:377
ntop/nDPI#15 0x00007ffff413039a in vlib_call_all_init_functions (vm=0x7ffeefe00680) at /opt/dpu/src/vlib/init.c:400
ntop/nDPI#16 0x00007ffff41783b9 in vlib_main (vm=0x7ffeefe00680, input=0x7ffedba5fee0) at /opt/dpu/src/vlib/main.c:1952
ntop/nDPI#17 0x00007ffff42611cf in thread0 (arg=140732922857088) at /opt/dpu/src/vlib/unix/main.c:694
ntop/nDPI#18 0x00007ffff363941c in clib_calljmp () at /opt/dpu/src/vppinfra/longjmp.S:123
ntop/nDPI#19 0x00007fffffffcf00 in ?? ()
ntop/nDPI#20 0x00007ffff4260790 in vlib_unix_main (argc=169, argv=0x61a000009680) at /opt/dpu/src/vlib/unix/main.c:774
ntop/nDPI#21 0x000000000050509c in main (argc=169, argv=0x61a000009680) at /opt/dpu/src/vpp/vnet/main.c:342

and i test a program of memory leak, google asan tools may work out. so i'm not sure why this program will call down. i try to check frame 8 callback stack, bu i don't find any errors. so i need help from anyone!!!, thanks!

@sknat
Copy link
Collaborator

sknat commented Oct 26, 2023

HI @nanfengnan1
this looks more like a ntop/ndpi related question no ?

@sknat
Copy link
Collaborator

sknat commented Nov 20, 2023

Closing as this is probably a ntop/ndpi issue,
feel free to re-open if this is not the case !

@sknat sknat closed this as completed Nov 20, 2023
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