Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp255408ybl; Wed, 4 Dec 2019 02:10:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwbimk1Mcz/HGk2GtyJfWoAHj9IjiFY0nPf3YzLYjKPz2Jnqrckh/GTxbGm4ADc5XIZ0OAI X-Received: by 2002:a9d:6e12:: with SMTP id e18mr1743614otr.47.1575454207973; Wed, 04 Dec 2019 02:10:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575454207; cv=none; d=google.com; s=arc-20160816; b=dbRdZ285bdiqarOScSvFEpAeE5muvRCBFWrd5UHnXs1caZVgCTSgJJNq0bpzN4ln9N jKT66zQLjX2S4TdQmb4/HJqaNaCXMIweCBQVaslDudHKAdD9dKMAUwGNpH1SHIAYjLQS 638FCA4/DbgWX1FSsy+j31ZI5AwcjqxFN9HvSFuhmAw3G4iO+JS44xRM+2uMBh7FEo3r BFamdnVKgWW1n05T6x7CL3y2j2Y39E6GEd+53CGSVIqiBwJ/bl4NTOVU8g3NfWUOqxtu id6BUbeC+Sqn6r6WNVm/xenEYbszmveapFv3f2GPYO8UAMypIJs/ija5tpnIwJH94HqV 7Zxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=C41IEgT58kwFvzO+HDl9HGAlyMc60vUwslmmR6jVgHA=; b=dpf2HM38P8yXAipTarxti7BE2dr0o9t0lv4Fl9qkl5uqGzuaMUDVQAGYZ8wkyNF/3r sbcz7fANFok9Fxx6UPUdnda1C2H8bzJ1GuDPz5aMYKb78qQ4cOAp29v3lTjXDQ9OH98o risnBuI4fiV6KZw5UzkwBs6iiLZ3VDYaVc0Gh7BVLuSKaO4ee6KO41GZrYddQi0Vh/5q cqkTRiQfH5q2BmWQJv1IRTUKLYFsny2Tlu6XTWR+DUzFvRjV7zyDIt+REPk+HqtKH3/g Tyl05OYmrygYiSCvUnAKr5WIoHt1BJvAJN4ADgTjbo/kjJFxkevAU02Kd/k+LW8rLp9U vg1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si2558484otg.273.2019.12.04.02.09.55; Wed, 04 Dec 2019 02:10:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727567AbfLDKJX (ORCPT + 99 others); Wed, 4 Dec 2019 05:09:23 -0500 Received: from foss.arm.com ([217.140.110.172]:53902 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727408AbfLDKJX (ORCPT ); Wed, 4 Dec 2019 05:09:23 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 25FF41FB; Wed, 4 Dec 2019 02:09:22 -0800 (PST) Received: from [10.1.194.37] (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DEF7C3F52E; Wed, 4 Dec 2019 02:09:20 -0800 (PST) Subject: Re: Null pointer crash at find_idlest_group on db845c w/ linus/master To: Qais Yousef , Vincent Guittot Cc: John Stultz , Quentin Perret , Peter Zijlstra , Dietmar Eggemann , Juri Lelli , Patrick Bellasi , Ingo Molnar , lkml References: <20191204094216.u7yld5r3zelp22lf@e107158-lin.cambridge.arm.com> From: Valentin Schneider Message-ID: <65ff440a-187e-43e9-37b4-52fa381283f2@arm.com> Date: Wed, 4 Dec 2019 10:09:19 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191204094216.u7yld5r3zelp22lf@e107158-lin.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/2019 09:42, Qais Yousef wrote: > On 12/04/19 09:06, Vincent Guittot wrote: >> Hi John, >> >> On Tue, 3 Dec 2019 at 20:15, John Stultz wrote: >>> >>> With today's linus/master on db845c running android, I'm able to >>> fairly easily reproduce the following crash. I've not had a chance to >>> bisect it yet, but I'm suspecting its connected to Vincent's recent >>> rework. >> >> Does the crash happen randomly or after a specific action ? >> I have a db845 so I can try to reproduce it locally. > > Isn't there a chance we use local_sgs without initializing it in that function? > AFAICS we define local_sgs on the stack but not always could be populated with > the right values. I can't see tmp_sgs being used in the function too. Could > this cause the/a problem? > > 8377 struct sg_lb_stats local_sgs, tmp_sgs; > . > . > . > 8399 if (local_group) { > 8400 sgs = &local_sgs; > 8401 local = group; > 8402 } else { > 8403 sgs = &tmp_sgs; > 8404 } > 8405 > 8406 update_sg_wakeup_stats(sd, group, sgs, p); > local_sgs is initialized in the first update_sg_wakeup_stats() entry (the local sched_group is always the first one in the sd->groups list), and tmp_sgs is whatever non local group we're iterating over, see: if (local_group) { sgs = &local_sgs; local = group; } else { sgs = &tmp_sgs; } and that sgs is populated in update_sg_wakeup_stats(sd, group, sgs, p); > Cheers > > -- > Qais Youef >