From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 02A05A00E6 for ; Fri, 19 Apr 2019 04:59:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F39A1BA92; Fri, 19 Apr 2019 04:59:55 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by dpdk.org (Postfix) with ESMTP id 09AC51B2B0 for ; Fri, 19 Apr 2019 04:59:53 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id y13so1961054pfm.11 for ; Thu, 18 Apr 2019 19:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WvcrM7V8g1vodVBoLyusUmhf2m0roNgrdOm6fWjD1hA=; b=A94BtORHaZF1+g+cRZztpqGfaNb9YfRLA0d+g5qeyx2rmSh2D+Ojz+6Pz1KsK0Oazw 6JMWMJj+wOuQiKMmsYh3SVxI9xWsEd95vW5bGO1Dq35W8g+DaiqbsAEYZHChXyY1Qr26 YytZW1mLedqwJAgvynSpWVF969repc+CLLm6FpwMDDNiJ8Oa1O/s+RWUKPdKfTeIOOeu jSdf/GpEI3rl/mqYITS+LvPIplhb/RcIQwj8FIk4ExPTCrlnCFzu68i0RyWxN9kpiXrU a+QJrHXFe4TsYfdZARaXxZFwlfUVgu2DzaqwhymwPjiiUrrdaYBm7Jeb3fwXFwrjDk9V Ke9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WvcrM7V8g1vodVBoLyusUmhf2m0roNgrdOm6fWjD1hA=; b=R93CuN8tk9RvxISYMCe1ZRANxCsS/Y0i/4DJ6A/SX28cEI6RwjFPFWNnGgbyHWwp2O vTUe+kmwnMIz+AIy59HMdjR0KX96xW+y61VEdHLtklgIqC16QfmVyAtQpcNyFAomICIP H4d/+A+Bfh03PNYC3ZrlJLR0OYvLgFCILPKs7auJPKaQYh8Cw98bpVDBaHGg8/my/wbp o5kmcva59R2CNnzvuRBoAfzai+TBF6n+dsGmCh9RhtucGCtktbNlZfUNrM0D8Qkz0EEI 07/jo0qRV6pykymrteHmCo1atnzZ3Ensq36H2S9tTQ9ZlXmy3t7/nE572CALn6GANwXr S+0A== X-Gm-Message-State: APjAAAXTmRX/7JM/Q9siUqyhGqRNDQymEzfAHzb0SItU0k34elh1gaCk 0AacpB1wHroZed+8AD5x0hALtHniCK8= X-Google-Smtp-Source: APXvYqyjVIxy1VuNg09JHnvOlzd9TZEyJY+vHJxrP+red+CsQtXcNyVN5zLbdwCLFAQkB6IUGX4dZw== X-Received: by 2002:a62:1815:: with SMTP id 21mr1285653pfy.107.1555642792122; Thu, 18 Apr 2019 19:59:52 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id o67sm4054566pga.55.2019.04.18.19.59.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2019 19:59:51 -0700 (PDT) Date: Thu, 18 Apr 2019 19:59:44 -0700 From: Stephen Hemminger To: =?UTF-8?B?5pu+5oe35oGp?= Cc: users@dpdk.org Message-ID: <20190418195944.04c4cec5@hermes.lan> In-Reply-To: <5BDADE86-3D04-4BE5-AC95-03BE123ED42B@csie.io> References: <5BDADE86-3D04-4BE5-AC95-03BE123ED42B@csie.io> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-users] segmentation fault after using rte_malloc() X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Fri, 19 Apr 2019 09:11:05 +0800 =E6=9B=BE=E6=87=B7=E6=81=A9 wrote: > Hi all,=20 >=20 > i have 1 problem while using rte_malloc >=20 > Every time I use this function and use the memory it returns, it shows s= egmentation fault(core dump) >=20 > Is something wrong? >=20 > thanks. >=20 >=20 > rte init =E2=80=A6 > =E2=80=A6=E2=80=A6=E2=80=A6... > unsigned char *str1; > printf("str1 addr =3D %x\n", str1); > str1 =3D rte_malloc(NULL,2,RTE_CACHE_LINE_SIZE); > printf("str1 addr =3D %x\n", str1); > str1[0] =3D 'a=E2=80=99; //segmentation fault here > str1[1] =3D '\0'; Do you have huge pages? Did you do eal_init?