public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Dave Chinner <david@fromorbit.com>
Cc: Stan Hoeppner <stan@hardwarefreak.com>, xfs@oss.sgi.com
Subject: Re: Corruption of root fs during git bisect of drm system hang
Date: Sat, 13 Jul 2013 11:05:23 +0200	[thread overview]
Message-ID: <20130713090523.GA362@x4> (raw)
In-Reply-To: <20130712070721.GA359@x4>

On 2013.07.12 at 09:07 +0200, Markus Trippelsdorf wrote:
> On 2013.07.12 at 12:17 +1000, Dave Chinner wrote:
> > On Thu, Jul 11, 2013 at 11:07:55AM +0200, Markus Trippelsdorf wrote:
> > > On 2013.07.10 at 23:12 -0500, Stan Hoeppner wrote:
> > > > On 7/10/2013 10:58 PM, Dave Chinner wrote:
> > > > > On Thu, Jul 11, 2013 at 05:36:21AM +0200, Markus Trippelsdorf wrote:
> > > > 
> > > > >> I was loosing my KDE settings bit by bit with every reboot during the
> > > > >> bisection. First my window-rules disappeared, then my desktop background
> > > > >> changed to default, then my taskbar moved from top to the bottom, etc.
> > > > >> In the end I had to restore all my .files from backup. 
> > > > > 
> > > > > That's not filesystem corruption. That sounds more like someone not
> > > > > using fsync in the apropriate place when overwriting a file....
> > > > 
> > > > From Sandeen's blog, March 2009:
> > > > 
> > > > "I dunno how to resolve this right now.  I talked to some nice KDE folks
> > > > on irc; they basically want atomic writes, either you get your old file
> > > > or your new file post-crash; and tempfile/sync/rename does this – but
> > > > the fsync hurts on 78% of the Linux filesystems out there.  So their
> > > > KSaveFile class doesn’t fsync.  So what to do, what to do.."
> > > > 
> > > > That's 4 years ago.  Is it possible the KDE devs are still not using
> > > > fsync?  Sure seems likely given Markus' problem.
> > > 
> > > Looking at the source:
> > > http://api.kde.org/4.10-api/kdelibs-apidocs/kdecore/html/ksavefile_8cpp_source.html#l00219
> > > it appears that one can set an environment variable KDE_EXTRA_FSYNC to
> > > address this issue.
> > > 
> > > However in my case it doesn't help. Even with KDE_EXTRA_FSYNC=1 I still
> > > loose my KDE settings in case of a crash. So the whole fsync thing might
> > > be a red herring.
> > > 
> > > What's more this time I endend up with undeletable files in /tmp (for
> > > example .X0-lock) after the crash:
> > > 
> > > (/dev/sdb was mounted and unmounted normally before I ran xfs_repair)
> > > 
> > > t@ubunt:~# xfs_repair /dev/sdb
> > > Phase 1 - find and verify superblock...
> > > Phase 2 - using internal log
> > >         - zero log...
> > >         - scan filesystem freespace and inode maps...
> > > agi unlinked bucket 0 is 683435008 in ag 2 (inode=4978402304)
> > > agi unlinked bucket 1 is 683435009 in ag 2 (inode=4978402305)
> > >         - found root inode chunk
> > 
> > Again, these are signs that log recovery has not completed
> > successfully or that for some reason it thought the log was clean.
> > Can you please post the dmesg output after the crash when you go
> > through the mount/unmount process before you run xfs_repair?
> 
> Sure.
> First boot after crash:
>  XFS (sdb2): Mounting Filesystem
>  XFS (sdb2): Starting recovery (logdev: internal)
>  XFS (sdb2): Ending recovery (logdev: internal)

Some further observations:

When I boot 3.2.0 after the crash log recovery works fine.

When I boot 3.9.0 after the crash I get the following:

[    2.332989] XFS (sdc2): Mounting Filesystem
[    2.406206] XFS (sdc2): Starting recovery (logdev: internal)
[    2.418147] XFS (sdc2): log record CRC mismatch: found 0xdbcaef48, expected 0x69e7934e.

[    2.432718] ffffc9000063e000: 00 00 00 01 00 00 00 00 69 01 00 00 32 d6 93 e5  ........i...2...
[    2.440218] ffffc9000063e010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.448367] XFS (sdc2): log record CRC mismatch: found 0xaf1a53d, expected 0x38ec3424.

[    2.463336] ffffc9000063e000: 00 00 00 01 00 00 00 00 69 01 00 00 9a d5 a8 e7  ........i.......
[    2.470979] ffffc9000063e010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.479128] XFS (sdc2): log record CRC mismatch: found 0x8e2572f5, expected 0x7a48b5fb.

[    2.482963] ffffc9000063e000: 00 00 00 01 00 00 00 00 69 01 00 00 be 27 a7 7a  ........i....'.z
[    2.484917] ffffc9000063e010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.487348] XFS (sdc2): log record CRC mismatch: found 0x96c174ce, expected 0x2e164f6f.

[    2.491305] ffffc9000063e000: 00 00 00 01 00 00 00 00 69 01 00 00 fc 4a 96 e7  ........i....J..
[    2.493334] ffffc9000063e010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.495923] XFS (sdc2): log record CRC mismatch: found 0x7faa3171, expected 0xff793468.

