It should be fixed in master by https://gerrit.fd.io/r/c/vpp/+/32643

ben

> -----Original Message-----
> From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of chetan bhasin
> Sent: lundi 6 septembre 2021 09:36
> To: vpp-dev <vpp-dev@lists.fd.io>
> Subject: [vpp-dev] VPP 2106 with Sanitizer enabled
> 
> Hi
> 
> 
> We are facing two errors with vpp2106 and Address Sanitizer enabled.
> 
> make V=1 -j4 build VPP_EXTRA_CMAKE_ARGS=-DVPP_ENABLE_SANITIZE_ADDR=ON
> 
> 
> Work-around - After adding the two api’s string_key_sum and
> strnlen_s_inline  to ASAN suppression, vpp2106 comes up fine.
> 
> 
> Error 1:
> ----------
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff71db5c1 in __asan::FakeStack::AddrIsInFakeStack(unsigned long,
> unsigned long*, unsigned long*) ()
>    from /lib64/libasan.so.5
> (gdb) bt
> #0  0x00007ffff71db5c1 in __asan::FakeStack::AddrIsInFakeStack(unsigned
> long, unsigned long*, unsigned long*) ()
>    from /lib64/libasan.so.5
> #1  0x00007ffff72c2a11 in
> __asan::ThreadStackContainsAddress(__sanitizer::ThreadContextBase*, void*)
> ()
>    from /lib64/libasan.so.5
> #2  0x00007ffff72dcdc2 in
> __sanitizer::ThreadRegistry::FindThreadContextLocked(bool
> (*)(__sanitizer::ThreadContextBase*, void*), void*) () from
> /lib64/libasan.so.5
> #3  0x00007ffff72c3e5a in __asan::FindThreadByStackAddress(unsigned long)
> () from /lib64/libasan.so.5
> #4  0x00007ffff71d5fb6 in __asan::GetStackAddressInformation(unsigned
> long, unsigned long, __asan::StackAddressDescription*) () from
> /lib64/libasan.so.5
> #5  0x00007ffff71d73f9 in
> __asan::AddressDescription::AddressDescription(unsigned long, unsigned
> long, bool) ()
>    from /lib64/libasan.so.5
> #6  0x00007ffff71d9e51 in __asan::ErrorGeneric::ErrorGeneric(unsigned int,
> unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned
> long) () from /lib64/libasan.so.5
> #7  0x00007ffff72bdc2a in __asan::ReportGenericError(unsigned long,
> unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned
> int, bool) () from /lib64/libasan.so.5
> #8  0x00007ffff720ef9c in __interceptor_strlen.part.0 () from
> /lib64/libasan.so.5
> #9  0x00007ffff34ce2ec in string_key_sum (h=0x7fff6ff6e970,
> key=140735097062688)
>     at  src/vppinfra/hash.c:947
> #10 0x00007ffff34caf15 in key_sum (h=0x7fff6ff6e970, key=140735097062688)
>     at  src/vppinfra/hash.c:333
> #11 0x00007ffff34cbf76 in lookup (v=0x7fff6ff6e9b8, key=140735097062688,
> op=GET, new_value=0x0, old_value=0x0)
>     at  src/vppinfra/hash.c:557
> #12 0x00007ffff34cc59d in _hash_get_pair (v=0x7fff6ff6e9b8,
> key=140735097062688)
>     at  src/vppinfra/hash.c:653
> #13 0x000000000042e885 in lookup_hash_index (name=0x7fff7177c520
> "/mem/stat segment")
>     at  src/vpp/stats/stat_segment.c:69
> #14 0x0000000000431790 in stat_segment_new_entry (name=0x7fff7177c520
> "/mem/stat segment",
>     t=STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE)
>     at  src/vpp/stats/stat_segment.c:402
> #15 0x00000000004401fb in vlib_stats_register_mem_heap
> (heap=0x7ffb67e00000)
>     at  src/vpp/stats/stat_segment_provider.c:96
> #16 0x00000000004327fa in vlib_map_stat_segment_init ()
>     at  src/vpp/stats/stat_segment.c:493
> ---Type <return> to continue, or q <return> to quit---
> #17 0x00007ffff3e15d19 in vlib_main (vm=0x7fff6eeff680,
> input=0x7fff6a0a9f70)
>     at  src/vlib/main.c:3272
> #18 0x00007ffff3f0d924 in thread0 (arg=140735054608000)
>     at  src/vlib/unix/main.c:671
> #19 0x00007ffff34d9504 in clib_calljmp ()
>     at  src/vppinfra/longjmp.S:123
> #20 0x00007fffffffc940 in ?? ()
> #21 0x00007ffff3f0e67e in vlib_unix_main (argc=282, argv=0x61d00001a480)
>     at  src/vlib/unix/main.c:751
> #22 0x000000000040b482 in main (argc=282, argv=0x61d00001a480)
>     at  src/vpp/vnet/main.c:336
> (gdb) q
> 
> 
> 
> 
> Error 2:
> -----------
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff71db5c1 in __asan::FakeStack::AddrIsInFakeStack(unsigned long,
> unsigned long*, unsigned long*) ()
>    from /lib64/libasan.so.5
> (gdb) bt
> #0  0x00007ffff71db5c1 in __asan::FakeStack::AddrIsInFakeStack(unsigned
> long, unsigned long*, unsigned long*) ()
>    from /lib64/libasan.so.5
> #1  0x00007ffff72c2a11 in
> __asan::ThreadStackContainsAddress(__sanitizer::ThreadContextBase*, void*)
> ()
>    from /lib64/libasan.so.5
> #2  0x00007ffff72dcdc2 in
> __sanitizer::ThreadRegistry::FindThreadContextLocked(bool
> (*)(__sanitizer::ThreadContextBase*, void*), void*) () from
> /lib64/libasan.so.5
> #3  0x00007ffff72c3e5a in __asan::FindThreadByStackAddress(unsigned long)
> () from /lib64/libasan.so.5
> #4  0x00007ffff71d5fb6 in __asan::GetStackAddressInformation(unsigned
> long, unsigned long, __asan::StackAddressDescription*) () from
> /lib64/libasan.so.5
> #5  0x00007ffff71d73f9 in
> __asan::AddressDescription::AddressDescription(unsigned long, unsigned
> long, bool) ()
>    from /lib64/libasan.so.5
> #6  0x00007ffff71d9e51 in __asan::ErrorGeneric::ErrorGeneric(unsigned int,
> unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned
> long) () from /lib64/libasan.so.5
> #7  0x00007ffff72bdc2a in __asan::ReportGenericError(unsigned long,
> unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned
> int, bool) () from /lib64/libasan.so.5
> #8  0x00007ffff721252c in __interceptor_strnlen.part.0 () from
> /lib64/libasan.so.5
> #9  0x00007ffff3595a0c in strnlen_s_inline (s=0x7fff7177c520 "/mem/stat
> segment", maxsize=128)
>     at  src/vppinfra/string.h:800
> #10 0x00007ffff3595f63 in strcpy_s_inline (dest=0x7fff6a0a9ab0 "",
> dmax=128, src=0x7fff7177c520 "/mem/stat segment")
>     at  src/vppinfra/string.h:960
> #11 0x00007ffff3597e1c in strcpy_s (dest=0x7fff6a0a9ab0 "", dmax=128,
> src=0x7fff7177c520 "/mem/stat segment")
>     at  src/vppinfra/string.c:274
> #12 0x0000000000431820 in stat_segment_new_entry (name=0x7fff7177c520
> "/mem/stat segment",
>     t=STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE)
>     at  src/vpp/stats/stat_segment.c:408
> #13 0x00000000004401fb in vlib_stats_register_mem_heap
> (heap=0x7ffb67e00000)
>     at  src/vpp/stats/stat_segment_provider.c:96
> #14 0x00000000004327fa in vlib_map_stat_segment_init ()
>     at  src/vpp/stats/stat_segment.c:493
> #15 0x00007ffff3e15d19 in vlib_main (vm=0x7fff6eeff680,
> input=0x7fff6a0a9f70)
>     at  src/vlib/main.c:3272
> #16 0x00007ffff3f0d924 in thread0 (arg=140735054608000)
>     at  src/vlib/unix/main.c:671
> ---Type <return> to continue, or q <return> to quit---
> #17 0x00007ffff34d9504 in clib_calljmp ()
>     at  src/vppinfra/longjmp.S:123
> #18 0x00007fffffffc940 in ?? ()
> #19 0x00007ffff3f0e67e in vlib_unix_main (argc=282, argv=0x61d00001a480)
>     at  src/vlib/unix/main.c:751
> #20 0x000000000040b482 in main (argc=282, argv=0x61d00001a480)
>     at  src/vpp/vnet/main.c:336
> (gdb)
> 
> 
> Thanks,
> Chetan

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20073): https://lists.fd.io/g/vpp-dev/message/20073
Mute This Topic: https://lists.fd.io/mt/85407456/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to