Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3111928ybl; Mon, 19 Aug 2019 12:24:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgwrIeqaeyKyKfmKzGTQ0y03iwT4unbdRIx+6n88w5L6dDsZRq9+6Eo6osjuD81neFP2Ho X-Received: by 2002:a62:7912:: with SMTP id u18mr27122819pfc.254.1566242647118; Mon, 19 Aug 2019 12:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566242647; cv=none; d=google.com; s=arc-20160816; b=Kut04wVYghyWcM1zBx0s+0YqB/hMSR1WZrnozabW4iwVtEsolpoKgrEBg3MuSSdmS/ k9RZySmBFYIBC1mwOCBz2L5wF0yC6qsehBf/NmV8Df+SeXwBcPrJ0rs90NvAsONhrjoe 4Wq+0uPL9HCoX/Xf9pbaYZcWN8ezXGnc7JEAC6C16vHB7pK240A0AqBzpf9tidKOTkMQ mLKmYyVpnZFFip8SC6FFHpIHUJcXChznhQrVhVlShc6a1nm/WfRHoowtIQ2SiRmBByoY /cIa3mrMdhUKWKjBXodawWvpaVpq3qN3QIAgNZzq8mTxsJrFqe2XSvnojHKyorDrGaVf +yEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=shxcrLkfsEBrioelSH6w3/c8mD/d7vbUGU0p8dS0ws0=; b=IByB0mCcsOr7KIyGxpjV/H+2dPyFvARqZ/Ld0suBs0UAU4B8vdrXhPQMEwPFvAPuod mfU+dLG9VGTzEVjfzJfGH/z+uBwpNBeW8I5ZEaLDk1cY/WCjMkdrdGL8vDMBNyUeCKk7 Rc7pWQVZbD+9NzoDyKnID6HJ3B9/Yp5cX4/E/w+0qlIFjKTcO72u07nTTbyCDTDnb/hi 55rJDy1VF5kWSIcJygZVPSD14g5s911w//SCAKBjyQUCmXxLg/pEWhPPMP5LcQR9MdfY gurKSz7WB4DCnT8Fw7XQO90kM1UpijYIJyqupIZBzANkik2/EWbdSqOO/Cg1cYPxZSJ6 lxLw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si10423600plu.126.2019.08.19.12.23.51; Mon, 19 Aug 2019 12:24:07 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728456AbfHSTWi (ORCPT + 99 others); Mon, 19 Aug 2019 15:22:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36422 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728343AbfHSTWi (ORCPT ); Mon, 19 Aug 2019 15:22:38 -0400 Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A95236CFC3 for ; Mon, 19 Aug 2019 19:22:37 +0000 (UTC) Received: by mail-lf1-f69.google.com with SMTP id y24so695396lfh.5 for ; Mon, 19 Aug 2019 12:22:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=shxcrLkfsEBrioelSH6w3/c8mD/d7vbUGU0p8dS0ws0=; b=DmAZizPjLfGaeD1LF4or1nMzSxkAnlu2GDNmR87NNWdjIHpgdJpUp9K/HJYBVx29DJ X+dF2gJ4wQ+V+Clbt+t6owb2xVstcnoXoVbSXgRaaG9P+LTxxY48lkVkBrTlmEmV0tGA wsD8Irm5Q5UEW9Kh4DJVCfaL5p90As+CsuTUfu8VHiDPB39cjXVLSxq1mjzhZz/f7cnJ VC6fAvlWDF68yPid7tcyI/utrXv/dFpcEeIzBRypaGW8SwOuMBrVjmFTy/EvdiW30RP/ U90Mm09xVHvqMsemfKHBhUy6ZNGuJwapQ878+YLGmhmZnKK97jm/D8damAwGnzOtHjv0 lESQ== X-Gm-Message-State: APjAAAVg6231cHYA8AZXWdWY1WFPDJ8isyOh8qSjw2Cz1U3TjeTsw614 lNWlShCKYmFoyitgoy4na70WfkAYmVMx/sRQYCVECkBFcxvzvZkTZCB7W8+aCzM6cvQoUWhpTqM cOcx26Flu1Ta57z/B4Rf+3iy5ruQij28HQ898RhzA X-Received: by 2002:a2e:91d1:: with SMTP id u17mr13041564ljg.98.1566242556198; Mon, 19 Aug 2019 12:22:36 -0700 (PDT) X-Received: by 2002:a2e:91d1:: with SMTP id u17mr13041556ljg.98.1566242555985; Mon, 19 Aug 2019 12:22:35 -0700 (PDT) MIME-Version: 1.0 References: <1d18de74-76e3-823c-7480-fad1d6012026@molgen.mpg.de> In-Reply-To: <1d18de74-76e3-823c-7480-fad1d6012026@molgen.mpg.de> From: Bhupesh Sharma Date: Tue, 20 Aug 2019 00:52:23 +0530 Message-ID: Subject: Re: Brocken/incomplete `/proc/vmcore` To: Paul Menzel Cc: Dave Young , Baoquan He , Vivek Goyal , kexec mailing list , Donald Buczek , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, On Mon, Aug 19, 2019 at 1:59 PM Paul Menzel wrote: > > Dear Linux folks, > > > Using Linux 4.19.57 (configuration attached), crashing the system, and > starting it using the same Linux kernel as crash kernel, the available > `/proc/vmcore` seems to be incomplete. > > Running GDB commands, working with `/proc/kcore`, do not work with > `/proc/vmcore`, and the addresses are not there. > > In the running system, iterating through the tasks works. > > ``` > macro define offsetof(type, member) ((size_t)(&((type *)0)->member)) > macro define container_of(ptr,type,member) ((type *)((size_t)ptr-offsetof(type,member))) > ``` > > ### /proc/kcore ### > > ``` > Core was generated by `BOOT_IMAGE=/boot/bzImage-4.19.57.mx64.286 root=LABEL=root ro crashkernel=512M c'. > #0 0x0000000000000000 in irq_stack_union () > (gdb) source gdb-macros.txt > (gdb) set $t=&init_task > (gdb) print $t->tasks > $1 = {next = 0xffff889ffbb0f080, prev = 0xffff88bff9b09300} > (gdb) print $t->pid > $2 = 0 > (gdb) set $t=container_of($t->tasks->next,struct task_struct,tasks) > (gdb) print $t->tasks > $3 = {next = 0xffff889ffbb0e340, prev = 0xffffffff82411a80 } > (gdb) print $t->pid > $4 = 1 > (gdb) set $t=container_of($t->tasks->next,struct task_struct,tasks) > (gdb) print $t->tasks > $5 = {next = 0xffff889ffbb530c0, prev = 0xffff889ffbb0f080} > (gdb) print $t->pid > $6 = 2 > ``` > > ### /proc/vmcore ### > > After the crash by SysRQ trigger, values in `/proc/vmcore` are incorrect. > > ``` > (gdb) set $t=&init_task > (gdb) print $t->tasks > $1 = {next = 0xffff889ffbb0f080, prev = 0xffff88bff9b09300} > (gdb) print $t->pid > $2 = 0 > (gdb) set $t=container_of($t->tasks->next,struct task_struct,tasks) > (gdb) print $t->tasks > $3 = {next = 0x0 , prev = 0x0 } > (gdb) print $t->pid > $4 = 0 > ``` > > We can reproduce this in a virtual machine and on a big server. Looking at the attached config file it seems the underlying arch is x86_64, but there are a few things missing from your email which can help suggest solutions better: 1. Can you please share bootargs provided to the kdump kernel, 2. Please share the kexec-tools version that you are using: $ kexec --version 3. Do you notice any specific warning/error messages on the console when the second (kdump) kernel executes - better still if you can share a snippet of the second kernel's console messages - it will further help in suggesting debug points for this issue. Thanks, Bhupesh