Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if must include symbol of crash_notes to use bt for target=ARM #68

Open
taigerhu opened this issue Oct 28, 2020 · 2 comments
Open

if must include symbol of crash_notes to use bt for target=ARM #68

taigerhu opened this issue Oct 28, 2020 · 2 comments

Comments

@taigerhu
Copy link

taigerhu commented Oct 28, 2020

hi

I met below warning when to use bt in version 7.2.8 to analyze offline ramdump for ARM.

bt: WARNING: cannot determine starting stack frame for task

i already checked related issue and code, i added debug code, and found no crash_notes symbol, note that arm_get_crash_notes():

 544 static void
 545 arm_get_crash_notes(void)
 546 {
 547         struct machine_specific *ms = machdep->machspec;
 548         ulong crash_notes;
 549         Elf32_Nhdr *note;
 550         ulong offset;
 551         char *buf, *p;
 552         ulong *notes_ptrs;
 553         ulong i, found;
 554
 555         if (!symbol_exists("crash_notes"))
 556                 return;

only arm_init() will call arm_get_crash_notes().

		if (!ACTIVE())
			arm_get_crash_notes();

And the "crash_notes' is from kexec, rt?

139#ifdef CONFIG_KEXEC
140#include <linux/kexec.h>
141
142static ssize_t show_crash_notes(struct device *dev, struct device_attribute *attr,
143				char *buf)

so, kernel must configurate CONFIG_KEXEC=y to use bt command to analyze dumpfile for ARM/ARM64?

btw: seems lots of android kernel do not enable the CONFIG_KEXEC.

Thx.,

@k-hagio
Copy link
Contributor

k-hagio commented Nov 24, 2020

so, kernel must configurate CONFIG_KEXEC=y to use bt command to analyze dumpfile for ARM/ARM64?

Looks so in the current implementation. I'm not familiar with ramdump and not sure if there is a way to get CPU registers without the crash_notes. I think they are needed to use bt command for active tasks.

@praton1729
Copy link

@taigerhu I tried with CONFIG_KEXEC enabled on a Qualcomm chipset but still, I get the same error when I try bt. I checked the panic_task_regs also through help -m but they are still coming out to be zero, I have verified by adding debug logs that crash notes exist after enabling CONFIG_KEXEC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants