Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1688381lqo; Sun, 12 May 2024 13:50:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0FeDS0+zTKJYGEP2jc8QC0T2fvD1eM9l8YrFRvRHAz0U9ai6V2ayQ69ViNqredzks0HjlJ5jIhHlrFVgCubVcL9ZbkvCdAjfpJMonMA== X-Google-Smtp-Source: AGHT+IGV+ryRC3fdqXExW9k4oUtR+SEq+X3GPZmz8qFOGW3aWQyJBuGVB0L5j/541Od328VTTNTn X-Received: by 2002:a17:906:3c10:b0:a59:cc9b:d6f8 with SMTP id a640c23a62f3a-a5a2d5cca1cmr742798966b.39.1715547043880; Sun, 12 May 2024 13:50:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715547043; cv=pass; d=google.com; s=arc-20160816; b=lvNePNl5BO4QMwZX0bhDmG3h7hBll14DpjUNGoyrYarkkotqphGmMZ2u/mg6Rd+gjH lNbGnZuhaEzWTYkDVHOWLP+zSUWGQgrWuipcd9CbPo8UyBJHQbIi0pRp0Ok2I/UXfQz2 IFe68T+zbTXPkxGinP+5mfScjrChtli40c5yErXAbVzgfrMcjGuTve8tS/LbMh/AhmLZ jyq/+lmZpciUMoXl/HKYUpq4b0h5J2facq/XYQs0wMUm7IZ16XAyYGzZnlzJ5cNiEc0z ovsPL7GBl8NT6CVIKUNnY8tRhkmc1oAvvAmp3APqhulz3ZAGedC6GfWisfjsrpZmkFr9 vlvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=bCl1PyZjFro/Rm4AJnAJ16YD5mtSBLN9tWzUw4P6UJk=; fh=5Ey7R9hrMCpjvDREFuL2YerFIsKIK1xNvcsvOcso1u8=; b=rVIBkE1A9WM+7zEnghZqZTUcA6nxSVF5LKlSF59fd2Maep/dqtqUfMOyuiK4XVcUAG XbY+UX3uQvxC9Ex1ifgNRb4V4Kcmv16/AIQpFEEsNb+lnae7kbmxCKGDqfTvF28B9xMA CvLC9mMRHe9NUe4WE9USnvTohZmziPES9Ra1z35mYGia4hdIP9yHkHTAdUE2NIqnbfI8 c8AQOZlpB3omQaDo0X79ijBa9l92ldBZyYCuRIYGZhQpIYBGaKKFOG2BSGNMpw49kNzE hCSiRnyxePJfdkRFAE0jOjcQME0or+SHNyAZ2uxN/sFn9n+mDI85wF1QzkQ4HBsbtO8F ydtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@treblig.org header.s=bytemarkmx header.b=slWq8uBA; arc=pass (i=1 spf=pass spfdomain=treblig.org dkim=pass dkdomain=treblig.org dmarc=pass fromdomain=treblig.org); spf=pass (google.com: domain of linux-kernel+bounces-177005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=treblig.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba3905si422469366b.624.2024.05.12.13.50.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 13:50:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@treblig.org header.s=bytemarkmx header.b=slWq8uBA; arc=pass (i=1 spf=pass spfdomain=treblig.org dkim=pass dkdomain=treblig.org dmarc=pass fromdomain=treblig.org); spf=pass (google.com: domain of linux-kernel+bounces-177005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=treblig.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 98FB51F21DA9 for ; Sun, 12 May 2024 20:50:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CDFF2561B; Sun, 12 May 2024 20:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="slWq8uBA" Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EE76380 for ; Sun, 12 May 2024 20:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715547036; cv=none; b=Tm24+P9Y+dluvSC2leEf/rkXFPiJI8attvTZSq0BO6cYw8wHTG9J/5xjufmGUuWax7E2VxFrBeJqStfBL1oTug0Hez6a6Y259ce68QB/NbSJX4IuYC328ZMBNvsz1B99Jmfhm6QeR/8uylL5G0snrrTXJ/tUX5mVrqkwRt3L+C4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715547036; c=relaxed/simple; bh=R82jH/CTzlPxLDQ6HiMBIPXQURxxCmUDu8oOAGiCJ1U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iXcjxD07SymSH2CT8GloqfiRCRz+j0a7hwMU3I4/ABRzEE/+Nx224fk7tvlrXTuNb1TOSGAcCt8QlA29evMlFWhOZCS0/giBk2AerGqQwaMALokIp/nNOSArVQZKAb0QG/9HXErDsRB2YouEmqriQ21IFy59DxV3GxdpSq48YUY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=slWq8uBA; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=Content-Type:MIME-Version:Message-ID:Subject:From:Date:From :Subject; bh=bCl1PyZjFro/Rm4AJnAJ16YD5mtSBLN9tWzUw4P6UJk=; b=slWq8uBAkTUH6YqI PthKskQ9dsu83sTwxjyTTMnaHflfKDG2o7JhYQxS6rHqdyhmwx7+Za+7vSIRWTekVAY3446oGag9a 1ty2LpN0DJH0gvk5y9l6x0UGnii4nVnPBaek3V2z7OG/4yFG5sM5KMx1//9AYjj75efoTlXKlON8Y QxzasnxhsYZ2InZoMSEg1PXuGjaUkuaXvhYohNEXGbERdqdeYPXCjGphXFNe/IMnAcnwXJRpHjOTT fOGmPSFfvQq9ImvahV9MbYoOcDyU7styOmr+t9hWda1q/q6MSnIbTuJZ+TkPwqSgXfY8kJ+HTHrDO wgKz6EXFMC+Jf0WYow==; Received: from dg by mx.treblig.org with local (Exim 4.96) (envelope-from ) id 1s6G9I-000cZr-1J; Sun, 12 May 2024 20:50:24 +0000 Date: Sun, 12 May 2024 20:50:24 +0000 From: "Dr. David Alan Gilbert" To: Muni Sekhar Cc: kernelnewbies , LKML Subject: Re: Inquiry Regarding Handling of Kernel Crashes Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: X-Chocolate: 70 percent or better cocoa solids preferably X-Operating-System: Linux/6.1.0-21-amd64 (x86_64) X-Uptime: 20:42:25 up 4 days, 7:56, 1 user, load average: 0.09, 0.03, 0.01 User-Agent: Mutt/2.2.12 (2023-09-09) * Muni Sekhar (munisekharrms@gmail.com) wrote: > Dear Linux Kernel Community, Hi, > I hope this email finds you well. I am currently engaged in testing > device drivers in Linux kernel mode, and I have encountered various > types of kernel crashes during my testing process. > > Among these, some examples of kernel crashes include OOPS, lockups and others. > > I have a few questions regarding the handling of kernel crashes during testing: > > When encountering a kernel crash during testing, is it advisable to > continue testing without rebooting the system? Or is it preferable to > reboot the system after each kernel crash and then resume testing? Rebooting is best. > Can the first kernel crash, whether it is an OOPS, or any other type > crash, potentially lead to subsequent crashes of the same or different > types? If so, should debugging efforts focus only on the first kernel > crash, or should all subsequent crashes also be considered and > addressed? Yes - not all failures do that, but some will cause follow on crashes; looking at the first crash normally gives the most reliable idea of what went wrong. But keep all the logs, anything might help you figure it out. > In the event that the system needs to be rebooted after a kernel > crash, how can user space test utilities be informed that a kernel > crash has occurred? Additionally, how can the system be configured to > automatically reboot in the event of a kernel crash? See Documentation/admin-guide/kernel-parameters.txt there are quite a few useful ones, in particular: oops=panic will cause a panic after an oops which when you combine it with panic=30 means an oops will then cause a panic which causes a reboot. You could also consider using a 'crash kernel' - on a panic that lands in a fresh kernel that just saves a memory snapshot that you can then try and debug. Turning on a watchdog as well is good; some kernel bugs just hang rather than giving a nice oops. > I would greatly appreciate any insights or best practices you can > share regarding the handling of kernel crashes during testing. Your > expertise and guidance on this matter would be invaluable to my > testing efforts. > > Thank you very much for your time and assistance. I look forward to > your response. Good luck! Dave > > > -- > Thanks, > Sekhar > -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/