[    2.499998] ffffc9000063e000: 00 00 00 01 00 00 00 00 69 01 00 00 6e 87 7d 90  ........i...n.}.
[    2.502069] ffffc9000063e010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.504629] XFS (sdc2): log record CRC mismatch: found 0x52b46483, expected 0xc34c4ddd.

[    2.508760] ffffc9000063e000: 00 00 00 01 00 00 00 00 69 01 00 00 7e 36 3f 2b  ........i...~6?+
[    2.510865] ffffc9000063e010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.513712] XFS (sdc2): log record CRC mismatch: found 0xdbcaef48, expected 0x69e7934e.

[    2.517892] ffffc90000edf000: 00 00 00 01 00 00 00 00 69 01 00 00 32 d6 93 e5  ........i...2...
[    2.520026] ffffc90000edf010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.526166] XFS (sdc2): log record CRC mismatch: found 0xaf1a53d, expected 0x38ec3424.

[    2.530421] ffffc90000edf000: 00 00 00 01 00 00 00 00 69 01 00 00 9a d5 a8 e7  ........i.......
[    2.532584] ffffc90000edf010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.539422] XFS (sdc2): log record CRC mismatch: found 0x8e2572f5, expected 0x7a48b5fb.

[    2.544853] ffffc90000edf000: 00 00 00 01 00 00 00 00 69 01 00 00 be 27 a7 7a  ........i....'.z
[    2.547606] ffffc90000edf010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.560042] XFS (sdc2): log record CRC mismatch: found 0x96c174ce, expected 0x2e164f6f.

[    2.577113] ffffc90000edf000: 00 00 00 01 00 00 00 00 69 01 00 00 fc 4a 96 e7  ........i....J..
[    2.585729] ffffc90000edf010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.589138] usb 4-2: new full-speed USB device number 2 using ohci_hcd
[    2.614466] XFS (sdc2): log record CRC mismatch: found 0x7faa3171, expected 0xff793468.

[    2.625827] tsc: Refined TSC clocksource calibration: 3210.828 MHz
[    2.625838] Switching to clocksource tsc
[    2.648762] ffffc90000edf000: 00 00 00 01 00 00 00 00 69 01 00 00 6e 87 7d 90  ........i...n.}.
[    2.657431] ffffc90000edf010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.673246] XFS (sdc2): log record CRC mismatch: found 0x52b46483, expected 0xc34c4ddd.

[    2.691869] ffffc90000edf000: 00 00 00 01 00 00 00 00 69 01 00 00 7e 36 3f 2b  ........i...~6?+
[    2.701352] ffffc90000edf010: 00 00 00 10 69 00 00 00 4e 41 52 54 2a 00 00 00  ....i...NART*...
[    2.714524] XFS (sdc2): Ending recovery (logdev: internal)
[    2.723389] VFS: Mounted root (xfs filesystem) readonly on device 8:34.
[    2.732808] devtmpfs: mounted

When I boot the current Linus tree after the crash log recovery fails silently.

-- 
Markus

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-07-13  9:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  9:06 Corruption of root fs during git bisect of drm system hang Markus Trippelsdorf
2013-07-11  0:31 ` Dave Chinner
2013-07-11  3:36   ` Markus Trippelsdorf
2013-07-11  3:58     ` Dave Chinner
2013-07-11  4:12       ` Stan Hoeppner
2013-07-11  9:07         ` Markus Trippelsdorf
2013-07-11 11:28           ` Markus Trippelsdorf
2013-07-11 20:24             ` Stan Hoeppner
2013-07-11 20:40               ` Markus Trippelsdorf
2013-07-11 23:01                 ` Stan Hoeppner
2013-07-12  2:38                 ` Dave Chinner
2013-07-12  2:17           ` Dave Chinner
2013-07-12  7:07             ` Markus Trippelsdorf
2013-07-13  9:05               ` Markus Trippelsdorf [this message]
2013-07-15  2:28               ` Dave Chinner
2013-07-15  6:47                 ` Markus Trippelsdorf
2013-07-19 12:22                   ` [Bisected] " Markus Trippelsdorf
2013-07-19 12:41                     ` Stefan Ring
2013-07-19 12:51                       ` Markus Trippelsdorf
2013-07-19 16:02                         ` Eric Sandeen
2013-07-19 16:32                           ` Markus Trippelsdorf
2013-07-19 19:13                             ` Ben Myers
2013-07-19 19:56                               ` Markus Trippelsdorf
2013-07-19 20:28                                 ` Markus Trippelsdorf
2013-07-19 19:23                             ` Eric Sandeen
2013-07-19 19:53                               ` Markus Trippelsdorf
2013-07-19 21:11                     ` Mark Tinguely
2013-07-20  3:18                       ` Dave Chinner
2013-07-20 17:21                         ` Mark Tinguely
2013-07-21  7:37                           ` Dave Chinner
2013-07-20  1:48                     ` Dave Chinner
2013-07-22 10:22                       ` Dave Chinner
2013-07-22 10:47                         ` Markus Trippelsdorf
2013-07-22 22:54                           ` Dave Chinner
2013-07-11  4:15       ` Markus Trippelsdorf
2013-07-11  0:37 ` Stan Hoeppner
2013-07-11  3:47   ` Markus Trippelsdorf

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=20130713090523.GA362@x4 \
    --to=markus@trippelsdorf.de \
    --cc=david@fromorbit.com \
    --cc=stan@hardwarefreak.com \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox