[Crash-utility] "invalid structure member" on linux-4.9-rc1

Dave Anderson anderson at redhat.com
Tue Oct 18 14:58:00 UTC 2016



----- Original Message -----
> > Hi,
> >
> > I'm trying to use the latest crash via the git repo, on the just
> > released linux-4.9-rc1 kernel, and I'm hitting this failure when loading
> > the vmcore.  Any ideas?
> 
> Apparently the 4.9 thread_info structure no longer has a "cpu" member?
> 
> Dave

Hi Steve,

It's all due to the 4.9 introduction of CONFIG_THREAD_INFO_IN_TASK: 

  commit 15f4eae70d365bba26854c90b6002aaabb18c8aa
  Author: Andy Lutomirski <luto at kernel.org>
  Date:   Tue Sep 13 14:29:25 2016 -0700

    x86: Move thread_info into task_struct
    
    Now that most of the thread_info users have been cleaned up,
    this is straightforward.
    
    Most of this code was written by Linus.
    
    Originally-from: Linus Torvalds <torvalds at linux-foundation.org>
    Signed-off-by: Andy Lutomirski <luto at kernel.org>
    Cc: Borislav Petkov <bp at alien8.de>
    Cc: Brian Gerst <brgerst at gmail.com>
    Cc: Denys Vlasenko <dvlasenk at redhat.com>
    Cc: H. Peter Anvin <hpa at zytor.com>
    Cc: Jann Horn <jann at thejh.net>
    Cc: Josh Poimboeuf <jpoimboe at redhat.com>
    Cc: Linus Torvalds <torvalds at linux-foundation.org>
    Cc: Peter Zijlstra <peterz at infradead.org>
    Cc: Thomas Gleixner <tglx at linutronix.de>
    Link: http://lkml.kernel.org/r/a50eab40abeaec9cb9a9e3cbdeafd32190206654.1473801993.git.luto@kernel.org
    Signed-off-by: Ingo Molnar <mingo at kernel.org>

  commit c65eacbe290b8141554c71b2c94489e73ade8c8d
  Author: Andy Lutomirski <luto at kernel.org>
  Date:   Tue Sep 13 14:29:24 2016 -0700

    sched/core: Allow putting thread_info into task_struct
    
    If an arch opts in by setting CONFIG_THREAD_INFO_IN_TASK_STRUCT,
    then thread_info is defined as a single 'u32 flags' and is the first
    entry of task_struct.  thread_info::task is removed (it serves no
    purpose if thread_info is embedded in task_struct), and
    thread_info::cpu gets its own slot in task_struct.
    
    This is heavily based on a patch written by Linus.
    
    Originally-from: Linus Torvalds <torvalds at linux-foundation.org>
    Signed-off-by: Andy Lutomirski <luto at kernel.org>
    Cc: Borislav Petkov <bp at alien8.de>
    Cc: Brian Gerst <brgerst at gmail.com>
    Cc: Denys Vlasenko <dvlasenk at redhat.com>
    Cc: H. Peter Anvin <hpa at zytor.com>
    Cc: Jann Horn <jann at thejh.net>
    Cc: Josh Poimboeuf <jpoimboe at redhat.com>
    Cc: Linus Torvalds <torvalds at linux-foundation.org>
    Cc: Peter Zijlstra <peterz at infradead.org>
    Cc: Thomas Gleixner <tglx at linutronix.de>
    Link: http://lkml.kernel.org/r/a0898196f0476195ca02713691a5037a14f2aac5.1473801993.git.luto@kernel.org
    Signed-off-by: Ingo Molnar <mingo at kernel.org>

  commit d896fa20a70c9e596438728561e058a74ed3196b
  Author: Linus Torvalds <torvalds at linux-foundation.org>
  Date:   Tue Sep 13 14:29:23 2016 -0700

    um/Stop conflating task_struct::stack with thread_info
    
    thread_info may move in the future, so use the accessors.
    
    [ Andy Lutomirski wrote this changelog message and changed
      "task_thread_info(child)->cpu" to "task_cpu(child)". ]
    
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
    Signed-off-by: Andy Lutomirski <luto at kernel.org>
    Cc: Borislav Petkov <bp at alien8.de>
    Cc: Brian Gerst <brgerst at gmail.com>
    Cc: Denys Vlasenko <dvlasenk at redhat.com>
    Cc: H. Peter Anvin <hpa at zytor.com>
    Cc: Jann Horn <jann at thejh.net>
    Cc: Josh Poimboeuf <jpoimboe at redhat.com>
    Cc: Peter Zijlstra <peterz at infradead.org>
    Cc: Thomas Gleixner <tglx at linutronix.de>
    Link: http://lkml.kernel.org/r/3439705d9838940cc82733a7335fa8c654c37db8.1473801993.git.luto@kernel.org
    Signed-off-by: Ingo Molnar <mingo at kernel.org>

You don't have a configuration choice with x86, as it appears it's an architecture
requirement.  It's a fairly significant intrusion w/respect to the crash utility, 
so you're pretty much out of luck, for now anyway.

Any chance you can make your vmlinux/vmcore pair available for me to download?

Dave




> 
> > My crash git HEAD is:
> >
> > commit 64531dc850f2840cedafa143fe051d2cfeae5247
> > Author: Dave Anderson <anderson at redhat.com>
> > Date:   Thu Oct 13 14:32:43 2016 -0400
> >
> >      crash-7.1.5 -> crash-7.1.6
> >
> > [root at stevo1 crash]# ./crash /usr/local/src/linux-2.6/vmlinux
> > /var/crash/127.0.0.1-2016-10-17-02\:12\:50/vmcore
> >
> >
> > crash 7.1.6
> > Copyright (C) 2002-2016  Red Hat, Inc.
> > Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
> > Copyright (C) 1999-2006  Hewlett-Packard Co
> > Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
> > Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
> > Copyright (C) 2005, 2011  NEC Corporation
> > Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
> > Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
> > This program is free software, covered by the GNU General Public License,
> > and you are welcome to change it and/or distribute copies of it under
> > certain conditions.  Enter "help copying" to see the conditions.
> > This program has absolutely no warranty.  Enter "help warranty" for
> > details.
> >
> > GNU gdb (GDB) 7.6
> > Copyright (C) 2013 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later
> > <http://gnu.org/licenses/gpl.html>
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> > and "show warranty" for details.
> > This GDB was configured as "x86_64-unknown-linux-gnu"...
> >
> > crash: cannot determine thread return address
> > please wait... (gathering task table data)
> > crash: invalid structure member offset: thread_info_cpu
> >         FILE: task.c  LINE: 2364  FUNCTION: store_context()
> >
> > [./crash] error trace: 4caf3c => 4c3010 => 4bbac6 => 51da6d
> >
> >    51da6d: OFFSET_verify+189
> >    4bbac6: store_context+1030
> >    4c3010: refresh_hlist_task_table_v3+2256
> >    4caf3c: task_init+3724
> >
> > [root at stevo1 crash]#
> >
> >
> > Thanks,
> >
> >
> > Steve.
> >
> > --
> > Crash-utility mailing list
> > Crash-utility at redhat.com
> > https://www.redhat.com/mailman/listinfo/crash-utility
> >
> >
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list