Vasily Averin | 19 Sep 13:07 2014

[patch] incorrect pid_ns check

Dear Dave,

I've found that crash does not find all tasks on OpenVZ kernels.
Currently pid_ns check in refresh_hlist_task_table_v3() checks only first entry 
in pid_hash[i] hlist. If this entry is not related to init_pid_ns
it forget about other entries in hlist and switches to next element
in pid_hash array.

Attached patch fix this problem.

Thank you,
	Vasily Averin
diff -up crash-7.0.8/task.c.pidns crash-7.0.8/task.c
--- crash-7.0.8/task.c.pidns	2014-09-11 11:08:25.000000000 -0400
+++ crash-7.0.8/task.c	2014-09-19 06:15:42.000000000 -0400
 <at>  <at>  -2033,7 +2033,7  <at>  <at>  do_chained:
 		 *  Use init_pid_ns level 0 (PIDTYPE_PID).
 		 */
 		if (upid_ns != tt->init_pid_ns)
-			continue;
+			goto chain_next;

 		pid = upid - OFFSET(pid_numbers);

diff -up crash-7.0.8/task.c.pidns crash-7.0.8/task.c
--- crash-7.0.8/task.c.pidns	2014-09-11 11:08:25.000000000 -0400
(Continue reading)

Liu Hua | 18 Sep 11:32 2014

[PATCH] crash: arm32: a better way to identify LPAE enabled kernel

Thanks to Dave's suggest, I impove the way to identify
LPAE enabled kernel for arm platform, for compatibility with
some old kernel.

If a vmcore santisfy one of the following conditions, It must
be generated by a LPAE enabled kernel.

(1) it has CONFIG_ARM_LPAE=y vmcore_info
(2) swapper_pg_dir and its next symbol value differ by 0x5000

Signed-off-by: Liu Hua <sdu.liu <at> huawei.com>
---
 arm.c     | 11 ++++++++++-
 symbols.c | 10 ++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/arm.c b/arm.c
