linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Commit c1a1e7fc24d6 causes segfault in ext2fs_new_inode
@ 2012-03-30 12:57 Richard W.M. Jones
  2012-03-30 13:19 ` Richard W.M. Jones
  2012-04-05  3:56 ` Commit c1a1e7fc24d6 causes segfault in ext2fs_new_inode Eric Sandeen
  0 siblings, 2 replies; 17+ messages in thread
From: Richard W.M. Jones @ 2012-03-30 12:57 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Sami Liedes

[I'm tracking this issue here:
https://bugzilla.redhat.com/show_bug.cgi?id=808421]

febootstrap uses the ext2fs library to construct an ext2 filesystem.

Since we updated to the latest version in git, febootstrap segfaults
in ext2fs_find_first_zero_generic_bmap (called from ext2fs_new_inode).
There's a complete stack trace in the bug above.

I'm not claiming that we are calling this library correctly, but,
you know, "it always worked until now".

Here is the calling code:

https://github.com/libguestfs/febootstrap/blob/636a80b5a70382f21da47c44a0acd3efa2bc7fcf/helper/ext2.c#L142

git bisect points to this change being the one which causes the
problem:

c1a1e7fc24d6e37f931bbb8eeb29c90243f0a55d is the first bad commit
commit c1a1e7fc24d6e37f931bbb8eeb29c90243f0a55d
Author: Sami Liedes <sami.liedes@iki.fi>
Date:   Sat Mar 10 22:36:12 2012 +0200

    libext2fs: Implement ext2fs_find_first_zero_generic_bmap().
    
    This function searches a bitmap for the first zero bit within a range.
    It checks if there is a bitmap backend specific implementation
    available (if the relevant field in bitmap_ops is non-NULL). If not,
    it uses a generic and slow method by repeatedly calling test_bmap() in
    a loop. Also change ext2fs_new_inode() to use this new function.
    
    This change in itself does not result in a large speedup, rather it
    refactors the code in preparation for the introduction of a faster
    find_first_zero() for bitarray based bitmaps.
    
    Signed-off-by: Sami Liedes <sami.liedes@iki.fi>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-04-09 16:14 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 12:57 Commit c1a1e7fc24d6 causes segfault in ext2fs_new_inode Richard W.M. Jones
2012-03-30 13:19 ` Richard W.M. Jones
2012-03-30 19:38   ` Eric Sandeen
2012-03-30 22:25     ` Eric Sandeen
2012-04-06 19:14     ` Sami Liedes
2012-04-06 19:19       ` Eric Sandeen
2012-04-06 19:31         ` Eric Sandeen
2012-04-06 19:47           ` Sami Liedes
2012-04-06 19:49             ` Eric Sandeen
2012-04-06 19:22       ` Richard W.M. Jones
2012-04-06 20:06       ` Ted Ts'o
2012-04-06 18:57   ` Ted Ts'o
2012-04-06 18:59     ` [PATCH 1/3] libext2fs: add 32-bit compat code for ext2fs_find_first_zero_generic_bmap() Theodore Ts'o
2012-04-06 18:59       ` [PATCH 2/3] libext2fs: use correct types in ext2fs_find_first_zero_block_bitmap2() Theodore Ts'o
2012-04-06 18:59       ` [PATCH 3/3] libext2fs: improve testing coverage of tst_bitmaps Theodore Ts'o
2012-04-09 16:14       ` [PATCH 1/3] libext2fs: add 32-bit compat code for ext2fs_find_first_zero_generic_bmap() Eric Sandeen
2012-04-05  3:56 ` Commit c1a1e7fc24d6 causes segfault in ext2fs_new_inode Eric Sandeen

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).