FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 04-04-2008, 01:24 PM
Dave Anderson
 
Default "invalid structure member offset: task_struct_parent" on x86_64 rawhide

Jeff Layton wrote:

Looks like we might have gotten bitten by some upstream changes
again...

When I run crash on a recent rawhide x86_64 kernel, I seem to be
getting this error:

crash: invalid structure member offset: task_struct_parent
FILE: task.c LINE: 2163 FUNCTION: store_context()

[/usr/bin/crash] error trace: 49150a => 495bb8 => 4963be => 4fc1bc
/usr/bin/nm: /usr/bin/crash: no symbols
/usr/bin/nm: /usr/bin/crash: no symbols
/usr/bin/nm: /usr/bin/crash: no symbols
/usr/bin/nm: /usr/bin/crash: no symbols

Relevant package versions:

crash-4.0-6.2.x86_64
kernel-2.6.25-0.185.rc7.git6.fc9.x86_64

...machine is a x86_64 FV xen guest. Any thoughts?

Thanks,


Hmmm. The task_struct.parent member still exists upstream with
the same name, shown here after a fresh git pull:

/*
* pointers to (original) parent process, youngest child, younger sibling,
* older sibling, respectively. (p->father can be replaced with
* p->parent->pid)
*/
struct task_struct *real_parent; /* real parent process (when being debugged) */
struct task_struct *parent; /* parent process */

If you run "gdb vmlinux" and then do a "ptype struct task_struct", does
it not show the parent member?

Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 04-04-2008, 01:53 PM
Dave Anderson
 
Default "invalid structure member offset: task_struct_parent" on x86_64 rawhide

Jeff Layton wrote:

Looks like we might have gotten bitten by some upstream changes
again...

When I run crash on a recent rawhide x86_64 kernel, I seem to be
getting this error:

crash: invalid structure member offset: task_struct_parent
FILE: task.c LINE: 2163 FUNCTION: store_context()

[/usr/bin/crash] error trace: 49150a => 495bb8 => 4963be => 4fc1bc
/usr/bin/nm: /usr/bin/crash: no symbols
/usr/bin/nm: /usr/bin/crash: no symbols
/usr/bin/nm: /usr/bin/crash: no symbols
/usr/bin/nm: /usr/bin/crash: no symbols

Relevant package versions:

crash-4.0-6.2.x86_64
kernel-2.6.25-0.185.rc7.git6.fc9.x86_64

...machine is a x86_64 FV xen guest. Any thoughts?

Thanks,


Yep, although the change is not upstream in Linus's tree, Roland's
linux-2.6-utrace.patch removes it in Fedora:

@@ -1070,18 +1063,26 @@ struct task_struct {
/*
* pointers to (original) parent process, youngest child, younger sibling,
* older sibling, respectively. (p->father can be replaced with
- * p->parent->pid)
+ * p->real_parent->pid)
*/
- struct task_struct *real_parent; /* real parent process (when being debugged) */
- struct task_struct *parent; /* parent process */
+ struct task_struct *real_parent; /* real parent process */
/*
- * children/sibling forms the list of my children plus the
- * tasks I'm ptracing.
+ * children/sibling forms the list of my natural children
*/

AFAICT, task_struct.real_parent can be substituted. Try the attached
patch. (and then wait to see what else has been broken...)

Dave


--- task.c.orig 2008-04-04 09:48:38.000000000 -0400
+++ task.c 2008-04-04 09:50:13.000000000 -0400
@@ -208,6 +208,9 @@
MEMBER_OFFSET_INIT(task_struct_processor, "task_struct", "processor");
MEMBER_OFFSET_INIT(task_struct_p_pptr, "task_struct", "p_pptr");
MEMBER_OFFSET_INIT(task_struct_parent, "task_struct", "parent");
+ if (INVALID_MEMBER(task_struct_parent))
+ MEMBER_OFFSET_INIT(task_struct_parent, "task_struct",
+ "real_parent");
MEMBER_OFFSET_INIT(task_struct_has_cpu, "task_struct", "has_cpu");
MEMBER_OFFSET_INIT(task_struct_cpus_runnable,
"task_struct", "cpus_runnable");
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 04-04-2008, 02:12 PM
Jeff Layton
 
Default "invalid structure member offset: task_struct_parent" on x86_64 rawhide

On Fri, 04 Apr 2008 10:02:20 -0400
Dave Anderson <anderson@redhat.com> wrote:
> > Jeff Layton wrote:
> >> Looks like we might have gotten bitten by some upstream changes
> >> again...
> >>
> >> When I run crash on a recent rawhide x86_64 kernel, I seem to be
> >> getting this error:
> >>
> >> crash: invalid structure member offset: task_struct_parent
> >> FILE: task.c LINE: 2163 FUNCTION: store_context()
> >>
> >> [/usr/bin/crash] error trace: 49150a => 495bb8 => 4963be => 4fc1bc
> >> /usr/bin/nm: /usr/bin/crash: no symbols
> >> /usr/bin/nm: /usr/bin/crash: no symbols
> >> /usr/bin/nm: /usr/bin/crash: no symbols
> >> /usr/bin/nm: /usr/bin/crash: no symbols
> >>
> >> Relevant package versions:
> >>
> >> crash-4.0-6.2.x86_64
> >> kernel-2.6.25-0.185.rc7.git6.fc9.x86_64
> >>
> >> ...machine is a x86_64 FV xen guest. Any thoughts?
> >>
> >> Thanks,
> >
> > Yep, although the change is not upstream in Linus's tree, Roland's
> > linux-2.6-utrace.patch removes it in Fedora:
> >
> > @@ -1070,18 +1063,26 @@ struct task_struct {
> > /*
> > * pointers to (original) parent process, youngest child,
> > younger sibling,
> > * older sibling, respectively. (p->father can be replaced with
> > - * p->parent->pid)
> > + * p->real_parent->pid)
> > */
> > - struct task_struct *real_parent; /* real parent process (when
> > being debugged) */
> > - struct task_struct *parent; /* parent process */
> > + struct task_struct *real_parent; /* real parent process */
> > /*
> > - * children/sibling forms the list of my children plus the
> > - * tasks I'm ptracing.
> > + * children/sibling forms the list of my natural children
> > */
> >
> > AFAICT, task_struct.real_parent can be substituted. Try the attached
> > patch. (and then wait to see what else has been broken...)
> >
> > Dave
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > --- task.c.orig 2008-04-04 09:48:38.000000000 -0400
> > +++ task.c 2008-04-04 09:50:13.000000000 -0400
> > @@ -208,6 +208,9 @@
> > MEMBER_OFFSET_INIT(task_struct_processor, "task_struct", "processor");
> > MEMBER_OFFSET_INIT(task_struct_p_pptr, "task_struct", "p_pptr");
> > MEMBER_OFFSET_INIT(task_struct_parent, "task_struct", "parent");
> > + if (INVALID_MEMBER(task_struct_parent))
> > + MEMBER_OFFSET_INIT(task_struct_parent, "task_struct",
> > + "real_parent");
> > MEMBER_OFFSET_INIT(task_struct_has_cpu, "task_struct", "has_cpu");
> > MEMBER_OFFSET_INIT(task_struct_cpus_runnable,
> > "task_struct", "cpus_runnable");
>

That worked! I didn't do any extensive testing, but that seems to allow
crash to start and do a "ps".

Many thanks!
--
Jeff Layton <jlayton@redhat.com>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 08:53 AM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org