index cb7d841..76ba699 100644
--- a/arm.c
+++ b/arm.c
 <at>  <at>  -190,6 +190,8  <at>  <at>  void
 arm_init(int when)
 {
 	ulong vaddr;
+	char *string;
+	ulong difference;

 #if defined(__i386__) || defined(__x86_64__)
 	if (ACTIVE())
 <at>  <at>  -229,8 +231,15  <at>  <at>  arm_init(int when)
(Continue reading)

Liu Hua | 18 Sep 11:28 2014

[PATCH] crash: arm32: a better way to identify LPAE enabled kernel

Thanks to Dave's suggest, I impove the way to identify
LPAE enabled kernel for arm platform, for compatibility with
some old kernel.

If a vmcore santisfy one of the following conditions, It must
be generated by a LPAE enabled kernel.

(1) it has CONFIG_ARM_LPAE=y vmcore_info
(2) swapper_pg_dir and its next symbol value differ by 0x5000

Signed-off-by: Liu Hua <sdu.liu <at> huawei.com>
---
 arm.c     | 11 ++++++++++-
 symbols.c | 10 ++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/arm.c b/arm.c
index cb7d841..76ba699 100644
--- a/arm.c
+++ b/arm.c
 <at>  <at>  -190,6 +190,8  <at>  <at>  void
 arm_init(int when)
 {
 	ulong vaddr;
+	char *string;
+	ulong difference;

 #if defined(__i386__) || defined(__x86_64__)
 	if (ACTIVE())
 <at>  <at>  -229,8 +231,15  <at>  <at>  arm_init(int when)
(Continue reading)

Michael Holzheu | 12 Sep 16:42 2014
Picon

[PATCH] crash/s390x: Fix CPU timer and clock comparator output for bt -a

Hello Dave,

The output of CPU timer and clock comparator has always been incorrect
because:

 - We added S390X_WORD_SIZE (8) instead of 4 to get the second word
 - We did not left shift the clock comparator by 8

So fix this by getting the complete 64 bit values and by shifting the
clock comparator correctly.

Signed-off-by: Michael Holzheu <holzheu <at> linux.vnet.ibm.com>
---
 s390x.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

--- a/s390x.c
+++ b/s390x.c
 <at>  <at>  -1343,14 +1343,16  <at>  <at>  s390x_print_lowcore(char* lc, struct bt_
 	fprintf(fp,"  -prefix   : %#010lx\n", tmp[0]);
 	
 	ptr = lc + MEMBER_OFFSET(lc_struct, "cpu_timer_save_area");
-	tmp[0]=UINT(ptr);
-	tmp[1]=UINT(ptr + S390X_WORD_SIZE);
-	fprintf(fp,"  -cpu timer: %#010lx %#010lx\n", tmp[0],tmp[1]);
+	tmp[0]=ULONG(ptr);
+	fprintf(fp,"  -cpu timer: %#018lx\n", tmp[0]);

 	ptr = lc + MEMBER_OFFSET(lc_struct, "clock_comp_save_area");
-	tmp[0]=UINT(ptr);
(Continue reading)

Dave Anderson | 11 Sep 21:12 2014
Picon

crash 7.0.8 is available


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:

 - Fix for the handling of 32-bit ELF xendump dumpfiles if the guest 
   was configured with more than 4GB of memory.  Without the patch, the
   crash session may fail during initialization with the error message 
   "crash: vmlinux and <dumpfile> do not match!".
   (dslutz <at> verizon.com)

 - Fix for file-handling errors when a compressed vmlinux.debug file 
   is followed by a vmlinux file on the crash command line.  When the 
   crash session ends, two errors will occur:
     (1) the vmlinux file will be deleted  
     (2) the temporary uncompressed version of the vmlinux.debug file
         will remain in /var/tmp
   This problem also occurs in the highly unlikely case where a 
   compressed vmlinux file is followed by a vmlinux.debug file on the
   command line, and the uncompressed temporary version of the vmlinux
   file is larger than the vmlinux.debug file.  In that case:
     (1) the vmlinux.debug file will be deleted
     (2) the temporary uncompressed version of the vmlinux file
(Continue reading)

Dave Anderson | 8 Sep 15:06 2014
Picon

Re: improve ps performance


----- Original Message -----
> On 09/06/2014 04:11 AM, Dave Anderson wrote:
> > Hello Pan,
> >
> > The patch looks to run OK.  Here are my comments and suggestions:
> >
> > # make warn
> > cc -c -g -DX86_64 -DLZO -DSNAPPY -DGDB_7_6  memory.c -Wall -O2
> > -Wstrict-prototypes -Wmissing-prototypes -fstack-protector
> > -Wformat-security
> > memory.c: In function 'get_task_mem_usage':
> > memory.c:4157:10: warning: variable 'tgid' set but not used
> > [-Wunused-but-set-variable]
> > ...
> >
> > And speaking of tgid, I don't see why it's necessary to keep two
> > copies of the tgid:?
> >
> >  <at>  <at>  -758,13 +758,23  <at>  <at>  struct task_context {                     /* context
> > stored for each task */
> >          int processor;
> >          ulong ptask;
> >          ulong mm_struct;
> > +       ulong tgid;
> > +       ulong tgid_task_context_index;
> >          struct task_context *tc_next;
> >   };
> >
> > +struct tgid_task_context{               /* context and tgid stored for
(Continue reading)

Dave Anderson | 4 Sep 18:19 2014
Picon

Heads-up re: ppc64le support in crash-7.0.8


Petr, Michel, et al,

I'm currently working on adding ppc64le support for the next upstream
crash release.  I'm working from a Fedora bugzilla filed by Michel Normand,
where he that applied the "crash-gdb-7.6.series" set of patches from the openSUSE 
distribution.  Thanks Michel for doing the initial legwork using the Fedora
tree.

For the upstream crash utility repo, I do not want to carry the set of 9 patches
individually, but similar to the singular gdb-7.6.patch, I plan to concatenate
them into a singular gdb-7.6-ppc64le-support.patch.

Ideally the contents of the 9 patch files could be added to the gdb-7.6.patch,
and I may do that in the future.

However, just the crash-gdb-7.6-bound_minimal_symbol.patch in the 9-part set
is so large and intrusive (touching dozens of arch-neutral files) that
I am paranoid about breaking something, or altering behavior for the
other architectures.  So I plan to take a more cautious route for now,
and only apply the gdb-7.6-ppc64le-support.patch if the build host is
ppc64le.

Thanks,
  Dave

qiaonuohan | 1 Sep 08:19 2014

x86_64: supporting cpu hot remove

Hello Dave,

This patchset is used to fix some bug and modify display of some commands.
When some cpus are removed, the related data is not reasonable to be displayed,
so hide them.

Please check the patches to see detailed information.

-- 
Regards
Qiao Nuohan
From d32974518c8920c0d3163d6672a434d1cbbeb429 Mon Sep 17 00:00:00 2001
From: Qiao Nuohan <qiaonuohan <at> cn.fujitsu.com>
Date: Sat, 23 Aug 2014 10:16:11 +0800
Subject: [PATCH 01/23] x86_64: add an API to check an offline cpu

on x86_64, when a cpu is hot removed(offline), this function will check
it out

Signed-off-by: Qiao Nuohan <qiaonuohan <at> cn.fujitsu.com>
---
 defs.h   |  1 +
 kernel.c | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/defs.h b/defs.h
index 44df6ae..a751813 100755
--- a/defs.h
(Continue reading)

panfy.fnst | 19 Aug 13:28 2014

improve ps performance

hello dave,
this patch for improving ps performance,when on RHEL 7 OS create 100k 
processes, the original ps command spends 51873.6s, after applying my 
patch, the time is reduced to 10.2s.

>From 0095be2c68b4154110b348ba5cbbe7dcb36c746d Mon Sep 17 00:00:00 2001
From: panfengyun <panfy.fnst <at> cn.fujitsu.com>
Date: Mon, 18 Aug 2014 14:59:43 +0800
Subject: [PATCH] improve ps performance

When a core file contains numerous tasks, especilly on RHEL 7, it will spend too
much time when using ps command to display tasks. The following three parts can
be modified to improve the performance.
    1. the task_mm() function and the is_kernel_thread() function have been
       called repeatedly.
    2. the task_to_pid() function and the task_to_context() function contains
       unnecessary cycle.
    3. at the get_task_mem_usage() function, repeated get the value of filepages
       and spend much time at FOR statement.

Please check the patch to see detailed information.

I test the patch on two OS, and the result is like below(using the following two
command to create processes):
    1. on RHEL 6, using "./test2.sh 10 10000" to create 100k processes, the
       original ps command spends 179.9s, after applying my patch, the time is
       reduced to 9.5s.
    2. on RHEL 7, using "./test2.sh 100 1000" to create 100k processes, the
(Continue reading)

qiaonuohan | 19 Aug 03:52 2014

ps: improve performance

Hello dave,

This patch is used to improve ps command performance, especilly on RHEL 7.
And the author is Pan Fengyun <panfy.fnst <at> cn.fujitsu.com>.

Please check.

-- 
Regards
Qiao Nuohan
>From 0095be2c68b4154110b348ba5cbbe7dcb36c746d Mon Sep 17 00:00:00 2001
From: panfengyun <panfy.fnst <at> cn.fujitsu.com>
Date: Mon, 18 Aug 2014 14:59:43 +0800
Subject: [PATCH] improve ps performance

When a core file contains numerous tasks, especilly on RHEL 7, it will spend too
much time when using ps command to display tasks. The following three parts can
be modified to improve the performance.
    1. the task_mm() function and the is_kernel_thread() function have been
       called repeatedly.
    2. the task_to_pid() function and the task_to_context() function contains
       unnecessary cycle.
    3. at the get_task_mem_usage() function, repeated get the value of filepages
       and spend much time at FOR statement.

Please check the patch to see detailed information.

I test the patch on two OS, and the result is like below(using the following two
(Continue reading)

Ku, Eugene | 29 Jul 18:10 2014

Debuginfo packages for Ubuntu 12.04

Hello,

 

I am working on a product that supports Ubuntu 12.04 LTS.  Ubuntu 12.04 LTS has delivered many different versions of Linux kernel.  In order to run crash to analyze crash dump from Ubuntu 12.04 LTS, we need a matching debugging Linux kernel module, vmlinux.  Do you know if there is repository for all released Ubuntu kernel debuginfo packages?  I have searched Ubunut and Debian web sites but could not find such a site.  The closest thing I have found is http://ddebs.ubuntu.com/pool/main/l/linux/; however it only has linux-image-3.2.0-* ddeb packages.  For Ubuntu 12.04 LTS it has delivered 3.2.0-*, 3.5.0-* and 3.8.0-* kernels.  These ddeb packages are also huge, more than 600MB each.  If there is a repository for vmlinux files only, that will be even better.

 

Please advise.  Thank you so much.

 

Eugene

<div>
<div class="WordSection1">
<p class="MsoNormal">Hello,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I am working on a product that supports Ubuntu 12.04 LTS.&nbsp; Ubuntu 12.04 LTS has delivered many different versions of Linux kernel.&nbsp; In order to run crash to analyze crash dump from Ubuntu 12.04 LTS, we need a matching debugging Linux kernel
 module, vmlinux.&nbsp; Do you know if there is repository for all released Ubuntu kernel debuginfo packages?&nbsp; I have searched Ubunut and Debian web sites but could not find such a site.&nbsp; The closest thing I have found is
<a href="http://ddebs.ubuntu.com/pool/main/l/linux/">http://ddebs.ubuntu.com/pool/main/l/linux/</a>; however it only has linux-image-3.2.0-* ddeb packages.&nbsp; For Ubuntu 12.04 LTS it has delivered 3.2.0-*, 3.5.0-* and 3.8.0-* kernels.&nbsp; These ddeb packages are
 also huge, more than 600MB each.&nbsp; If there is a repository for vmlinux files only, that will be even better.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Please advise.&nbsp; Thank you so much.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Eugene<p></p></p>
</div>
</div>

Gmane