Bug 213842 - Core dumps invalid when written to reiserfs filesystems
Core dumps invalid when written to reiserfs filesystems
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-11-03 07:03 EST by Mark Schreiber
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-08 00:20:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mark Schreiber 2006-11-03 07:03:35 EST
Description of problem:

Core dumps built upon receipt of SIGSEGV or SIGABRT appear not to be written to
reisferfs filesystems correctly.  When gdb attempts to read these core dumps, it
complains that the file is not a valid core dump.  The problem does not seem to
occur on ext3 filesystems.

I have been able to run a program under gdb, and when it crashes, dump the core
to a file with the gcore command.  In this case, even if the core file is being
written to a reiserfs filesystem, the core file is valid.

Version-Release number of selected component (if applicable):

kernel 2.6.18-1.2798.fc6

How reproducible:

Steps to Reproduce:
# dd if=/dev/zero of=/root/reiserfsfile count=102400 
102400+0 records in
102400+0 records out
52428800 bytes (52 MB) copied, 1.26642 seconds, 41.4 MB/s
# dd if=/dev/zero of=/root/ext3fsfile count=102400
# mkfs.reiserfs -q -f /root/reiserfsfile
# mkfs.ext3 -F /root/ext3fsfile
# mkdir /root/reiserfsmnt
# mkdir /root/ext3fsmnt
# mount -o loop /root/reiserfsfile /root/reiserfsmnt
# mount -o loop /root/ext3fsfile /root/ext3fsmnt
# ulimit -c unlimited  
# cd /root/reiserfsmnt
# cat&
[1] 6070
[1]  + suspended (tty input)  cat
# kill -ABRT %1
[1]  + abort (core dumped)  cat
# gdb cat core.6070 
"/root/reiserfsmnt/core.6070" is not a core dump: File format not recognized
(gdb) ^D
# ls -l
total 68
-rw------- 1 root root 270336 Nov  3 06:51 core.6070
[Now, the same sequence of actions working properly with ext3]
# cd /root/ext3fsmnt
# cat&
[1] 6113
[1]  + suspended (tty input)  cat
Core was generated by `cat'.
Program terminated with signal 6, Aborted.
0  0x0051c402 in ?? ()
(gdb) ^D
# ls -l
total 85
-rw------- 1 root root 278528 Nov  3 06:53 core.6113
drwx------ 2 root root  12288 Nov  3 06:42 lost+found

Actual results:

gdb was not able to open the core file written to the reiserfs filesystem, but
was able to open the core file written to the ext3 filesystem.

Expected results:

I would expect gdb to open the core file written to both the reiserfs and the
ext3 filesystems.

Additional info:

Comment 1 Mark Schreiber 2006-11-03 07:47:28 EST
Ooops.  I accidently left out the line where I ran gdb on the core file stored
on the ext3 filesystem.

Just assume that right above the "0 0x0051c402" line, there's a "# gdb cat
core.*" line.
Comment 2 Eric Harney 2006-11-22 00:30:30 EST
I'm also encountering this bug on 2.6.18-1.2849.fc6.
Comment 3 Mark Schreiber 2007-09-08 00:20:46 EDT
Appears to be fixed in (may have been fixed before now, haven't
been checking regularly).

Note You need to log in before you can comment on or make changes to this bug.