unable to run sample application with addressSanitizer

Stephen Hemminger stephen at networkplumber.org
Thu Jan 5 18:06:49 CET 2023


On Thu, 5 Jan 2023 08:08:58 +0000
Balakrishnan K <Balakrishnan.K1 at tatacommunications.com> wrote:

> Hi All,
>   I am trying to run dpdk helloworld example with ASAN tool to check the memory leak.
> Following the below page as reference
> https://doc.dpdk.org/guides/prog_guide/asan.html
> 
> after compiling the dpdk with options "meson setup -Dbuildtype=debug  -Db_sanitize=address -Dexamples=helloworld build"
> 
> program getting aborted can anyone help me on this why I am unable to use ASAN with helloworld sample.
> 
> Snipped of  the error :
> 
> ./build/examples/dpdk-helloworld -l 0-3 -n 4
> EAL: Detected 72 lcore(s)
> EAL: Detected 2 NUMA nodes
> EAL: WARNING! Base virtual address hint (0x100005000 != 0x7f2a56500000) not respected!
> EAL:    This may cause issues with mapping memory into secondary processes
> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
> =================================================================
> ==29612== ERROR: AddressSanitizer: global-buffer-overflow on address 0x000005837bd0 at pc 0xc39598 bp 0x7ffede705bc0 sp 0x7ffede705bb0
> READ of size 2 at 0x000005837bd0 thread T0
>     #0 0xc39597 (/home/balki/dev/dpdk-20.11/build/examples/dpdk-helloworld+0xc39597)
>     #1 0xc3bbb3 (/home/balki/dev/dpdk-20.11/build/examples/dpdk-helloworld+0xc3bbb3)
>     #2 0xad8832 (/home/balki/dev/dpdk-20.11/build/examples/dpdk-helloworld+0xad8832)
>     #3 0xb2bdff (/home/balki/dev/dpdk-20.11/build/examples/dpdk-helloworld+0xb2bdff)
>     #4 0x4083eb (/home/balki/dev/dpdk-20.11/build/examples/dpdk-helloworld+0x4083eb)
>     #5 0x7f2a51aaa554 (/usr/lib64/libc-2.17.so+0x22554)
>     #6 0x4082c8 (/home/balki/dev/dpdk-20.11/build/examples/dpdk-helloworld+0x4082c8)
> 0x000005837bd0 is located 48 bytes to the left of global variable 'otx2_ree_ops (../drivers/regex/octeontx2/otx2_regexdev.c)' (0x5837c00) of size 144
> 0x000005837bd0 is located 4 bytes to the right of global variable 'pci_id_ree_table (../drivers/regex/octeontx2/otx2_regexdev.c)' (0x5837bc0) of size 12
> Shadow bytes around the buggy address:
>   0x000080afef20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x000080afef30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x000080afef40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x000080afef50: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
>   0x000080afef60: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
> =>0x000080afef70: 00 00 00 00 00 00 00 00 00 04[f9]f9 f9 f9 f9 f9  
>   0x000080afef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x000080afef90: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
>   0x000080afefa0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
>   0x000080afefb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x000080afefc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> Shadow byte legend (one shadow byte represents 8 application bytes):
>   Addressable:           00
>   Partially addressable: 01 02 03 04 05 06 07
>   Heap left redzone:     fa
>   Heap righ redzone:     fb
>   Freed Heap region:     fd
>   Stack left redzone:    f1
>   Stack mid redzone:     f2
>   Stack right redzone:   f3
>   Stack partial redzone: f4
>   Stack after return:    f5
>   Stack use after scope: f8
>   Global redzone:        f9
>   Global init order:     f6
>   Poisoned by user:      f7
>   ASan internal:         fe
> ==29612== ABORTING

There is no octeontx2 regex driver in the upstream code.
Please reproduce without any additional out of tree drivers.



More information about the users mailing list