Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp534188ybm; Fri, 29 May 2020 06:19:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKy0AgiHLRIh0LUpLSpciqfo6Ht0f+UbWyrTrW5xt1rU8h/r8yyKqfRcZhefrwAXYxScOz X-Received: by 2002:aa7:c607:: with SMTP id h7mr8426377edq.214.1590758358006; Fri, 29 May 2020 06:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590758357; cv=none; d=google.com; s=arc-20160816; b=pPgFWCA4fHDEIY5AbmS4ahU72ZM7sR/2jmDrMcM5444tfEMNcxDo0U1dUosABFiDTB wpqJ/4+Z2ZbXPl01K07Ero55zpmqktKro78TNJjf3jcKpqTJzNtedNGndcmcQLyWfvUg mHgE4eDGR3GccB7y4h8YKiFJc7cV1F9p6YPlxDAVC6bct4Q7YaEh26TfUq5jqhaXaTQY t4ywIR9tXwSQYHkq2/ZZ3AAjnwdp+aUdSsd1Wmmhsl9dY/mU8EXiDL6OsnWH0QKDQm5C 9hSlq1wSwc61PSyxshcNkNyw36/QUbZ5TxLvNjXjyCPW7jTSse3+FWaYFpzIoeKTeiGj lkYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=v0k5dmwUfxxOry5LURZ3QeWQjTcU1AUC/MWTlFR6yFo=; b=pyyebkp2H/fA+zusAU61/sDDCTp1aTT4xkcARjwmBGQZ1UknAxPIc2w0q5duUkVhWw 6HtFDGDNxA+WlASrKGkZfIBpknRYm2KbXWKmzfMYs8dWDxK1Jo5YDRW47cJWhfpeINno nQjYBUnyatm9JB7QOtfnc3IdIHLCPKJmo7HJ2IdsB5AZZ0Oa3GMrpu2Boveu5u3vv1xb sjIxnax3UwerHGKkgaHqwYgPlppeJzXgiO+ZxQ1kCC90ULE6dAoMQxsi1aqra8z1Jch4 oNCeU8avG80waR9JLoeod+Y/yXZmC2lb5MNTuHP6sB39DOGh+8YuZ5OlNmkoxf/p6du8 W5OA== 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 dx2si930897ejb.170.2020.05.29.06.18.54; Fri, 29 May 2020 06:19:17 -0700 (PDT) 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 S1726954AbgE2NO4 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 29 May 2020 09:14:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgE2NO4 (ORCPT ); Fri, 29 May 2020 09:14:56 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C472C03E969; Fri, 29 May 2020 06:14:56 -0700 (PDT) Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1jeeqa-0004pv-TF; Fri, 29 May 2020 15:14:52 +0200 Date: Fri, 29 May 2020 15:14:52 +0200 From: Sebastian Andrzej Siewior To: Mark Marshall Cc: linux-rt-users , Mark Marshall , thomas.graziadei@omicronenergy.com, Thomas Gleixner , linux-kernel@vger.kernel.org, rostedt@goodmis.org Subject: Re: Kernel crash due to memory corruption with v5.4.26-rt17 and PowerPC e500 Message-ID: <20200529131452.pgj7mx7xaz7n4kz3@linutronix.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-05-04 11:40:08 [+0200], Mark Marshall wrote: > The easiest way we have found to reproduce the crash is to repeatedly > insert and then remove a module. The crash then appears to be related > to either paging in the module or in exiting the mdev process. (The > crash does also happen at other times, but it is hard to reproduce > reliably then). This simple script will almost always crash: > > for i in $(seq 1000) ; do echo $i ; modprobe crc7 ; rmmod crc7 ; done So I tried that on 5.6.14-rt7 with the qemu version of e500 (the SMP and UP version). No luck. I don't have anything with real hardware. Could you share the .config in case this is related? > (The crc7 module is chosen as it is small and simple. Any module will > work / crash). > > We have tried kernels v5.0, v5.2 and v5.6. The v5.0 and v5.2 kernels > do not show the problem. The v5.6 kernel does show the problem. > Switching of RT fixes the problem. > > I have reduced the functionality in the kernel to a bare minimum > (removing networking, USB and PCI, as we have some out-of-tree patches > in those areas) and we still get the crash. … > I have added some debugging code where the mm_struct and > vma_area_struct have "poision" values at the start and the end, and > this seems to show that the vma_area_struct is getting corrupted, but > I'm not able to see where. oh. > We have switched on all of the debugging that we can, including > KASAN, and this shows nothing. > > > Can anyone help us? What can we try next? Is anyone using the e500 > with the RT kernel? Does anyone have any idea how to debug problems > related to the error message "Bad rss-counter state"? > > Any help or advice would be most gratefully received. I don't have any ideas. You could try to apply only a part of the RT patch and see if it problem is still there. If you are lucky you find the patch that introduces the problem. If not, the problem appears with the RT switch… > Many thanks, > Mark Marshall and Thomas Graziadei Sebastian