Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2037546

Summary: The crash “timer -r” command does not print all the per-CPU clocks in RHEL 8.
Product: Red Hat Enterprise Linux 8 Reporter: vlovejoy
Component: crashAssignee: lijiang
Status: CLOSED ERRATA QA Contact: Ruowen Qin <ruqin>
Severity: high Docs Contact:
Priority: medium    
Version: 8.4CC: dwysocha, jieli, lijiang, ruyang, xiawu, yiyan
Target Milestone: rcKeywords: Triaged
Target Release: 8.6Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: crash-7.3.1-5.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:55:49 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:

Description vlovejoy 2022-01-05 20:53:16 UTC
Description of problem:

In RHEL 8 the hrtimer_cpu_base struct now contains 8 hrtimer_clock_base ‘s and crash timer cmd does not account for them. It needs to be updated.


Crash version:
Crash 7.3.1++
GNU gdb (GDB) 7.6

crash> hrtimer_cpu_base
struct hrtimer_cpu_base {
    raw_spinlock_t lock;
    unsigned int cpu;
    unsigned int active_bases;
    unsigned int clock_was_set_seq;
    unsigned int hres_active : 1;
    unsigned int in_hrtirq : 1;
    unsigned int hang_detected : 1;
    unsigned int softirq_activated : 1;
    unsigned int nr_events;
    unsigned short nr_retries;
    unsigned short nr_hangs;
    unsigned int max_hang_time;
    spinlock_t softirq_expiry_lock;
    atomic_t timer_waiters;
    ktime_t expires_next;
    struct hrtimer *next_timer;
    ktime_t softirq_expires_next;
    struct hrtimer *softirq_next_timer;
    struct hrtimer_clock_base clock_base[8];   <----
}
SIZE: 0x480
crash> 


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

Crash version:
Crash 7.3.1++
GNU gdb (GDB) 7.6

How reproducible:
always.

Steps to Reproduce:
1.run crash on a rhel8 dump.
2.
3.

Actual results:


Expected results:


Additional info:

Example from dump:

Dump files:
     KERNEL: /cores/retrace/repos/kernel/x86_64/usr/lib/debug/lib/modules/4.18.0-305.19.1.rt7.91.el8_4.x86_64/vmlinux  [TAINTED]
    DUMPFILE: /cores/retrace/tasks/510256984/crash/vmcore  [PARTIAL DUMP]


Timer cmd:

crash> timer -r -C 11
CPU: 11  HRTIMER_CPU_BASE: ffff8f829f95ee00
  CLOCK: 0  HRTIMER_CLOCK_BASE: ffff8f829f95ee80  [ktime_get]
  (empty)

  CLOCK: 1  HRTIMER_CLOCK_BASE: ffff8f829f95ef00  [ktime_get_real]
  (empty)

  CLOCK: 2  HRTIMER_CLOCK_BASE: ffff8f829f95ef80  [ktime_get_boottime]
  (empty)
crash> 



In this dump we are actually waiting for a timer on CPU 11 clock 4 to be run.

I hard coded the clocks to show all 8 of them.
 
Same dump:
crash-vl> sys
      KERNEL: /cores/retrace/repos/kernel/x86_64/usr/lib/debug/lib/modules/4.18.0-305.19.1.rt7.91.el8_4.x86_64/vmlinux
    DUMPFILE: /cores/retrace/tasks/510256984/crash/vmcore  [PARTIAL DUMP]



Now you can see the timers we are waiting on clock 4 and 5.

crash-vl> timer -r -C 11
CPU: 11  HRTIMER_CPU_BASE: ffff9a775f95ee00
  CLOCK: 0  HRTIMER_CLOCK_BASE: ffff9a775f95ee80  [ktime_get]
  (empty)

  CLOCK: 1  HRTIMER_CLOCK_BASE: ffff9a775f95ef00  [ktime_get_real]
  (empty)

  CLOCK: 2  HRTIMER_CLOCK_BASE: ffff9a775f95ef80  [ktime_get_boottime]
  (empty)

  CLOCK: 3  HRTIMER_CLOCK_BASE: ffff9a775f95f000  [ktime_get_clocktai]
  (empty)

  CLOCK: 4  HRTIMER_CLOCK_BASE: ffff9a775f95f080  [ktime_get]
      CURRENT   
  48114047000000
    SOFTEXPIRES       EXPIRES          TTE          HRTIMER           FUNCTION    
  48048203002814  48048203052814  -65843947186  ffffae5889f67e78  ffffffff96770fa0  <hrtimer_wakeup>

  CLOCK: 5  HRTIMER_CLOCK_BASE: ffff9a775f95f100  [ktime_get_real]
        CURRENT      
  1640021151290259551
      SOFTEXPIRES            EXPIRES             TTE          HRTIMER           FUNCTION    
  1640021064148260307  1640021064148310307  -87141949244  ffffae588a9c7d30  ffffffff96770fa0  <hrtimer_wakeup>

  CLOCK: 6  HRTIMER_CLOCK_BASE: ffff9a775f95f180  [ktime_get_boottime]
  (empty)

  CLOCK: 7  HRTIMER_CLOCK_BASE: ffff9a775f95f200  [ktime_get_clocktai]
  (empty)
crash-vl> 


The real issue in the dump is that they are late but that has nothing to do with  crash’s timer cmd.

Comment 10 errata-xmlrpc 2022-05-10 13:55:49 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-2022:1864