DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "liucheng (J)" <liucheng11@huawei.com>
Cc: dev@dpdk.org, sergio.gonzalez.monroy@intel.com
Subject: Re: [dpdk-dev] [PATCH]librte_eal:add heap lock in malloc_heap_get_stats
Date: Fri, 06 Oct 2017 22:19:22 +0200	[thread overview]
Message-ID: <16571873.8VHJB6EtNZ@xps> (raw)
In-Reply-To: <8B0A0B0226AB0F47A8D0EBBBBA1F005102BC7F7D@DGGEML502-MBX.china.huawei.com>

Hi,
We need a Signed-off-by to process your contribution.
Thank you

+Cc sergio.gonzalez.monroy@intel.com


21/09/2017 05:19, liucheng (J):
> There is no lock in function malloc_heap_get_stats. When we call this function, the elem may free by other thread.
> 
> the call stack:
> Core was generated by `ovs-vswitchd unix:/usr/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:info'.
> Program terminated with signal 11, Segmentation fault.
> #0  malloc_heap_get_stats (heap=0x7f3abf08ee1c, socket_stats=socket_stats@entry=0x7ffce811ffc0) at /usr/src/debug/dpdk-16.04/lib/librte_eal/common/malloc_heap.c:198
> 198                              socket_stats->heap_freesz_bytes += elem->size;
> (gdb) bt
> #0  malloc_heap_get_stats (heap=0x7f3abf08ee1c, socket_stats=socket_stats@entry=0x7ffce811ffc0) at /usr/src/debug/dpdk-16.04/lib/librte_eal/common/malloc_heap.c:198
> #1  0x00007f3abd6d6299 in rte_malloc_get_socket_stats (socket=socket@entry=0, socket_stats=socket_stats@entry=0x7ffce811ffc0) at /usr/src/debug/dpdk-16.04/lib/librte_eal/common/rte_malloc.c:214
> ......
> 
> lib/librte_eal/common/malloc_heap.c | 3 +++
> lib/librte_eal/common/malloc_heap.h | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)

      reply	other threads:[~2017-10-06 20:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21  3:19 liucheng (J)
2017-10-06 20:19 ` Thomas Monjalon [this message]

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=16571873.8VHJB6EtNZ@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=liucheng11@huawei.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).