Bug 15989 - Native support for compressed core files
Summary: Native support for compressed core files
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: corefiles (show other bugs)
Version: 7.6
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-01 14:54 UTC by Jeremy Nickurak
Modified: 2024-03-15 09:16 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Nickurak 2013-10-01 14:54:59 UTC
In my environment, cores are huge, so naturally we have them compressed all the time.

It would be really *really* convenient to not have to decompress the core files and store them on disk (a process that can take several minutes) just to spend 10 seconds looking at a backtrace to go "a ha!". If GDB supported reading especially gzipped core files natively, it would be a big help.
Comment 1 Pedro Alves 2013-10-01 16:09:59 UTC
You should be able to get that transparently at the filesystem level, with something like fuse's archivemount.
Comment 2 Dennis Lubert 2014-10-14 09:10:13 UTC
One (probably easy to solve) problem with something like fuse archivemount is, that it only mounts archives, so you have to create a tar.gz from it. Those file formats complicate things somewhat, and generally people do just want to compress the files (I do it with xz btw., which makes them factors smaller than gz)

Another point is (and I stumbled over this report because I wanted such a feature too) that you often have to debug on systems where this is not possible. In a company you don't have the necessary priviliges to install the fuse stuff, your kernel and/or userspace tools are too old. And you have to debug on the system where the core file is, because you have no other system with the same .so files and other stuff installed. It might be on a customers machine where all you have is your statically linked gdb...

It might not be desireable to pull dependencies of compression libraries in, but maybe gdb can support them via dlopen, and then support gz/bz2/xz/whatever if it is present.
Comment 3 Bastien Nocera 2015-01-08 08:44:49 UTC
Using fuse would just be a hack, native support inside gdb would be much more useful.
Comment 4 dilyan.palauzov@aegee.org 2019-04-07 17:33:07 UTC
systemd lz4-compresses the coredumps.  Teach gdb to open lz4 compressed coredumps, so that no unpacking is necessary.

I use gdb 8.3.50.20190319-git .
Comment 5 dilyan.palauzov@aegee.org 2019-04-07 17:37:26 UTC
I asked at https://github.com/systemd/systemd/issues/12237 to provide in systemd out-of-the-box uncompressing of coredumps, e.g. with archivemount.
Comment 6 dilyan.palauzov@aegee.org 2019-04-07 18:31:21 UTC
For the systemd’o case it was suggested to use $(coredumpctl debug PID), I think this is sufficient.
Comment 7 John Doe 2022-06-07 18:03:19 UTC
Opening and Writing coredumps compressed would be really useful, even if opening it just means that there's an automated uncompress under $TMP and then the resulting file is opened as "normal" coredump.