Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32208306rwd; Fri, 7 Jul 2023 10:09:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLFRtafGYu4Y3fvRTrpdILz6OhWpFmYNbdJiVDwMraLjmBOFHZECNGf5egMBSBCKtBhrRM X-Received: by 2002:a17:907:16a8:b0:96f:9cea:a34d with SMTP id hc40-20020a17090716a800b0096f9ceaa34dmr8551562ejc.21.1688749755227; Fri, 07 Jul 2023 10:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688749755; cv=none; d=google.com; s=arc-20160816; b=GcqGiH4dCyxsyXDBr8UIsrQeeaI2A+GToycQ1e7eDUgPFN9nt7OGF+gPZXrFVmavAs t8ohsWgRXjCrCf8X8+UOkEO5Azpa9DNWEj3Rr3YmdJfvtmGfMLNq4XHAFPzCQHV3mWzQ 0gK+uIsxLa3jGrck5FrAPxcQiQ0z6jQu+fapdv0SGTdvhQGQCicp3KBBxlYq/+Uak1u9 15yn/8To4qavizMeAZwxIEy3EQQyBm1NaIWnn8JBCP4EHiwjJ12U/eyb9Mkv+O3cgWPq 6txstV5VBBpTEQQKcmE1e8Q6VzjS91Qzy5fHjcrjURLQXKF/HL+8xxLnO/3+Qi8ov+0R 8Aog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=8v8daPXrkT9v1oafDNwNrU1X8TFSFnDMzciS3B5pmb8=; fh=BVl6tbYwjGvHsFxcfZwTgkQsDYN2gS+1KNRf27co05Q=; b=RmlZ7d2S1O/Q3x47Xp3CU7XQaT37DkSJg17LHnaK24JYrrMgJm/FJr01yRwXNH4zYW 0Lx0GzvgWQJ+kxg8aZof9CrWe/xZ6/PDQU8BIkX2CL2vDi612HBRuKsuG1DG4JPnegbc 7cZsVtGwljic3bhOPIp1MvFI5svC0yD29/lQ7Lxt3ButBFRON6ZO8dLsV/H22TSI2HFl qQVmeFQAJOKD4ABH3JSXiqQs1SbMx4eNjTlJ5CWABVPQtPrXx/3PbVqLrX0SLlAcaUbT cfkzVL2Jlnz4aSTeZMvRBt7c9S+fFt7/oJIfhkfZARCYhuzniyTLZlHMMSW86WQprteM LYxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gQYRsgmq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020a170906559300b009930f844671si2506999ejp.963.2023.07.07.10.08.49; Fri, 07 Jul 2023 10:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gQYRsgmq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbjGGQQJ (ORCPT + 99 others); Fri, 7 Jul 2023 12:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjGGQQI (ORCPT ); Fri, 7 Jul 2023 12:16:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64F9E1FC6; Fri, 7 Jul 2023 09:16:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D80CD619F4; Fri, 7 Jul 2023 16:16:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26DA0C433C7; Fri, 7 Jul 2023 16:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688746566; bh=Psq+MWPRLnkbm+5dY5Hpkk/UK5icgJossc/0TJsSnLg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=gQYRsgmqESxIcuTv+Q8bgKan4bnssSc8tcAaoftDFJhh6+wlsDlJjSc670AOesF7U NQA8mR7o5wFG51rwXXaI84Lyrrli6XM8WSj5CMGD6OOsZwrkG5ijDremST4LecrNwY mNG9n2vI/LBOf/Hscu2P0ANiOw/8XGZv3rfw6Snkj3mK5K9hED8lqKczRJHZxJugeH DEen0kpwWuD5OHrZnDN2MxBhWamG9Spt/Wnev0G0AsOp9M0kmBcCEXA7+fvx1n5yCi esBPATBCay7GhW6jI4OLkIvbGe8DzlOAN4mC2fJ7aZcLVWwwl4X0vSrx1eTAEdvX51 GBckUNHL0BBKQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id AEC9CCE0073; Fri, 7 Jul 2023 09:16:05 -0700 (PDT) Date: Fri, 7 Jul 2023 09:16:05 -0700 From: "Paul E. McKenney" To: Waiman Long Cc: Davidlohr Bueso , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Boqun Feng , Zqiang , rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] refscale: Fix use of uninitalized wait_queue_head_t Message-ID: <8b827d44-b19b-4eb2-8860-f419cc61084e@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20230707000117.2371697-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 07, 2023 at 10:56:51AM -0400, Waiman Long wrote: > On 7/7/23 10:07, Davidlohr Bueso wrote: > > On Thu, 06 Jul 2023, Waiman Long wrote: > > > > > It was found that running the refscale test might sometimes crash the > > > kernel with the following error: > > > > > > [ 8569.952896] BUG: unable to handle page fault for address: > > > ffffffffffffffe8 > > > [ 8569.952900] #PF: supervisor read access in kernel mode > > > [ 8569.952902] #PF: error_code(0x0000) - not-present page > > > [ 8569.952904] PGD c4b048067 P4D c4b049067 PUD c4b04b067 PMD 0 > > > [ 8569.952910] Oops: 0000 [#1] PREEMPT_RT SMP NOPTI > > > [ 8569.952916] Hardware name: Dell Inc. PowerEdge R750/0WMWCR, BIOS > > > 1.2.4 05/28/2021 > > > [ 8569.952917] RIP: 0010:prepare_to_wait_event+0x101/0x190 > > > ?: > > > [ 8569.952940] Call Trace: > > > [ 8569.952941]? > > > [ 8569.952944]? ref_scale_reader+0x380/0x4a0 [refscale] > > > [ 8569.952959]? kthread+0x10e/0x130 > > > [ 8569.952966]? ret_from_fork+0x1f/0x30 > > > [ 8569.952973]? > > > > > > This is likely caused by the fact that init_waitqueue_head() is called > > > after the ref_scale_reader kthread is created. So the kthread may try > > > to use the waitqueue head before it is properly initialized. Fix this > > > by initializing the waitqueue head first before kthread creation. > > > > > > Fixes: 653ed64b01dc ("refperf: Add a test to measure performance of > > > read-side synchronization") > > > Signed-off-by: Waiman Long > > > > Strange this wasn't reported sooner. > > Red Hat does have a pretty large QE organization that run all sort of tests > include this one pretty frequently. The race window is pretty small, but > they did hit this once in a while. I do run this fairly frequently, but haven't managed to hit it. Good show on making it happen, and looking forward to the updated patch! Thanx, Paul