Wrong RSS field in ps
by Michael Holzheu
Hello Dave,
On s390 (kernel 4.2.0-rc2) the "RSS" field in "ps" is wrong.
The reason is that in rss_page_types_init() enumerator_value("MM_ANONPAGES",
&anonpages) returns zero for "anonpages" and therefore we add MM_FILEPAGES
twice instead of adding MM_ANONPAGES.
Example: Process that allocated 500 MB:
ps 2152
PID PPID CPU TASK ST %MEM VSZ RSS COMM
2152 1061 4 7aff0000 IN 0.0 514024 2236 eat_mem
crash> print/x ((struct task_struct *) 0x7aff0000)->mm->rss_stat
$1 = {
count = {{
counter = 0x113
}, {
counter = 0x1f414
}, {
counter = 0x0
}}
}
Any idea why enumerator_value() is not working?
Michael
9 years, 3 months
Re: [Crash-utility] [PATCH]remind of using --zero_exlcuded
by Dave Anderson
Zhou,
This seems reasonable. I may reword it slightly, but I won't be checking it in until I return from vacation.
Thanks, Dave
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: "Zhou, Wenjian/周文剑" <zhouwj-fnst(a)cn.fujitsu.com>
Date: 07/21/2015 1:14 AM (GMT-07:00)
To: "Discussion list for crash utility usage, maintenance and development" <crash-utility(a)redhat.com>
Subject: [Crash-utility] [PATCH]remind of using --zero_exlcuded
The option --zero_excluded can be used to analyze the incomplete
dumpfile.
So it is needed to remind users of using it when trying to analyze
incomplete dumpfile without --zero_excluded.
--
Thanks
Zhou Wenjian
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
9 years, 3 months
Crash fails to analyse kernel dump from 4.2-rc4
by Qu Wenruo
Hi all,
I updated my kernel to 4.2-rc4 but suddenly crash failed to analyse the
kernel with the following error message:
------
crash: invalid kernel virtual address: 170000001d type: "possible"
WARNING: cannot read cpu_possible_map
crash: invalid kernel virtual address: 3800000046 type: "present"
WARNING: cannot read cpu_present_map
crash: invalid kernel virtual address: 240000002d type: "online"
WARNING: cannot read cpu_online_map
crash: invalid kernel virtual address: 570000006e type: "active"
WARNING: cannot read cpu_active_map
crash: cannot determine base kernel version
crash: /home/adam/linux-btrfs/vmlinux and vmcore do not match!
------
Crash 7.1.0 and 7.1.2 fails with the same error.
Previously I'm testing 4.2-rc1 kernel and 7.1.0 works like a charm.
So is there something wrong with the new kernel?
Thanks,
Qu
9 years, 3 months
[PATCH] extensions/trace: max_buffer is optional
by Rabin Vincent
max_buffer is optional in the kernel (depends on the
CONFIG_TRACE_MAX_TRACE option). Don't fail if it isn't available.
---
extensions/trace.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/extensions/trace.c b/extensions/trace.c
index 9f81568..c269f4c 100644
--- a/extensions/trace.c
+++ b/extensions/trace.c
@@ -34,6 +34,10 @@ static int encapsulated_current_trace;
* trace_buffer is supported
*/
static int trace_buffer_available;
+/*
+ * max_buffer is supported
+ */
+static int max_buffer_available;
#define koffset(struct, member) struct##_##member##_offset
@@ -163,8 +167,10 @@ static int init_offsets(void)
if (trace_buffer_available) {
init_offset(trace_array, trace_buffer);
- init_offset(trace_array, max_buffer);
init_offset(trace_buffer, buffer);
+
+ if (max_buffer_available)
+ init_offset(trace_array, max_buffer);
} else {
init_offset(trace_array, buffer);
}
@@ -448,6 +454,9 @@ out_fail:
static int ftrace_int_max_tr_trace(void)
{
if (trace_buffer_available) {
+ if (!max_buffer_available)
+ return 0;
+
global_max_buffer = global_trace + koffset(trace_array, max_buffer);
read_value(max_tr_ring_buffer, global_max_buffer, trace_buffer, buffer);
} else {
@@ -528,6 +537,9 @@ static int ftrace_init(void)
if (MEMBER_EXISTS("trace_array", "trace_buffer")) {
trace_buffer_available = 1;
+
+ if (MEMBER_EXISTS("trace_array", "max_buffer"))
+ max_buffer_available = 1;
} else {
sym_max_tr_trace = symbol_search("max_tr");
if (sym_max_tr_trace == NULL)
--
1.7.10.4
9 years, 3 months
Re: [Crash-utility] [PATCH] dis: Consolidate cmd_dis
by Dave Anderson
I'll check it out when I get back next week.
Dave
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: Aaron Tomlin <atomlin(a)redhat.com>
Date: 07/27/2015 7:40 AM (GMT-08:00)
To: crash-utility(a)redhat.com
Subject: [Crash-utility] [PATCH] dis: Consolidate cmd_dis
Hi Dave,
No functionality change (hopefully). This patch is essentially a clean up
in preparation to introduce the "-f" option.
Please let me know your thoughts.
Signed-off-by: Aaron Tomlin <atomlin(a)redhat.com>
---
kernel.c | 265 ++++++++++++++++++++++-----------------------------------------
1 file changed, 91 insertions(+), 174 deletions(-)
diff --git a/kernel.c b/kernel.c
index 73d1983..3107014 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1589,212 +1589,129 @@ cmd_dis(void)
return;
}
- do_load_module_filter = module_symbol(req->addr, NULL, NULL,
- NULL, *gdb_output_radix);
+ req->command = GNU_RESOLVE_TEXT_ADDR;
+ gdb_interface(req);
+ req->flags &= ~GNU_COMMAND_FAILED;
+ if (reverse || req->flags & GNU_FUNCTION_ONLY) {
+ if (sp) {
+ savename = sp->name;
+ if ((sp = next_symbol(NULL, sp)))
+ req->addr2 = sp->value;
+ else
+ error(FATAL,
+ "unable to determine symbol after %s\n",
+ savename);
+ } else {
+ if ((sp = value_search(req->addr, NULL))
+ && (sp = next_symbol(NULL, sp)))
+ req->addr2 = sp->value;
+ else
+ error(FATAL, dis_err, req->addr);
+ }
+ }
- if (!reverse) {
- req->command = GNU_RESOLVE_TEXT_ADDR;
- gdb_interface(req);
- if ((req->flags & GNU_COMMAND_FAILED) ||
- do_load_module_filter ||
- (req->flags & GNU_FUNCTION_ONLY)) {
- req->flags &= ~GNU_COMMAND_FAILED;
- if (sp) {
- savename = sp->name;
- if ((sp = next_symbol(NULL, sp)))
- req->addr2 = sp->value;
- else
- error(FATAL,
- "unable to determine symbol after %s\n",
- savename);
- } else {
- if ((sp = value_search(req->addr, NULL))
- && (sp = next_symbol(NULL, sp)))
- req->addr2 = sp->value;
- else
- error(FATAL, dis_err, req->addr);
- }
- }
+ if (reverse) {
+ revtarget = req->addr;
+ if ((sp = value_search(revtarget, NULL)) == NULL)
+ error(FATAL, "cannot resolve address: %lx\n", revtarget);
- do_machdep_filter = machdep->dis_filter(req->addr, NULL, radix);
+ sprintf(buf1, "0x%lx", revtarget);
+ req->addr = sp->value;
+ } else
count = 0;
- open_tmpfile();
+ do_load_module_filter = module_symbol(req->addr, NULL, NULL,
+ NULL, *gdb_output_radix);
+
+ do_machdep_filter = machdep->dis_filter(req->addr, NULL, radix);
+ open_tmpfile();
#ifdef OLDWAY
- req->command = GNU_DISASSEMBLE;
- req->fp = pc->tmpfile;
- gdb_interface(req);
+ req->command = GNU_DISASSEMBLE;
+ req->fp = pc->tmpfile;
+ gdb_interface(req);
#else
- sprintf(buf1, "x/%ldi 0x%lx",
- count_entered && req->count ? req->count :
+ if (reverse)
+ sprintf(buf5, "x/%ldi 0x%lx",
+ (revtarget - req->addr) ? revtarget - req->addr : 1,
+ req->addr);
+ else
+ sprintf(buf5, "x/%ldi 0x%lx",
+ count_entered && req->count ? req->count :
req->flags & GNU_FUNCTION_ONLY ?
req->addr2 - req->addr : 1,
req->addr);
- gdb_pass_through(buf1, NULL, GNU_RETURN_ON_ERROR);
+ gdb_pass_through(buf5, NULL, GNU_RETURN_ON_ERROR);
#endif
- if (req->flags & GNU_COMMAND_FAILED) {
- close_tmpfile();
- error(FATAL, dis_err, req->addr);
- }
+ if (req->flags & GNU_COMMAND_FAILED) {
+ close_tmpfile();
+ error(FATAL, dis_err, req->addr);
+ }
- rewind(pc->tmpfile);
- while (fgets(buf2, BUFSIZE, pc->tmpfile)) {
- if (STRNEQ(buf2, "Dump of") ||
- STRNEQ(buf2, "End of"))
- continue;
+ rewind(pc->tmpfile);
+ while (fgets(buf2, BUFSIZE, pc->tmpfile)) {
+ if (STRNEQ(buf2, "Dump of") ||
+ STRNEQ(buf2, "End of"))
+ continue;
- strip_beginning_whitespace(buf2);
+ strip_beginning_whitespace(buf2);
- if (do_load_module_filter)
- load_module_filter(buf2, LM_DIS_FILTER);
+ if (do_load_module_filter)
+ load_module_filter(buf2, LM_DIS_FILTER);
- if (STRNEQ(buf2, "0x"))
- extract_hex(buf2, &curaddr, ':', TRUE);
+ if (STRNEQ(buf2, "0x"))
+ extract_hex(buf2, &curaddr, ':', TRUE);
+ if (!reverse)
if ((req->flags & GNU_FUNCTION_ONLY) &&
(curaddr >= req->addr2))
break;
- if (do_machdep_filter)
- machdep->dis_filter(curaddr, buf2, radix);
-
- if (req->flags & GNU_FUNCTION_ONLY) {
- if (req->flags &
- GNU_PRINT_LINE_NUMBERS) {
- get_line_number(curaddr, buf3,
- FALSE);
- if (!STREQ(buf3, buf4)) {
- print_verbatim(
- pc->saved_fp, buf3);
- print_verbatim(
- pc->saved_fp, "\n");
- strcpy(buf4, buf3);
- }
- }
-
- print_verbatim(pc->saved_fp, buf2);
- continue;
- } else {
- if (curaddr < req->addr)
- continue;
+ if (do_machdep_filter)
+ machdep->dis_filter(curaddr, buf2, radix);
- if (req->flags &
- GNU_PRINT_LINE_NUMBERS) {
- get_line_number(curaddr, buf3,
- FALSE);
- if (!STREQ(buf3, buf4)) {
- print_verbatim(
- pc->saved_fp, buf3);
- print_verbatim(
- pc->saved_fp, "\n");
- strcpy(buf4, buf3);
- }
- }
-
- print_verbatim(pc->saved_fp, buf2);
-
- if (LASTCHAR(clean_line(buf2))
- != ':') {
- if (++count == req->count)
- break;
- }
+ if (req->flags & GNU_PRINT_LINE_NUMBERS) {
+ get_line_number(curaddr, buf3,
+ FALSE);
+ if (!STREQ(buf3, buf4)) {
+ print_verbatim(
+ pc->saved_fp, buf3);
+ print_verbatim(
+ pc->saved_fp, "\n");
+ strcpy(buf4, buf3);
}
- }
- close_tmpfile();
- }
- }
- else if (bug_bytes_entered)
- return;
- else cmd_usage(pc->curcmd, SYNOPSIS);
-
- if (!reverse) {
- FREEBUF(req->buf);
- FREEBUF(req);
- return;
- }
-
- revtarget = req->addr;
- if ((sp = value_search(revtarget, NULL)) == NULL)
- error(FATAL, "cannot resolve address: %lx\n", revtarget);
-
- sprintf(buf1, "0x%lx", revtarget);
-
- open_tmpfile();
-
- req->addr = sp->value;
- req->flags |= GNU_FUNCTION_ONLY;
- req->command = GNU_RESOLVE_TEXT_ADDR;
- gdb_interface(req);
- req->flags &= ~GNU_COMMAND_FAILED;
- savename = sp->name;
- if ((sp = next_symbol(NULL, sp)))
- req->addr2 = sp->value;
- else {
- close_tmpfile();
- error(FATAL, "unable to determine symbol after %s\n", savename);
- }
-
- do_machdep_filter = machdep->dis_filter(req->addr, NULL, radix);
-#ifdef OLDWAY
- req->command = GNU_DISASSEMBLE;
- req->fp = pc->tmpfile;
- gdb_interface(req);
-#else
- sprintf(buf5, "x/%ldi 0x%lx",
- (revtarget - req->addr) ? revtarget - req->addr : 1,
- req->addr);
- gdb_pass_through(buf5, NULL, GNU_RETURN_ON_ERROR);
-#endif
- if (req->flags & GNU_COMMAND_FAILED) {
- close_tmpfile();
- error(FATAL, dis_err, req->addr);
- }
-
- rewind(pc->tmpfile);
- while (fgets(buf2, BUFSIZE, pc->tmpfile)) {
- if (STRNEQ(buf2, "Dump of") || STRNEQ(buf2, "End of"))
- continue;
+ }
- strip_beginning_whitespace(buf2);
+ print_verbatim(pc->saved_fp, buf2);
+ if (reverse) {
+ if (STRNEQ(buf2, buf1)) {
+ if (LASTCHAR(clean_line(buf2)) != ':')
+ break;
- if (do_load_module_filter)
- load_module_filter(buf2, LM_DIS_FILTER);
+ ret = fgets(buf2, BUFSIZE, pc->tmpfile);
- if (STRNEQ(buf2, "0x"))
- extract_hex(buf2, &curaddr, ':', TRUE);
+ if (do_load_module_filter)
+ load_module_filter(buf2, LM_DIS_FILTER);
- if (do_machdep_filter)
- machdep->dis_filter(curaddr, buf2, radix);
+ if (do_machdep_filter)
+ machdep->dis_filter(curaddr, buf2, radix);
- if (req->flags & GNU_PRINT_LINE_NUMBERS) {
- get_line_number(curaddr, buf3, FALSE);
- if (!STREQ(buf3, buf4)) {
- print_verbatim(pc->saved_fp, buf3);
- print_verbatim(pc->saved_fp, "\n");
- strcpy(buf4, buf3);
+ print_verbatim(pc->saved_fp, buf2);
+ break;
+ }
}
- }
- print_verbatim(pc->saved_fp, buf2);
- if (STRNEQ(buf2, buf1)) {
- if (LASTCHAR(clean_line(buf2)) != ':')
- break;
-
- ret = fgets(buf2, BUFSIZE, pc->tmpfile);
-
- if (do_load_module_filter)
- load_module_filter(buf2, LM_DIS_FILTER);
-
- if (do_machdep_filter)
- machdep->dis_filter(curaddr, buf2, radix);
-
- print_verbatim(pc->saved_fp, buf2);
- break;
+ if (count_entered && LASTCHAR(clean_line(buf2)) != ':')
+ if (++count == req->count)
+ break;
}
+ close_tmpfile();
}
+ else if (bug_bytes_entered)
+ return;
+ else cmd_usage(pc->curcmd, SYNOPSIS);
- close_tmpfile();
FREEBUF(req->buf);
FREEBUF(req);
+ return;
}
/*
--
2.4.3
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
9 years, 4 months
Re: [Crash-utility] Wrong RSS field in ps
by Dave Anderson
I'm away on vacation until next week, so I won't be able to check it out until then.
Dave
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: Michael Holzheu <holzheu(a)linux.vnet.ibm.com>
Date: 07/27/2015 10:34 AM (GMT-08:00)
To: Dave Anderson <anderson(a)redhat.com>
Cc: "Discussion list for crash utility usage, maintenance and development" <crash-utility(a)redhat.com>
Subject: [Crash-utility] Wrong RSS field in ps
Hello Dave,
On s390 (kernel 4.2.0-rc2) the "RSS" field in "ps" is wrong.
The reason is that in rss_page_types_init() enumerator_value("MM_ANONPAGES",
&anonpages) returns zero for "anonpages" and therefore we add MM_FILEPAGES
twice instead of adding MM_ANONPAGES.
Example: Process that allocated 500 MB:
ps 2152
PID PPID CPU TASK ST %MEM VSZ RSS COMM
2152 1061 4 7aff0000 IN 0.0 514024 2236 eat_mem
crash> print/x ((struct task_struct *) 0x7aff0000)->mm->rss_stat
$1 = {
count = {{
counter = 0x113
}, {
counter = 0x1f414
}, {
counter = 0x0
}}
}
Any idea why enumerator_value() is not working?
Michael
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
9 years, 4 months
[PATCH]remind of using --zero_exlcuded
by "Zhou, Wenjian/周文剑"
The option --zero_excluded can be used to analyze the incomplete
dumpfile.
So it is needed to remind users of using it when trying to analyze
incomplete dumpfile without --zero_excluded.
--
Thanks
Zhou Wenjian
9 years, 4 months
Re: [Crash-utility] [PATCH] extensions/trace: max_buffer is optional
by Dave Anderson
Thanks Qiao, I will check it in when I return from vacation.
Dave
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: qiaonuohan <qiaonuohan(a)cn.fujitsu.com>
Date: 07/19/2015 9:08 PM (GMT-08:00)
To: Dave Anderson <anderson(a)redhat.com>, "Discussion list for crash utility usage, maintenance and development" <crash-utility(a)redhat.com>
Cc: Rabin Vincent <rabinv(a)axis.com>
Subject: Re: [Crash-utility] [PATCH] extensions/trace: max_buffer is optional
On 07/16/2015 09:12 PM, Dave Anderson wrote:
>
> Rabin,
>
> This looks fine to me -- Qiao, can you please ACK this patch?
>
> Thanks,
> Dave
>
>
> ----- Original Message -----
>> max_buffer is optional in the kernel (depends on the
>> CONFIG_TRACE_MAX_TRACE option). Don't fail if it isn't available.
Acked-by: Qiao Nuohan <qiaonuohan(a)cn.fujitsu.com>
>> ---
>> extensions/trace.c | 14 +++++++++++++-
>> 1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/extensions/trace.c b/extensions/trace.c
>> index 9f81568..c269f4c 100644
>> --- a/extensions/trace.c
>> +++ b/extensions/trace.c
>> @@ -34,6 +34,10 @@ static int encapsulated_current_trace;
>> * trace_buffer is supported
>> */
>> static int trace_buffer_available;
>> +/*
>> + * max_buffer is supported
>> + */
>> +static int max_buffer_available;
>>
>> #define koffset(struct, member) struct##_##member##_offset
>>
>> @@ -163,8 +167,10 @@ static int init_offsets(void)
>>
>> if (trace_buffer_available) {
>> init_offset(trace_array, trace_buffer);
>> - init_offset(trace_array, max_buffer);
>> init_offset(trace_buffer, buffer);
>> +
>> + if (max_buffer_available)
>> + init_offset(trace_array, max_buffer);
>> } else {
>> init_offset(trace_array, buffer);
>> }
>> @@ -448,6 +454,9 @@ out_fail:
>> static int ftrace_int_max_tr_trace(void)
>> {
>> if (trace_buffer_available) {
>> + if (!max_buffer_available)
>> + return 0;
>> +
>> global_max_buffer = global_trace + koffset(trace_array, max_buffer);
>> read_value(max_tr_ring_buffer, global_max_buffer, trace_buffer, buffer);
>> } else {
>> @@ -528,6 +537,9 @@ static int ftrace_init(void)
>>
>> if (MEMBER_EXISTS("trace_array", "trace_buffer")) {
>> trace_buffer_available = 1;
>> +
>> + if (MEMBER_EXISTS("trace_array", "max_buffer"))
>> + max_buffer_available = 1;
>> } else {
>> sym_max_tr_trace = symbol_search("max_tr");
>> if (sym_max_tr_trace == NULL)
>> --
>> 1.7.10.4
>>
>> --
>> Crash-utility mailing list
>> Crash-utility(a)redhat.com
>> https://www.redhat.com/mailman/listinfo/crash-utility
>>
> .
>
--
Regards
Qiao Nuohan
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
9 years, 4 months
[ANNOUNCE] crash version 7.1.2 is available
by Dave Anderson
Download from: http://people.redhat.com/anderson
or
https://github.com/crash-utility/crash/releases
The master branch serves as a development branch that will contain all
patches that are queued for the next release:
$ git clone git://github.com/crash-utility/crash.git
Changelog:
- Enhancement of the ARM64 backtrace capability. Without the patch,
backtraces of the active tasks start at the function that is saved
in each per-cpu ELF note. With the patch, the backtrace will start
at the "crash_kexec" function on the panicking cpu, and at the
"crash_save_cpu" function on the other active cpus. By doing so,
the backtrace will display the exception handling functions leading
to crash_kexec() or crash_save_cpu(), as well as the exception frame
register set as it was at the time of the fatal exception on the
panic cpu, or when the shutdown IPI was received on the other cpus.
(anderson(a)redhat.com)
- Enabled the "bt -R" option on the ARM64 architecture. Without the
patch, the option fails with the message "bt: -R option not supported
or applicable on this architecture or kernel".
(anderson(a)redhat.com)
- Enabled the "crash --log vmcore" command line option on the ARM64
architecture. Without the patch, the option fails with the message
"crash: crash --log not implemented on ARM64: TBD".
(anderson(a)redhat.com)
- Fix for the S390X "bt" command when running against kernels that have
Linux 4.0 commit 2f859d0dad818765117c1cecb24b3bc7f4592074, which
removes the "async_stack" and "panic_stack" members from the "pcpu"
structure. Without the patch, backtraces of active tasks that were
executing I/O or machine check interrupts are not displayed, while
other tasks may generate fatal readmem() errors of type "readmem_ul".
(holzheu(a)linux.vnet.ibm.com)
- Fix to prevent an unnecessary/temporary GETBUF() memory allocation
of 1 MB by the dump_mem_map() utility function when the kernel is
configured with CONFIG_SPARSEMEM.
(yangoliver(a)gmail.com)
- Speed up the "crash --osrelease" option when used with "flattened"
format dumpfiles. Without the patch, the rearranged data array
initialization is performed before the vmcoreinfo data in the
header is read, which can take a significant amount of time with
large dumpfiles. The patch simply looks for the appropriate
vmcoreinfo data string near the beginning of the dumpfile.
(anderson(a)redhat.com)
- Fix for the initialization-time sorting mechanism required for
"flattened format" dumpfiles if the dumpfile is truncated/incomplete.
Without the patch, the sorting function continues performing invalid
reads beyond the of the dumpfile, which may lead to an infinite loop
instead of a session-ending error message. In addition, since the
sorting operation may take several minutes, a "please wait" message
with an incrementing percentage-complete counter will be displayed.
(anderson(a)redhat.com)
- Several fixes associated with the gathering and display of task
state. Without the patch:
(1) The "ps" command's ST column shows "??" for tasks in the
TASK_WAKING state.
(2) The "ps" command's ST column shows "??" for tasks in the
TASK_PARKED state in Linux 3.14 and later kernels.
(3) The STATE field of the initial system banner and the "set"
command are incorrect if the task state has the TASK_WAKING,
TASK_WAKEKILL modifier, or TASK_PARKED bits set in Linux 3.14
and later kernels.
(4) The "foreach DE" task identifier fails if a task with a PID
number of 0xDE (222) exists.
(5) The "foreach" command's "SW", "PA", "TR" and "DE" task
identifiers inadvertently select all tasks in kernel versions
that do not have those states.
(6) The "help -t" output would display incorrect values for the
TASK_WAKEKILL, TASK_WAKING and TASK_PARKED states in Linux 3.14
and later kernels.
Lastly, support for the TASK_NOLOAD modifier introduced in Linux 4.2
has been added to STATE field of the "set" command and the initial
system banner.
(anderson(a)redhat.com)
- Fix for the internal memory allocation functionality. Without the
patch, in the unlikely event where the GETBUF() facility has to
utilize malloc() to allocate a buffer, and CTRL-c is entered while
that buffer is being zeroed out before being returned to the caller,
it may result in a never-ending set of "malloc-free mismatch" error
messages.
(anderson(a)redhat.com)
- Fix for the PPC64 "bt" command for active non-panic tasks. Without
the patch, the backtrace may fail immediately with the error message
"bt: invalid kernel virtual address: f type: Regs NIP value".
(anderson(a)redhat.com)
- Fix for the "bt" command on little-endian PPC64 machines for tasks
that are blocked in __schedule(). Without the patch, there will be
two "__switch_to" frames displayed before the normal "__schedule"
frame that is used as the starting point for blocked tasks.
(anderson(a)redhat.com)
- Fix for the PPC64 "bt" command to align its exception frame verifier
function with the most recent version of the kernel's getvecname()
function, which was updated in Linux 3.12. Without the patch, the
"Hypervisor Decrementer", "Emulation Assist", "Hypervisor Doorbell",
"Altivec Unavailable", "Instruction Breakpoint", "Denormalisation",
"HMI" and "Altivec Assist" exception types are not recognized and
their exception frames not displayed; the "Doorbell" exception type
is marked as a "reserved" exception type,
(anderson(a)redhat.com)
- Fix for the "timer" command when run on a kernel with a large number
of cpus. Without the patch, the command may fail prematurely with
a dump of the internal crash utility allocated buffer statistics
followed by the message "timer: cannot allocate any more memory!",
(anderson(a)redhat.com)
- Commit f95ecdc330a11d3701de859aab59a5ab5954aae6, which speeds up
"crash --osrelease" for flattened format dumpfiles, inadvertently
broke the option for ELF kdump and compressed kdump dumpfiles.
(anderson(a)redhat.com)
- Implementation of two new "files" command options. The "files -c"
option is context-sensitive, similar to the the regular "files"
command when used without an argument, but replaces the FILE and
DENTRY columns with I_MAPPING and NRPAGES columns that reflect
each open file's inode.i_mapping address_space structure address,
and the address_space.nrpages count within it; this shows how
many of each open file's pages are currently in the system's
page cache. The "files -p <inode>" option takes the address
of an inode, and dumps all of its pages that are currently in the
system's page cache, borrowing the "kmem -p" page structure output.
(yangoliver(a)gmail.com)
- Modified the qualification for the execution of the "runq -g" option.
Without the patch, if the target kernel was not configured with both
CONFIG_FAIR_GROUP_SCHED and CONFIG_RT_GROUP_SCHED, the command fails
with the message "runq: -g option not supported or applicable on this
architecture or kernel". With this patch, if the kernel was built
with either CONFIG_FAIR_GROUP_SCHED or CONFIG_RT_GROUP_SCHED, the
command will execute.
(rabinv(a)axis.com)
- Fix for the error handling of the "foreach task -R struct.member"
format if an invalid structure and/or member is used as an argument.
Without the patch, the command will display the expected error
indicating "task: invalid structure member reference", but then will
be followed by a stream of "task: recursive temporary file usage"
error messages.
(anderson(a)redhat.com)
- Force the 32-bit MIPS extensions/eppic.so to be compiled with -m32.
This is required when "make extensions" is executed after the top
level crash binary has been built with "make TARGET=MIPS" on an
x86_64 host.
(rabinv(a)axis.com)
- If the starting hexadecimal address of a function is passed to the
"dis" command without a count argument, disassemble the entire
function -- similar to when a symbol name of a function is passed
without a count argument. Without the patch, only one instruction
is displayed.
(atomlin(a)redhat.com)
- Fix compiler warning generated by extensions/trace.c when compiled
with gcc version 5. Without the patch, the message "warning: the
use of 'mktemp' is dangerous, better use 'mkstemp'" is generated.
(anderson(a)redhat.com)
- Update the extensions/eppic.mk file to clone the eppic source code
from https://github.com/lucchouina/eppic.git.
(lucchouina(a)gmail.com)
- Export the previously static symbol_name_count() function, which
returns a count of symbols with the same name. Export a new
is_symbol_text() function, which checks whether specified symbol
entry is a type 't' or 'T'.
(atomlin(a)redhat.com, anderson(a)redhat.com)
- If a symbol or symbol+offset argument is passed to the "dis" command,
and there are multiple text symbols with the same symbol name, then
display a message indicating that there are "duplicate text symbols
found", followed by a list of the symbols. Without the patch, the
duplicate symbol with the lowest virtual address is used.
(atomlin(a)redhat.com, anderson(a)redhat.com)
9 years, 4 months
[PATCH 1/2] dis: Make the starting address of a function special for hexadecimal targets too
by Aaron Tomlin
If no count is not entered, and the target address is the starting address
of a function, disassemble the entire function.
However this is only true, if the given target is symbolic.
This patch simply removes that restriction when the target is a hexadecimal
address:
For example, each of the following commands will return the same result.
- Where 0xffffffff80137e9d is assumed to be the address of the
first instruction in do_fork()
crash> dis 0xffffffff80137e9d
crash> dis do_fork
Signed-off-by: Aaron Tomlin <atomlin(a)redhat.com>
---
kernel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel.c b/kernel.c
index 4932282..628779c 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1436,6 +1436,8 @@ cmd_dis(void)
req->addr);
unfiltered = TRUE;
}
+ if (!offset)
+ req->flags |= GNU_FUNCTION_ONLY;
} else if ((sp = symbol_search(args[optind]))) {
req->addr = sp->value;
req->flags |= GNU_FUNCTION_ONLY;
--
2.4.3
9 years, 4 months