linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Srivatsan Canchivaram <crsrivatstechnical@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Segmentation fault in mke2fs
Date: Sat, 14 Dec 2013 01:59:50 -0500	[thread overview]
Message-ID: <20131214065950.GB24998@thunk.org> (raw)
In-Reply-To: <CAO_L5k_cLUdXNOhsAP6TkxtTHWv5hafx1dTmruaZnVmyGG0oKg@mail.gmail.com>

On Fri, Dec 13, 2013 at 06:33:22PM -0500, Srivatsan Canchivaram wrote:
> Hello,
> 
> I found that the segmentation fault occurs in optimized code (-O2). It
> does not happen when optimization is turned off. I am not sure what
> exactly happened but mke2fs is now able to get past that point.

This is really starting to smell like a compiler bug.  Are you sure
you are using a stable version of gcc?

> The command now fails at a different point:
> 
> ext2fs_mkdir: EXT2 directory corrupted while creating /lost+found
> 
> Tracing from the ext2fs_mkdir() function, I found that the code
> returns an error here:
> ext2fs_read_dir_block3(): returns EXT2_ET_DIR_CORRUPTED

The mke2fs program has just created the root directory, and when it is
trying to link the newly created lost+found directory to the root
directory, when it reads in the just-created root directory, when it
tries to byte-swap the directory block, the values found the root
directory were insane.

Combined with the fact that the other failure was someplace completely
diferent, I'm at this point deeply suspicious about your compiler tool
chain and/or your hardware where you are conducting your tests.

      	     	  	   	     	 - Ted

  parent reply	other threads:[~2013-12-14  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 22:21 Segmentation fault in mke2fs Srivatsan Canchivaram
2013-12-13 23:33 ` Srivatsan Canchivaram
2013-12-14  1:50   ` Eric Sandeen
2013-12-14  6:59   ` Theodore Ts'o [this message]
2013-12-16 16:17     ` Srivatsan Canchivaram

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=20131214065950.GB24998@thunk.org \
    --to=tytso@mit.edu \
    --cc=crsrivatstechnical@gmail.com \
    --cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).