Bug 1718417
| Summary: | please backport fix for 'p' command regression | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Dave Wysochanski <dwysocha> | ||||
| Component: | crash | Assignee: | Dave Anderson <anderson> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Emma Wu <xiawu> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 8.0 | CC: | ruyang | ||||
| Target Milestone: | rc | Keywords: | Regression, Reproducer | ||||
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | crash-7.2.6-2.el8 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-11-05 20:53:48 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: | 1690227 | ||||||
| Attachments: |
|
||||||
Thanks Dave A!.
QE - simple test to verify:
1. Run live crash
2. print any pointer as below such as task_struct of 'crash' executable with no spaces between the parenthesis and the pointer
FAILS:
[root@rhel8u0-node1-beta ~]# rpm -q crash
crash-7.2.6-1.el8.x86_64
KERNEL: /usr/lib/debug/lib/modules/4.18.0-80.el8.x86_64/vmlinux
DUMPFILE: /proc/kcore
CPUS: 1
DATE: Mon Jun 10 15:46:36 2019
UPTIME: 4 days, 06:41:32
LOAD AVERAGE: 0.49, 0.28, 0.12
TASKS: 125
NODENAME: rhel8u0-node1-beta.dwysocha.net
RELEASE: 4.18.0-80.el8.x86_64
VERSION: #1 SMP Wed Mar 13 12:02:46 UTC 2019
MACHINE: x86_64 (1795 Mhz)
MEMORY: 4 GB
PID: 29722
COMMAND: "crash"
TASK: ffff888596b9af80 [THREAD_INFO: ffff888596b9af80]
CPU: 0
STATE: TASK_RUNNING (ACTIVE)
crash> bt
PID: 29722 TASK: ffff888596b9af80 CPU: 0 COMMAND: "crash"
(active)
crash> p (struct task_struct *)0xffff888596b9af80
A syntax error in expression, near `0xffff888596b9af80'.
p: gdb request failed: p (struct task_struct *)0xffff888596b9af80 0xffff888596b9af80
crash>
PASS:
crash> [root@rhel8u0-node1-beta ~]# rpm -q crash
crash-7.2.6-2.el8.x86_64
[root@rhel8u0-node1-beta ~]# crash
...
KERNEL: /usr/lib/debug/lib/modules/4.18.0-80.el8.x86_64/vmlinux
DUMPFILE: /proc/kcore
CPUS: 1
DATE: Mon Jun 10 15:48:41 2019
UPTIME: 4 days, 06:43:37
LOAD AVERAGE: 0.59, 0.33, 0.15
TASKS: 126
NODENAME: rhel8u0-node1-beta.dwysocha.net
RELEASE: 4.18.0-80.el8.x86_64
VERSION: #1 SMP Wed Mar 13 12:02:46 UTC 2019
MACHINE: x86_64 (1795 Mhz)
MEMORY: 4 GB
PID: 29789
COMMAND: "crash"
TASK: ffff888596b9af80 [THREAD_INFO: ffff888596b9af80]
CPU: 0
STATE: TASK_RUNNING (ACTIVE)
crash> bt
PID: 29789 TASK: ffff888596b9af80 CPU: 0 COMMAND: "crash"
(active)
crash> px (struct task_struct *)0xffff888596b9af80
$1 = (struct task_struct *) 0xffff888596b9af80
crash>
Actually, a better test of your upstream patch would be to have an "-" in
the gdb expression, with a double set of parentheses like this:
crash> set 1
PID: 1
COMMAND: "systemd"
TASK: ffff928cba240000 [THREAD_INFO: ffff928cba1cc000]
CPU: 1
STATE: TASK_INTERRUPTIBLE
crash>
crash> p ((struct task_struct *)0xffff928cba240000)->pid
p: invalid option -- '>'
p: invalid option -- 'p'
p: invalid option -- 'i'
Usage:
p [-x|-d][-u] [expression | symbol[:cpuspec]]
Enter "help p" for details.
crash>
With the patch applied:
crash> set 1
PID: 1
COMMAND: "systemd"
TASK: ffff928cba240000 [THREAD_INFO: ffff928cba1cc000]
CPU: 1
STATE: TASK_INTERRUPTIBLE
crash>
crash> p ((struct task_struct *)0xffff928cba240000)->pid
$3 = 1
crash>
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, 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-2019:3349 |
Created attachment 1578406 [details] commit b1a6e13a93661dfae7df15fe32862bddf4026c80 Description of problem: Please backport the attached patch to RHEL8 as soon as reasonable. commit b1a6e13a93661dfae7df15fe32862bddf4026c80 Author: Dave Anderson <anderson> Date: Tue May 21 14:09:13 2019 -0400 Fix for a crash-7.2.6 regression to the "p" command. Without the patch, a gdb pass-through command construct such as: p ((struct zone *)0xffff901e3ffda000)->min_slab_pages gets parsed incorrectly, and the "-" is mistaken for an argument option, and each of the subsequent characters are marked as an "invalid option". (dwysocha) Version-Release number of selected component (if applicable): crash-7.2.6-1.el8.x86_64 How reproducible: Every time Steps to Reproduce: See patch or try to print a member of a struct with the print command by casting the pointer. Actual results: crash error Expected results: no crash error Additional info: Not sure if this was planned on next build but filing this in case it was forgotten. Thanks.