All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Russell Zuck <rzuck@cincinnatitechnologies.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBIFS corruption after software upgrade
Date: Fri, 31 Aug 2012 14:21:01 +0300	[thread overview]
Message-ID: <1346412061.9709.37.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <5037BFFA.1020208@cincinnatitechnologies.com>

[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]

> $ ./integck -p /mnt/ubifs
> 
> ..fails soon after I run the test.  There is a ton of logged data.  I've 
> attempted to snip out the first error.

How exactly?

Sure there will be a lot of nise in dmesg because we emulate power cuts
and switch to R/O mode at random moments, so a lot of UBIFS operastions
fail and print a lot of error messages and dumps. But that's fine as
long as the system works.

The idea is that UBIFS switches to R/O mode randomly and integck will
fail with EROFS at some point. Then it will unmount the FS and mount it
back, and verify some files, then remove everything and continue, and so
on forever. This way we emulate huge amount of power cuts very quickly.

If integck fails, then the last messages of dmesg are interesting.

Last time I tested UBIFS this way, the only issues which I did not
resolve were that it was unable to mount because there was no space.
That was very rare and I had to run it for the night. I just did not
have time to dig this - must be some accounting issues.

> [  376.076585] UBIFS: cannot re-mount R/W due to prior errors
> [  376.082748] UBIFS: un-mount UBI device 1, volume 0
> [  376.095799] UBIFS error (pid 2103): ubifs_scan: bad node
> [  376.105554] UBIFS: recovered master node from LEB 1
> ============= end snip ========================
> 
> Does anything in this output suggest a direction to start digging?  I 
> would really appreciate any direction you could provide.

Hmm. I've just set up ubifs-v2.6.35 on a kvm virtual machine and started
testing like this:

$ cat ~/tmp/nandsim.sh 
#!/bin/sh

umount /mnt/ubifs
rmmod ubifs ubi mtdram nandsim

dmesg -c > /dev/null
modprobe nandsim first_id_byte=0xec second_id_byte=0xd3 third_id_byte=0x51 fourth_id_byte=0x95
modprobe ubi mtd=0
modprobe mtdchar
ubimkvol /dev/ubi0 --lebs 4064 -N xyZ
mount -t ubifs /dev/ubi0_0 /mnt/ubifs
echo 1 > /sys/kernel/debug/ubifs/tst_recovery
#echo 'format "UBIFS DBG" +pf' > /sys/kernel/debug/dynamic_debug/control

$ sudo ~/tmp/nandsim.sh
# sudo ./integck /mnt/ubifs/

Let's see. I will try to look at failures, but so far it works fine. But
I do not promise anything - I have limited amount of time for this hobby
stuff.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2012-08-31 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 21:02 UBIFS corruption after software upgrade Russell Zuck
2012-08-01 12:40 ` Russell Zuck
2012-08-02  2:10   ` Subodh Nijsure
2012-08-22 13:18   ` Artem Bityutskiy
2012-08-24 17:55     ` Russell Zuck
2012-08-27 16:17       ` Russell Zuck
2012-08-31 11:21       ` Artem Bityutskiy [this message]
2012-08-22 13:21   ` Artem Bityutskiy
2012-08-22 13:02 ` Artem Bityutskiy
2012-08-31 11:30 ` Artem Bityutskiy

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=1346412061.9709.37.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rzuck@cincinnatitechnologies.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.