Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1498800pxb; Fri, 20 Nov 2020 10:59:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7Kd8S0S11j8xbcPZTJO822QCLMf1WKAhjTDFyKaqGjQWd55f90Njwcl9PtGDH0nwFsEqP X-Received: by 2002:a17:906:60d0:: with SMTP id f16mr2357184ejk.148.1605898769489; Fri, 20 Nov 2020 10:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605898769; cv=none; d=google.com; s=arc-20160816; b=kQO+iOysL07VWjCDd/OMuJvOCvZFGufvpUMhP4FYnfFndk4y+JkOWwI2C/UGpcvWeJ AmvcxD3aix+0Q97v2qzXNWsdbiO1OwQZ1gKgGBLTcZ39rEe2SrFKX3NJg+x5wYjr2kMw cJIPVU1RWqsypgtZIhgOpqI6PqBjthJiLWBRhHNGtm4hf3Mxjrgt7baBscYtxfrhtcei l8+7vl2Ayw7M4D/Pglr1aFYtM3N81cxexdNL9ooMhQjPplj3O5KkwsYNEGJ3wrJ7d5is A2SBTGQkfFugZkBW35db9PWHCWp4q2ul0ex8+U/7nPQab4Bu4Qah2SRHo8cQmVDfsMF4 xNkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=IAtoyrDzIMMkgIMZ2uA1CJV+7zHu4CtdMhcpEZb0GbY=; b=0pT15uVuuFLBigfkfdHCYYsSATfY5FrGBM0uYLmb/QsY9J2/AeG5FkydzczDfy9Lob IhXbz9iPrUrdK/lOUy9uy161RMw7VrwiwE7cR/GiOftn05r8bV2e/bA6tGbtf7gFGdjY S4A6mURKQS6F1WIKS6QOmuU6UNyHoNTWl3ToLeWwypvWi5e+HRzzljmJFnI9i+J5Tl3q JywHGPfj2YFtdfasAZAWwGBmq+GtLwmw/pc+V2qv8GXONsLVqcmUhJC9izNIuImawKdP NvCLuZNh3/hCowA+Yj5myNZ2jasqqsItzcesHJy1wJb3HjGaGTXZO7I2jqi/+417ycmR euUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si2134491ejb.369.2020.11.20.10.59.06; Fri, 20 Nov 2020 10:59:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730041AbgKTS5h (ORCPT + 99 others); Fri, 20 Nov 2020 13:57:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:36134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728378AbgKTS5h (ORCPT ); Fri, 20 Nov 2020 13:57:37 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F2AD22464; Fri, 20 Nov 2020 18:57:35 +0000 (UTC) Date: Fri, 20 Nov 2020 13:57:33 -0500 From: Steven Rostedt To: Marco Elver Cc: "Paul E. McKenney" , Anders Roxell , Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Jann Horn , Mark Rutland , Linux Kernel Mailing List , Linux-MM , kasan-dev , rcu@vger.kernel.org, Peter Zijlstra , Tejun Heo , Lai Jiangshan , linux-arm-kernel@lists.infradead.org Subject: Re: linux-next: stall warnings and deadlock on Arm64 (was: [PATCH] kfence: Avoid stalling...) Message-ID: <20201120135733.0807c20f@gandalf.local.home> In-Reply-To: <20201120181737.GA3301774@elver.google.com> References: <20201118225621.GA1770130@elver.google.com> <20201118233841.GS1437@paulmck-ThinkPad-P72> <20201119125357.GA2084963@elver.google.com> <20201119151409.GU1437@paulmck-ThinkPad-P72> <20201119170259.GA2134472@elver.google.com> <20201119184854.GY1437@paulmck-ThinkPad-P72> <20201119193819.GA2601289@elver.google.com> <20201119213512.GB1437@paulmck-ThinkPad-P72> <20201120141928.GB3120165@elver.google.com> <20201120102613.3d18b90e@gandalf.local.home> <20201120181737.GA3301774@elver.google.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Nov 2020 19:17:37 +0100 Marco Elver wrote: > | # cat /sys/kernel/tracing/recursed_functions > | trace_selftest_test_recursion_func+0x34/0x48: trace_selftest_dynamic_test_func+0x4/0x28 > | el1_irq+0xc0/0x180: gic_handle_irq+0x4/0x108 > | gic_handle_irq+0x70/0x108: __handle_domain_irq+0x4/0x130 > | __handle_domain_irq+0x7c/0x130: irq_enter+0x4/0x28 > | trace_rcu_dyntick+0x168/0x190: rcu_read_lock_sched_held+0x4/0x98 > | rcu_read_lock_sched_held+0x30/0x98: rcu_read_lock_held_common+0x4/0x88 > | rcu_read_lock_held_common+0x50/0x88: rcu_lockdep_current_cpu_online+0x4/0xd0 > | irq_enter+0x1c/0x28: irq_enter_rcu+0x4/0xa8 > | irq_enter_rcu+0x3c/0xa8: irqtime_account_irq+0x4/0x198 > | irq_enter_rcu+0x44/0xa8: preempt_count_add+0x4/0x1a0 > | trace_hardirqs_off+0x254/0x2d8: __srcu_read_lock+0x4/0xa0 > | trace_hardirqs_off+0x25c/0x2d8: rcu_irq_enter_irqson+0x4/0x78 > | trace_rcu_dyntick+0xd8/0x190: __traceiter_rcu_dyntick+0x4/0x80 > | trace_hardirqs_off+0x294/0x2d8: rcu_irq_exit_irqson+0x4/0x78 > | trace_hardirqs_off+0x2a0/0x2d8: __srcu_read_unlock+0x4/0x88 These look normal. They happen when an interrupt occurs while tracing something with interrupts enabled, and the interrupt traces a function before it sets the "preempt_count" to reflect that its in a new context. That is: normal_context: func_A(); trace_function(); irq_enter(); trace_function() if (int_interrupt()) [returns false] set_preempt_count (in interrupt) And the recursion detection is tricked into thinking it recursed in the same context. The lastest code handles this by allowing one level of recursion: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b02414c8f045ab3b9afc816c3735bc98c5c3d262 -- Steve