From: Martin Buck <mb-tmp-xreary.bet@gromit.dyndns.org>
To: linux-kernel@vger.kernel.org
Subject: Ramdisk corruption in 2.4.25
Date: Mon, 16 Aug 2004 20:17:04 +0200 [thread overview]
Message-ID: <20040816181704.GA16063@gromit.at.home> (raw)
I'm having problems with corruption of ramdisk contents on a small embedded
MIPS board. I'm using kernel 2.4.25 from linux-mips.org, but its rd.c is
identical to the one in plain 2.4.25. Symptoms are that a short time after
starting /sbin/init, some ramdisk contents get corrupted (the contents are
OK when /sbin/init starts). What usually happens is that some part of one
file (several 100 bytes, but usually *not* a power of 2) shows up somewhere
in another file or at a different position in the same file.
The filesystem on the ramdisk is ext2, the ramdisk is loaded via initrd
from a gzipped image and is used as root filesystem. It's usually mounted
rw, but to make sure it's not me or ext2 corrupting the files, I also tried
mounting it ro. User space is busybox/uClibc based. About the smallest test
case I could come up with is by replacing /sbin/init with the following
shell script. Note that at this time, no hardware-specific drivers are
loaded:
#!/bin/sh
md5sum /dev/ram0
md5sum /dev/ram0
md5sum /dev/ram0
md5sum /dev/ram0
md5sum /dev/ram0
Corruption currently happens between the 2nd and 3rd md5sum, but I've had
different setups (with a real /sbin/init) which ran much more commands
before corruption showed up. This is the output I get:
[...]
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1272k freed
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 68k freed
Algorithmics/MIPS FPU Emulator v1.5
dfd6710a4a6d0b0d5492d5d683c1ad5e /dev/ram0
dfd6710a4a6d0b0d5492d5d683c1ad5e /dev/ram0
a62a7629e2c3bbfe0880aa2bce66e5cc /dev/ram0
a62a7629e2c3bbfe0880aa2bce66e5cc /dev/ram0
a62a7629e2c3bbfeKernel panic: Attempted to kill init!
0880aa2bce66e5cc /dev/ram0
The first 2 md5sums are the ones that match my actual initrd image.
Since this seems to be some kind of Heisenbug, I doubt that anybody will be
able to reproduce this easily. So what I'd appreciate instead are some
hints how to debug this myself, or any other suggestions.
Thanks a lot,
Martin
reply other threads:[~2004-08-16 18:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040816181704.GA16063@gromit.at.home \
--to=mb-tmp-xreary.bet@gromit.dyndns.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox