----- Original Message ----- > Greetings, > > I know absolutely nothing about how crash maintenance is done, and very > damn little about crash's gizzard, so please consider the below a bug > report, a patch.. or bloody annoying spam, as you see fit. Hi Mike, No, it's most definitely appreciated. Normally patches are posted on the crash utility mailing list (crash-utility@xxxxxxxxxx), but this is fine. And speaking of the mailing list, there was a bug report and subsequent thread yesterday concerning this issue: https://www.redhat.com/archives/crash-utility/2018-April/msg00000.html It was unresolved because the thread_union still exists in the most recent upstream sources, and I can still see the union declaration in the most recent Fedora kernel. It's there now, but maybe the x86 kernel doesn't reference it so it doesn't get picked up in the debuginfo data? Not sure I understand, but regardless, this patch looks good to me. I'm also forwarding this email to the mailing list and the original bug reporter. Thanks again, Dave > > If the later, listen closely, and you'll hear "Sorry 'bout that" coming > from the bottom of your trashcan :) > > -Mike > > --- > > As of kernel commit 0500871f21b2, init_thread_union size became zero, > leaving thread_union and machdep->stacksize undetermined, breaking bt. > > crash> bt 1 > PID: 1 TASK: ffff9bf444c02200 CPU: 1 COMMAND: "systemd" > #0 [ffffadc8428c3d50] __schedule at ffffffffbd704790 > bt: invalid RSP: ffffadc8428c3d50 bt->stackbase/stacktop: > ffffadc8428c0000/ffffadc8428c2000 cpu: 1 > crash> > > Fall back to computing size via __end_init_task - __start_init_task. > > crash> bt 1 > PID: 1 TASK: ffff9bf444c02200 CPU: 1 COMMAND: "systemd" > #0 [ffffadc8428c3d50] __schedule at ffffffffbd704790 > #1 [ffffadc8428c3dd0] schedule at ffffffffbd704bd0 > #2 [ffffadc8428c3de8] schedule_hrtimeout_range_clock at ffffffffbd707a66 > #3 [ffffadc8428c3e50] ep_poll at ffffffffbd29bac0 > #4 [ffffadc8428c3ef8] sys_epoll_wait at ffffffffbd29d612 > #5 [ffffadc8428c3f30] do_syscall_64 at ffffffffbd001b79 > #6 [ffffadc8428c3f50] entry_SYSCALL_64_after_hwframe at ffffffffbd80009f > RIP: 00007f987b26d463 RSP: 00007fff36092e40 RFLAGS: 00000293 > RAX: ffffffffffffffda RBX: 000055a96c5accd0 RCX: 00007f987b26d463 > RDX: 000000000000005e RSI: 00007fff36092e50 RDI: 0000000000000004 > RBP: 00007fff360933c0 R8: 21ad2c5bde36816b R9: 000055a96a66b9e0 > R10: 00000000ffffffff R11: 0000000000000293 R12: 0000000000000001 > R13: 00007fff36092e50 R14: ffffffffffffffff R15: 0000000000000000 > ORIG_RAX: 00000000000000e8 CS: 0033 SS: 002b > crash> > > Signed-off-by: Mike Galbraith <efault@xxxxxx> > --- > task.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > --- a/task.c > +++ b/task.c > @@ -438,8 +438,21 @@ task_init(void) > len = SIZE(task_union)); > machdep->stacksize = len; > } else if (VALID_SIZE(thread_union) && > - ((len = SIZE(thread_union)) != STACKSIZE())) > + ((len = SIZE(thread_union)) != STACKSIZE())) { > machdep->stacksize = len; > + } else { > + /* > + * Post kernel commit 0500871f21b2, init_thread_union size > + * became zero. Use __end_init_task - __start_init_task. > + */ > + if (kernel_symbol_exists("__start_init_task") && > + kernel_symbol_exists("__end_init_task")) { > + len = symbol_value("__end_init_task"); > + len -= symbol_value("__start_init_task"); > + ASSIGN_SIZE(thread_union) = len; > + machdep->stacksize = len; > + } > + } > > MEMBER_OFFSET_INIT(pid_namespace_idr, "pid_namespace", "idr"); > MEMBER_OFFSET_INIT(idr_idr_rt, "idr", "idr_rt"); > -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility