crash-utility / crash-extensions Goto Github PK
View Code? Open in Web Editor NEWcrash extension modules
Home Page: https://crash-utility.github.io/extensions.html
License: GNU General Public License v3.0
crash extension modules
Home Page: https://crash-utility.github.io/extensions.html
License: GNU General Public License v3.0
Crash: 7.2.9
Gcore extension: 1.6.1
I'm trying to extract the current user-space application's core file from a kernel dump (vmcore) using crash + gcore extension. But user-space core file generation is failing:
crash> gcore
gcore: seek error: physical address: 7ec56eab type: "fill_psinfo: pr_psargs"
Failed.
Interestingly, applying the following patch to the gcore extension code makes this problem go away and the generated core dump also seems to work. The path basically comments out the specified block of code (which seems to be trying to get the process's command line arguments?).
diff --git a/home/ishraq/git/crash-utility/crash-extensions/crash-gcore-command-1.6.1/libgcore/gcore_coredump.c b/home/ishraq/git/crash-utility/crash/extensions/libgcore/gcore_coredump.c
index 318539f..ddbf20b 100644
--- a/home/ishraq/git/crash-utility/crash-extensions/crash-gcore-command-1.6.1/libgcore/gcore_coredump.c
+++ b/home/ishraq/git/crash-utility/crash/extensions/libgcore/gcore_coredump.c
@@ -312,6 +312,7 @@ fill_psinfo_note(struct elf_note_info *info, struct task_context *tc,
/* first copy the parameters from user space */
BZERO(psinfo, sizeof(struct elf_prpsinfo));
+ /*
mm_cache = fill_mm_struct(task_mm(tc->task, FALSE));
arg_start = ULONG(mm_cache + GCORE_OFFSET(mm_struct_arg_start));
@@ -330,6 +331,7 @@ fill_psinfo_note(struct elf_note_info *info, struct task_context *tc,
if (psinfo->pr_psargs[i] == 0)
psinfo->pr_psargs[i] = ' ';
psinfo->pr_psargs[len] = 0;
+ */
readmem(tc->task + GCORE_OFFSET(task_struct_real_parent), KVADDR,
&parent, sizeof(parent), "fill_psinfo: real_parent",
To me it appears that there is something wrong while getting the arguments passed to the process when it was launched? I was also thinking, could this be something related to stack randomisation?
Thanks in advance.
Cheers.
I am looking for gcore extension to use it alongside crash so that i can generate the coredump of a process use gdb to analyse userside stack. If gcore has been replaced with a newer extension, please let me know.
Whatever I configure Frame Pointer Unwinder or ORC Unwinder on my x86_64 machine, I can only get the same "......" string by the fp command. Could you show me the reason? Or tell me what I didn't notice?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.