From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-f194.google.com (mail-vk1-f194.google.com [209.85.221.194]) by dpdk.org (Postfix) with ESMTP id 276372082 for ; Thu, 17 Jan 2019 18:18:12 +0100 (CET) Received: by mail-vk1-f194.google.com with SMTP id d201so2451268vka.0 for ; Thu, 17 Jan 2019 09:18:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ugJE2q3q4tmC9ujTnVT3Y23bgyvWvxbm9dWNEeI7BUA=; b=Ebl6MzGD0atkKCDtTsRKDAj7FXCWP99P2eS3uB13W1vrzDwN59w+07JFqow3VYtw0i FXY09D/pCmL9qaBmFzrWVfXVPGrr1+wKalIiTC5q3Ijsg/Y6I8Vwpb0uNgto7a+j+f1S jJ2iPyllBDmOt5kw/mdBCO6RGKAUjPxUJDzUj9xwg114sY/eK+f6bYJynOcgXpG6RiMt yIpT3ruMrg9YtmLl/0SUZDKNRL/vNSg/gKgP23V4n2xn/WmFePGwrEz/pzkZBj0JLvpv JURWQHXuOMdacyDttvcHkoGoUsigt98DruRWyG6yuNf6rq+aOv0F0J46ud2fWH0rk81O Gkfw== X-Gm-Message-State: AJcUukfEnmm/Aef9fi+VKEIvjZ9GEjQLDOOjPoXMjN1XkjELd3gcUaDm 9hH3s49EYtuCCLlMDAbJ36iAnTItVfTZuGsXwSZ1vw== X-Google-Smtp-Source: ALg8bN7PfK1KytCP3d4rNJz7RL9ub1korWJalKhR0w/BeaFbQ58xqYFwRqm6hBZ23HId2/Zee7ja1FNrmxJeOZJTY28= X-Received: by 2002:a1f:19d6:: with SMTP id 205mr5783477vkz.53.1547745491309; Thu, 17 Jan 2019 09:18:11 -0800 (PST) MIME-Version: 1.0 References: <1547730777-20405-1-git-send-email-david.marchand@redhat.com> <3463567.oezzxnnWpT@xps> In-Reply-To: <3463567.oezzxnnWpT@xps> From: David Marchand Date: Thu, 17 Jan 2019 18:17:59 +0100 Message-ID: To: Thomas Monjalon Cc: dev@dpdk.org, Bruce Richardson , solal.pirelli@gmail.com, dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] eal: fix out of bound access when no cpu is available X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 17:18:12 -0000 On Thu, Jan 17, 2019 at 5:34 PM Thomas Monjalon wrote: > 17/01/2019 14:12, David Marchand: > > In the unlikely case when the dpdk application is started with no cpu > > available in the [0, RTE_MAX_LCORE - 1] range, the master_lcore is > > automatically chosen as RTE_MAX_LCORE which triggers an out of bound > > access. > > > > Either you have a crash then, or the initialisation fails later when > > trying to pin the master thread on it. > > In my test, with RTE_MAX_LCORE == 2: > > > > $ taskset -c 2 ./master/app/testpmd --no-huge -m 512 --log-level *:debug > > [...] > > EAL: pthread_setaffinity_np failed > > PANIC in eal_thread_init_master(): > > cannot set affinity > > 7: [./master/app/testpmd() [0x47f629]] > > > > Bugzilla ID: 19 > > Signed-off-by: David Marchand > > We should backport this fix. > When this bug has been introduced? > Indeed, at first, I thought the problem had always been there, but it should be starting 17.02: Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection") + CC stable Do you want a v2 ? -- David Marchand