Bug 1839850

Summary: 'sys' command causes subsequent 'set scope' commands to fail
Product: Red Hat Enterprise Linux 8 Reporter: John Pittman <jpittman>
Component: crashAssignee: lijiang
Status: CLOSED ERRATA QA Contact: xiaoying yan <yiyan>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: bubrown, kdump-bugs, ruyang, xiawu, yiyan
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: crash-7.3.0-2.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1895235 (view as bug list) Environment:
Last Closed: 2021-11-09 18:08:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1674330, 1853986, 1894575, 1895235    

Description John Pittman 2020-05-25 18:50:47 UTC
Description of problem:

'sys' command causes subsequent 'set scope' commands to fail

Version-Release number of selected component (if applicable):

crash-7.2.7-2.el8.x86_64

How reproducible:

every time

Steps to Reproduce:

Using the procedure from bz1811208.

- Can't set scope for some reason:

crash> set scope st_create
set: gdb cannot find text block for address: st_create
 
- So, we need to unload and then load with the read now option:
 
crash> mod -d dm_service_time
crash> mod -sr dm_service_time /cores/retrace/repos/kernel/x86_64/usr/lib/debug/lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/md/dm-service-time.ko.debug
     MODULE       NAME                            SIZE  OBJECT FILE
ffffffffc044f0a0  dm_service_time                12889  /cores/retrace/repos/kernel/x86_64/usr/lib/debug/lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/md/dm-service-time.ko.debug

- Working fine:

crash> set scope st_create
scope: ffffffffc044d270 (st_create)
crash> set scope st_create
scope: ffffffffc044d270 (st_create)
 
- Now just running a simple sys command:
 
crash> sys
      KERNEL: /cores/retrace/repos/kernel/x86_64/usr/lib/debug/lib/modules/3.10.0-957.el7.x86_64/vmlinux
    DUMPFILE: /cores/retrace/tasks/424443120/crash/vmcore  [PARTIAL DUMP]
        CPUS: 48
        DATE: Sat Aug  3 11:41:00 2019
      UPTIME: 1 days, 10:28:48
LOAD AVERAGE: 2.95, 1.02, 0.40
       TASKS: 1060
    NODENAME: iop053063.lss.emc.com
     RELEASE: 3.10.0-957.el7.x86_64
     VERSION: #1 SMP Thu Oct 4 20:48:51 UTC 2018
     MACHINE: x86_64  (2999 Mhz)
      MEMORY: 127.9 GB
       PANIC: "SysRq : Trigger a crash"
 
- Scope set failing again:
 
crash> set scope st_create
set: gdb cannot find text block for address: st_create
 
- Now can't even fix w/ read now option
 
crash> mod -d dm_service_time
crash> mod -sr dm_service_time /cores/retrace/repos/kernel/x86_64/usr/lib/debug/lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/md/dm-service-time.ko.debug
     MODULE       NAME                            SIZE  OBJECT FILE
ffffffffc044f0a0  dm_service_time                12889  /cores/retrace/repos/kernel/x86_64/usr/lib/debug/lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/md/dm-service-time.ko.debug
crash> set scope st_create
set: gdb cannot find text block for address: st_create

Comment 2 Dave Anderson 2020-05-26 20:49:00 UTC
I'm not sure what's causing the set command to act differently, but I copied the
vmlinux/vmcore pair and the target module object file locally.  First I loaded it
without -readnow (mod -s), and the set scope fails.  I then delete the module, and
reload it with -readnow (mod -rs), and the set scope works OK.  I ran "sys", and all
subsequent set scope operations work OK:

  $ crash vmlinux vmcore
  
  crash 7.2.8
  Copyright (C) 2002-2020  Red Hat, Inc.
  Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
  Copyright (C) 1999-2006  Hewlett-Packard Co
  Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
  Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
  Copyright (C) 2005, 2011  NEC Corporation
  Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
  Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
  This program is free software, covered by the GNU General Public License,
  and you are welcome to change it and/or distribute copies of it under
  certain conditions.  Enter "help copying" to see the conditions.
  This program has absolutely no warranty.  Enter "help warranty" for details.
   
  GNU gdb (GDB) 7.6
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-unknown-linux-gnu"...
  
  WARNING: kernel relocated [58MB]: patching 85605 gdb minimal_symbol values
  
        KERNEL: vmlinux                                                  
      DUMPFILE: vmcore  [PARTIAL DUMP]
          CPUS: 48
          DATE: Sat Aug  3 11:41:00 2019
        UPTIME: 1 days, 10:28:48
  LOAD AVERAGE: 2.95, 1.02, 0.40
         TASKS: 1060
      NODENAME: iop053063.lss.emc.com
       RELEASE: 3.10.0-957.el7.x86_64
       VERSION: #1 SMP Thu Oct 4 20:48:51 UTC 2018
       MACHINE: x86_64  (2999 Mhz)
        MEMORY: 127.9 GB
         PANIC: "SysRq : Trigger a crash"
           PID: 189250
       COMMAND: "bash"
          TASK: ffff924c30e3a080  [THREAD_INFO: ffff924c133c0000]
           CPU: 5
         STATE: TASK_RUNNING (SYSRQ)
  
  crash> mod -s dm_service_time
       MODULE       NAME                            SIZE  OBJECT FILE
  ffffffffc044f0a0  dm_service_time                12889  /home/anderson/dm-service-time.ko.debug 
  crash> set scope st_create
  set: gdb cannot find text block for address: st_create
  crash> mod -d dm_service_time
  crash> mod -sr dm_service_time
       MODULE       NAME                            SIZE  OBJECT FILE
  ffffffffc044f0a0  dm_service_time                12889  /home/anderson/dm-service-time.ko.debug 
  crash> set scope st_create
  scope: ffffffffc044d270 (st_create)
  crash> sys
        KERNEL: vmlinux
      DUMPFILE: vmcore  [PARTIAL DUMP]
          CPUS: 48
          DATE: Sat Aug  3 11:41:00 2019
        UPTIME: 1 days, 10:28:48
  LOAD AVERAGE: 2.95, 1.02, 0.40
         TASKS: 1060
      NODENAME: iop053063.lss.emc.com
       RELEASE: 3.10.0-957.el7.x86_64
       VERSION: #1 SMP Thu Oct 4 20:48:51 UTC 2018
       MACHINE: x86_64  (2999 Mhz)
        MEMORY: 127.9 GB
         PANIC: "SysRq : Trigger a crash"
  crash> set scope st_create
  scope: ffffffffc044d270 (st_create)
  crash>

Comment 23 errata-xmlrpc 2021-11-09 18:08:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (crash bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4199