All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Boccassi <lboccass@Brocade.com>
To: "mhall@mhcomputing.net" <mhall@mhcomputing.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: DPDK (and rte_*alloc family) friendly Valgrind
Date: Sat, 13 Feb 2016 12:15:06 +0000	[thread overview]
Message-ID: <1455365706.3599.24.camel@brocade.com> (raw)
In-Reply-To: <33FC4BA3-61EA-4681-AF73-E5C38002B3D3@mhcomputing.net>

On Fri, 2016-02-12 at 22:47 -0800, Matthew Hall wrote:
> 2016-02-10 22:54, Luca Boccassi:
> > I created a set of patches for Valgrind that add support for the rte_*alloc family of functions. We use it for memcheck
> 
> Hi Luca,
> 
> This is awesome stuff:
> 
> ==18730== Source and destination overlap in memcpy(0x6851c00, 0x6851c00, 4144)
> ==18730==    at 0x4C30573: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==18730==    by 0x787195: sort_by_physaddr (eal_memory.c:747)
> ==18730==    by 0x788314: rte_eal_hugepage_init (eal_memory.c:1198)
> ==18730==    by 0x8F1888: rte_eal_memory_init (eal_common_memory.c:145)
> ==18730==    by 0x751BB6: rte_eal_init (eal.c:793)
> ==18730==    by 0x4D9E8A: main (sdn_sensor.c:555)
> 
> ==18730== Thread 3:
> ==18730== Syscall param epoll_ctl(event) points to uninitialised byte(s)
> ==18730==    at 0x60C249A: epoll_ctl (syscall-template.S:81)
> ==18730==    by 0x72F88E: eal_intr_thread_main (eal_interrupts.c:844)
> ==18730==    by 0x581A6A9: start_thread (pthread_create.c:333)
> ==18730==    by 0x60C1EEC: clone (clone.S:109)
> ==18730==  Address 0x8400b38 is on thread 3's stack
> ==18730==  in frame #1, created by eal_intr_thread_main (eal_interrupts.c:801)
> ==18730==
> 
> I'll be running my app with this special valgrind heavily and patching these from now on.

Hi Matthew,

Very cool, happy to help :-)

Unrelated to Valgrind but related to debugging tools: I've been playing
with our DPDK application and GCC's address sanitizer, and I would
recommend looking into it. It cannot be turned on in production as it
kills performance, but for test builds it's very useful as it will abort
when out-of-bounds reads/writes or use-after-free happen. To use it
simply add -fsanitize=address to the CFLAGS.

> I was wondering, is there a way to get the patchset on its own branch versus the master valgrind in your repository? If so it will be easier for the rest of the community to assist you with rebasing it periodically to the upstream valgrind. This would be easy if you keep their upstream code in one branch and the patches applied in another branch. Then we can update the master one somehow and rebase the patched one to this new code...

Sure thing, good idea! I've pushed an "upstream" branch on the commit
that did the initial import. This way we can follow the common workflow
of importing upstream changes into their own branch, and then merging
into the master branch, which has the patches. Does that sound
reasonable?

-- 
Kind regards,
Luca Boccassi
Brocade Communications Systems

  reply	other threads:[~2016-02-13 12:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 22:54 DPDK (and rte_*alloc family) friendly Valgrind Luca Boccassi
2016-02-11  7:34 ` Thomas Monjalon
2016-02-13  6:47   ` Matthew Hall
2016-02-13 12:15     ` Luca Boccassi [this message]
2016-02-13 12:30   ` Luca Boccassi
2016-02-13 19:59     ` Matthew Hall
2016-02-15  9:16     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455365706.3599.24.camel@brocade.com \
    --to=lboccass@brocade.com \
    --cc=dev@dpdk.org \
    --cc=mhall@mhcomputing.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.