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

core dumps don't work on some buggy kernels (patch included) #11

Open
GoogleCodeExporter opened this issue Feb 1, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. install ubuntu 10.04 
2. generate a core dump either with gcore or google-coredumper
3. try to load core dump in GDB.

What is the expected output? What do you see instead?
should actually have a usable core dump. instead you get a pile of shit.

i'm attaching a patch which adds a "--with-relrobug" flag to configure, which 
enables a define, which slightly tweaks the elfcore.c code to output segments 
which are marked as read-only, because one particular page in one of these read 
only segments is actually dirty.

let me know how i can help get this (or an equivalent) fix included.

Original issue reported on code.google.com by ice...@gmail.com on 17 Nov 2011 at 8:18

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi,

To be slightly more precise, the kernel is not "buggy". It seems you are using 
an executable and/or dynamic libraries which were compiled with the relro 
option of the linker. This is the default with recent GNU ld. Compiling your 
binary with the ld option -z norelro is a possible workaround, however not very 
nice.

The patch you provided works, but doesn't fit my needs. In case of huge 
applications, that would dump everything, in particular shared libraries, which 
means an overhead of hundreds of MBs in the resulting core dump file.

I developed this patch that aims at dumping only the mappings that are needed 
by gdb. The basic idea is to also dump region that are file backed, readonly, 
but with at least one anonymous page (meaning the original file content was 
altered). This has been tested on x64 SLES 11 SP1 boxes.

Cheers,
Romain

Original comment by romain.g...@gmail.com on 19 Mar 2015 at 10:52

Attachments:

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

No branches or pull requests

1 participant