No idea. Hope someone can point it out.

The libbacktrace can locate the line number of the code, otherwise we'd like to 
use glibc backtrace which can generate like:

mheap_put+0x230
clib_mem_free+0x190

It would take extra time to convert the offset to the line number by using 
addr2line.

It is a bit heavy to integrate something like libbacktrace. This is why I'm 
wondering. Probably we can take a light-weight approach to add glib backtrace 
shown above. No dependency :-)

Regards,
Kingwel

-----Original Message-----
From: Damjan Marion <dmar...@me.com> 
Sent: Monday, June 11, 2018 7:27 PM
To: Kingwel Xie <kingwel....@ericsson.com>
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Integration with libbacktrace


What is the difference between libunwind and libbacktrace?

I can see that libunwind is available as package on ubuntu, and libbacktrace is 
not...


> On 11 Jun 2018, at 11:41, Kingwel Xie <kingwel....@ericsson.com> wrote:
> 
> Hi all,
>  
> I’m wondering if it can be accepted by the community.
>  
> Every time when vPP crashes for some reason, core dump file can be used for 
> further analysis. However, core file is usually big and even unfortunately 
> isn’t generated. A trick we used before is to generate a crash dump file to 
> indicate some basic information. This file is a text file like below, not 
> intended to replace core dump, but useful for a quick analysis.
>  
> To make it more friendly, we use libbacktrace instead of glic backtrace 
> function which can only indicate the function name plus offset. Therefore, 
> integration of libbacktrace is now in our code branch.
>  
> Can this be pushed upstream? Libbacktrace can be found at:
> https://github.com/ianlancetaylor/libbacktrace
>  
> Regards,
> Kingwel
>  
> ----------------------------------------------------------------------
> ------------------------------------------------
> DBGvpp# write crashdump to ../crashdump-2018-06-11-05-14-31.log
> /home/vppshare/rich/vpp/build-root/install-vpp_debug-native/vpp/bin/vp
> p: libbacktrace: DWARF underflow in .debug_abbrev at 402002 
> 7f8907da336b unix_signal_handler 
> /home/vppshare/rich/vpp/build-data/../src/vlib/unix/main.c:204
> 7f89065f238f ?? ??:0
> 7f8905e32428 gsignal ??:0
> 7f8905e34029 abort ??:0
> 407f7d os_panic 
> /home/vppshare/rich/vpp/build-data/../src/vpp/vnet/main.c:310
> 7f890686d890 mheap_put 
> /home/vppshare/rich/vpp/build-data/../src/vppinfra/mheap.c:815
> 7f89068c1531 clib_mem_free 
> /home/vppshare/rich/vpp/build-data/../src/vppinfra/mem.h:186
> 7f89068c1845 vec_resize_allocate_memory 
> /home/vppshare/rich/vpp/build-data/../src/vppinfra/vec.c:96
> 7f890683ea09 _vec_resize_inline 
> /home/vppshare/rich/vpp/build-data/../src/vppinfra/vec.h:145
> 7f890683fa59 do_percent 
> /home/vppshare/rich/vpp/build-data/../src/vppinfra/format.c:341
> 7f890683fec6 va_format 
> /home/vppshare/rich/vpp/build-data/../src/vppinfra/format.c:404
> 7f890682bfc3 elog_string 
> /home/vppshare/rich/vpp/build-data/../src/vppinfra/elog.c:541
> 7f8907ff0dc7 elog_id_for_msg_name 
> /home/vppshare/rich/vpp/build-data/../src/vlibapi/api_shared.c:408
> 7f8907ff1250 vl_msg_api_handler_with_vm_node 
> /home/vppshare/rich/vpp/build-data/../src/vlibapi/api_shared.c:540
> 7f8907ffbcec void_mem_api_handle_msg_i 
> /home/vppshare/rich/vpp/build-data/../src/vlibmemory/memory_api.c:675
> 7f8907ffbd5b vl_mem_api_handle_msg_main 
> /home/vppshare/rich/vpp/build-data/../src/vlibmemory/memory_api.c:685
> 7f89080168fe vl_api_clnt_process 
> /home/vppshare/rich/vpp/build-data/../src/vlibmemory/vlib_api.c:380
> 7f8907d346e0 vlib_process_bootstrap 
> /home/vppshare/rich/vpp/build-data/../src/vlib/main.c:1280
>  
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9584): https://lists.fd.io/g/vpp-dev/message/9584
Mute This Topic: https://lists.fd.io/mt/21987007/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Leave: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to