From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F0D042596; Thu, 14 Sep 2023 12:42:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF9284067E; Thu, 14 Sep 2023 12:42:36 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9BFFD4067C for ; Thu, 14 Sep 2023 12:42:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694688154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rH36SkDJy/L8rxTHGLgl0T3I3sWwJKyBeMy0K765cos=; b=ZyvQ7IFvq05CoBMlAVHerV4KUJSrHK9ZRkuDKSiOUV8qyagbwBhwBwscmUp8nQXS49J8Gx o+TEKphXzx9MhItOYk9gjrTONpA+fKrLgmSj0wJmYMxRadJfFJ+OgZa6HjRWtdt0MZjC07 H596qZEi9m6iYehC6/fUyK7PiKGr9gs= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-244-o9ORHGJqM9yeLcFtYlVPng-1; Thu, 14 Sep 2023 06:42:33 -0400 X-MC-Unique: o9ORHGJqM9yeLcFtYlVPng-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2bcb47970eeso10274271fa.3 for ; Thu, 14 Sep 2023 03:42:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694688152; x=1695292952; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rH36SkDJy/L8rxTHGLgl0T3I3sWwJKyBeMy0K765cos=; b=Dr6c1lWqgRqFeUgL+l2HFy5hrR82lHxotC4tWdUu9n5iuiS0Z2L3kFy2zUYaea3bK+ DyjmUaRQygcc4SU8q3/L5+Xb+INlfbYUq3AVvdAzL+WxFan8iUP1E8J0ySfGCDX5r5MC 3OAn9o1+o33n5pSz4GmVKziuf01cKr68LlpaJ1OL76q8RWSZohRovgkwBeGuOc4q2YD+ QJQbk7yC5vhQN5epSvViiBBzYWVeqWHGPUnmSndgx0w7XXN0n2sb7Y7R1VYwKa02Idln /NYwmlVONDT4fuvnwI4BHbDHjIxD03HvddJtvIaYPdxYzxDUka15CLhCdKqmLgeHSOS6 eXEg== X-Gm-Message-State: AOJu0YzhSpVUWKzDn+KyvEFpqmkNQz/Ed1aFIWHDKTXTzDN13hmav2fH lN98tcRNsdwbdB7jpZdm7VXRbv4wndlpB8+mQjUzIj79+8FrP4+1Xt2b8U2NeB81thUU/tzOdMh +VhiTWIhf0gzDIJfOGn6Wr8aem/w4YAhb X-Received: by 2002:a2e:8349:0:b0:2bc:be93:6d3c with SMTP id l9-20020a2e8349000000b002bcbe936d3cmr4467066ljh.32.1694688151852; Thu, 14 Sep 2023 03:42:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhLtjTBHOZQomOkNiJHw3gyHm8kPlJycRJkL/Mn0do9loIcSwGeLbuoM/3curxlz2bW2B4SaQemyDQtij8o7c= X-Received: by 2002:a2e:8349:0:b0:2bc:be93:6d3c with SMTP id l9-20020a2e8349000000b002bcbe936d3cmr4467059ljh.32.1694688151508; Thu, 14 Sep 2023 03:42:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Thu, 14 Sep 2023 12:42:20 +0200 Message-ID: Subject: Re: confusion about dpdk asan To: =?UTF-8?B?5p2o5L2z5piK?= Cc: dev X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Sep 14, 2023 at 10:59=E2=80=AFAM =E6=9D=A8=E4=BD=B3=E6=98=8A wrote: > > Thank you for your reply. Please, let's keep this discussion on the ml. Anybody can help and this thread may help others having issues with ASan. Let's try to understand if something is wrong in your setup or if there is a bug in the doc or example code. You mentionned initially those versions: Gcc :9.3.0 Libasan: 4.8.5 Which distribution is it? It looks close to a Ubuntu 20.04, but latest 20.04 has a more recent version of gcc (9.4 with libasan 5.x) > Sorry for not describing it in detail. > I compile dpdk with cmd: > meson setup -Db_sanitize=3Daddress build -Dmax_numa_nodes=3D1 -Dexamples= =3Dhelloworld Well, this segfault is strange and I am suspecting an issue out of DPDK (in libasan itself?). As I mentionned in my first mail, what happens if you compile without -Db_sanitize=3Daddress and run the example? If you don't reproduce the segfault without ASan, my next request is to try to run with some debug traces in ASan: ASAN_OPTIONS=3Dverbosity=3D1 ./build/examples/dpdk-helloworld etc... Alternatively, recompile with debug symbols and run the example through gdb to get a better backtrace. > I added code as what asan.txt do: > > char *p =3D rte_zmalloc(NULL, 9, 0); > if (!p) { > printf("rte_zmalloc error.\n"); > return -1; > } > p[9] =3D 'a'; > > But the result is exactly as described in the previous email. I tried adding this block on the 21.11 branch, in a Ubuntu 20.04.6 containe= r. As I mentionned above, this container has a gcc 9.4 version, coming with a libasan 5 and I get the expected output from ASan. --=20 David Marchand