Valgrind does not run well with VPP for a various of reasons (too slow, VPP doing too many nasty tricks and using its own memory allocators etc.). - for profiling, I'd recommend using Linux perf - for memory errors there is a support for Address Sanitizer (I need to spend some time to update it but it should work apart from running make test): https://fd.io/docs/vpp/master/troubleshooting/sanitizer.html - for memory leaks you can use VPP memory traces: https://fd.io/docs/vpp/master/troubleshooting/mem.html
Best ben > -----Original Message----- > From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of bhishma via > lists.fd.io > Sent: vendredi 7 mai 2021 11:27 > To: vpp-dev@lists.fd.io > Subject: [vpp-dev] Running VPP in valgrind #vpp-dev > > Hi All, > > > > > We are using VPP as our x86 based forwarder. For our use case, we have > extended VPP by adding our own specific nodes including process nodes. > > > > > The startup.conf as shown below: > > > > unix { > > nodaemon > > log /var/log/vpp/vpp.log > > full-coredump > > cli-listen localhost:5003 > > runtime-dir /shm/run/vpp/ > > } > > > api-trace { > > on > > } > > > cpu { > > main-core 2 > > workers 2 > > } > > > heapsize 500M > > > ip { > > heap-size 32M > > } > > > ip6 { > > heap-size 20M > > hash-buckets 131072 > > } > > > statseg { > > size 150M > > } > > > plugins { > > plugin dpdk_plugin.so { disable } > > } > > > > > We would like to run valgrind/callgrind for profiling the non-vpp portions > of code running in the same process. > > > > > > > When we start vpp with valgrind, we are seeing the below issue: > > > > unix_config:492: couldn't open log '/var/log/vpp/vpp.log' > > /usr/local/bin/vpp[1741]: clib_elf_parse_file: open `/usr/local/bin/vpp': > No such file or directory > > /usr/local/bin/vpp[1741]: clib_sysfs_prealloc_hugepages:261: pre- > allocating 19 additional 2048K hugepages on numa node 0 > > /usr/local/bin/vpp[1741]: buffer: vlib_physmem_shared_map_create: > pmalloc_map_pages: failed to mmap 19 pages at 0x0 fd 15 numa 0 flags 0x11: > Operation not permitted > > > /usr/local/bin/vpp[1741]: buffer: falling back to non-hugepage backed > buffer pool > > ==1741== Warning: unimplemented fcntl command: 1033 > > /usr/local/bin/vpp[1741]: vlib_physmem_shared_map_create: > clib_mem_create_fd: fcntl (F_ADD_SEALS): Invalid argument > > /usr/local/bin/vpp[1741]: vlib_buffer_main_init: failed to allocate buffer > pool(s) > > 2021-05-06T16:46:01.987175+0000 loop_poll.c:368 [trace] grown poll array > to 10 for FD 6 > > > > > Is there any specific options or anything that needs to be tweaked in the > startup conf file to run valgrind/callgrind successfully ? > > > > > To reiterate we would just like valgrind/callgrind for profiling the non- > VPP portions, but of course VPP needs to run first as it is the top of our > event loop. > > > Thanks, > Bhishma
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19360): https://lists.fd.io/g/vpp-dev/message/19360 Mute This Topic: https://lists.fd.io/mt/82651125/21656 Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-