mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Hui Zhu <teawater@gmail.com>
Cc: xiyou.wangcong@gmail.com, linux-kernel@vger.kernel.org,
	viro@zeniv.linux.org.uk, dhowells@redhat.com,
	Russell King <rmk@arm.linux.org.uk>,
	linux-arm-kernel@lists.arm.linux.org.uk, stable@kernel.org
Subject: Re: [PATCH] Fix the multithread program core thread message error
Date: Wed, 1 Jul 2009 12:05:19 -0700	[thread overview]
Message-ID: <20090701120519.d5b1ed78.akpm@linux-foundation.org> (raw)
In-Reply-To: <daef60380906302321n681b8092k32c468ae281f4fbb@mail.gmail.com>

On Wed, 1 Jul 2009 14:21:37 +0800
Hui Zhu <teawater@gmail.com> wrote:

> Thanks for your help, Amerigo.
> 
> Hui
> 
> Fix the multithread program core thread message error.
> This issue just affect arch with neither has CORE_DUMP_USE_REGSET
> nor ELF_CORE_COPY_TASK_REGS, ARM is one of them.
> The thread message of core file is generated in
> elf_dump_thread_status.  The register values is set by
> elf_core_copy_task_regs in this function.
> If a arch doesn't define ELF_CORE_COPY_TASK_REGS, The function
> elf_core_copy_task_regs will do nothing.  Then the core file will
> not have the register message of thread.
> So add elf_core_copy_regs to set regiser values if
> ELF_CORE_COPY_TASK_REGS doesn't define.
> The following is how to reproduce this issue:
>
> ...
>
> Without the patch:
> (gdb) info threads
>  3 process 909  0x00000000 in ?? ()
>  2 process 908  0x00000000 in ?? ()
> * 1 process 907  0x4a6e2238 in raise () from /lib/libc.so.6
> You can found that the pc of 909 and 908 is 0x00000000.
> With the patch:
> (gdb) info threads
>  3 process 885  0x4a749974 in nanosleep () from /lib/libc.so.6
>  2 process 884  0x4a749974 in nanosleep () from /lib/libc.so.6
> * 1 process 883  0x4a6e2238 in raise () from /lib/libc.so.6
> The pc of 885 and 884 is right.

I'm trying to work out if we should backport this fix into earlier
kernels (2.6.30.x, 2.6.29.x, etc).

I'd have though that having gdb produce crap for all the threads would
be fairly irritating to ARM developers and hence we should backport
this.  But perhaps it doens't affect many people, dunno.

What do poeple think?


  parent reply	other threads:[~2009-07-01 19:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30  9:12 Hui Zhu
2009-07-01  0:54 ` Amerigo Wang
2009-07-01  3:27   ` Hui Zhu
2009-07-01  3:29     ` Hui Zhu
2009-07-01  4:51     ` Amerigo Wang
2009-07-01  6:21       ` Hui Zhu
2009-07-01  7:20         ` Amerigo Wang
2009-07-01  8:16           ` Hui Zhu
2009-07-01 19:05         ` Andrew Morton [this message]
2009-07-01 19:19           ` Bill Gatliff
2009-07-03  9:48           ` Amerigo Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090701120519.d5b1ed78.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=stable@kernel.org \
    --cc=teawater@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®