Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-09-17 Thread Dmitry Monakhov
On Mon, 17 Sep 2012 09:52:15 -0400, Theodore Ts'o wrote: > On Mon, Sep 17, 2012 at 04:21:44PM +0400, Dmitry Monakhov wrote: > > On Wed, 15 Aug 2012 22:46:54 -0400, Theodore Ts'o wrote: > > > On Wed, Aug 15, 2012 at 09:33:29PM +0300, Marti Raudsepp wrote: > > > > I was moving and deleting some fil

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-09-17 Thread Theodore Ts'o
On Mon, Sep 17, 2012 at 04:21:44PM +0400, Dmitry Monakhov wrote: > On Wed, 15 Aug 2012 22:46:54 -0400, Theodore Ts'o wrote: > > On Wed, Aug 15, 2012 at 09:33:29PM +0300, Marti Raudsepp wrote: > > > I was moving and deleting some files between two of my ext4 partitions > > > when it suddenly crashe

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-09-17 Thread Dmitry Monakhov
On Wed, 15 Aug 2012 22:46:54 -0400, Theodore Ts'o wrote: > On Wed, Aug 15, 2012 at 09:33:29PM +0300, Marti Raudsepp wrote: > > I was moving and deleting some files between two of my ext4 partitions > > when it suddenly crashed and dropped me into an kernel oops screen > > (below). I'm using ext4 o

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-17 Thread Christoph Hellwig
On Fri, Aug 17, 2012 at 09:15:58AM -0400, Theodore Ts'o wrote: > Thanks Fengguang: > > For the record, I was able to find my own easy repro, last night using > only a 220 meg partition: > > # mke2fs -t ext4 -b 1024 -J size=1 /dev/vdc > # mount -t ext2 /dev/vdc /vdc > # mkdir /vdc/a > # cd /vdc/a

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-17 Thread Fengguang Wu
Hi Ted, On Fri, Aug 17, 2012 at 09:15:58AM -0400, Theodore Ts'o wrote: > Thanks Fengguang: > > For the record, I was able to find my own easy repro, last night using > only a 220 meg partition: > > # mke2fs -t ext4 -b 1024 -J size=1 /dev/vdc > # mount -t ext2 /dev/vdc /vdc > # mkdir /vdc/a > # c

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-17 Thread Theodore Ts'o
Thanks Fengguang: For the record, I was able to find my own easy repro, last night using only a 220 meg partition: # mke2fs -t ext4 -b 1024 -J size=1 /dev/vdc # mount -t ext2 /dev/vdc /vdc # mkdir /vdc/a # cd /vdc/a # seq 1 21 | xargs -n 1 fallocate -l 1m # seq 1 2 21 | xargs /bin/rm #

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Fengguang Wu
On Thu, Aug 16, 2012 at 11:25:13AM -0400, Theodore Ts'o wrote: > On Thu, Aug 16, 2012 at 07:10:51PM +0800, Fengguang Wu wrote: > > > > Here is the dmesg. BTW, it seems 3.5.0 don't have this issue. > > Fengguang, > > It sounds like you have a (at least fairly) reliable reproduction for > this pro

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Maciej Żenczykowski
> Thanks, that's really helpful. I can say that using a 4MB journal and > running fsstress is _not_ enough to trigger the problem. > > Looking more closely at what might be needed to trigger the bug, 'i' > gets left uninitialized when err is set to -EAGAIN, and that happens > when ext4_ext_trunca

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Theodore Ts'o
On Thu, Aug 16, 2012 at 02:40:53PM -0700, Maciej Żenczykowski wrote: > > This happened twice to me while moving data off of a ~1TB ext4 partition. > The data portion was on a stripe raid across 2 ~500GB drives, the > journal was on a relatively large partition (500MB?) on an SSD. > (crypto and lvm

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Maciej Żenczykowski
> Maciej, you weren't able to reliably repro the crash were you? I'm > pretty sure this should fix the crash, but it would be really great to > confirm things. > > I suspect creating a file system with a really small journal may make > it easier to reproduce, but I haven't had time to try create a

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Theodore Ts'o
On Thu, Aug 16, 2012 at 01:21:12PM -0700, Maciej Żenczykowski wrote: > This would probably be much more readable code if the 'i=0' init was > before path=kzalloc. Good point, I agree. I'll move the initialization so i gets initialized in both branches of the if statement. Maciej, you weren't abl

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Maciej Żenczykowski
This would probably be much more readable code if the 'i=0' init was before path=kzalloc. On Thu, Aug 16, 2012 at 8:25 AM, Theodore Ts'o wrote: > On Thu, Aug 16, 2012 at 07:10:51PM +0800, Fengguang Wu wrote: >> >> Here is the dmesg. BTW, it seems 3.5.0 don't have this issue. > > Fengguang, > > It

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Theodore Ts'o
On Thu, Aug 16, 2012 at 07:10:51PM +0800, Fengguang Wu wrote: > > Here is the dmesg. BTW, it seems 3.5.0 don't have this issue. Fengguang, It sounds like you have a (at least fairly) reliable reproduction for this problem? Is it something you can share? It would be good to get this into our te

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-16 Thread Fengguang Wu
> --- a/fs/ext4/extents.c > +++ b/fs/ext4/extents.c > @@ -2432,6 +2432,10 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode, > > /* the header must be checked already in ext4_ext_remove_space() */ > ext_debug("truncate since %u in leaf to %u\n", start, end); > + if (!path[

Re: NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-15 Thread Theodore Ts'o
On Wed, Aug 15, 2012 at 09:33:29PM +0300, Marti Raudsepp wrote: > I was moving and deleting some files between two of my ext4 partitions > when it suddenly crashed and dropped me into an kernel oops screen > (below). I'm using ext4 on kernel 3.5.1 (Arch Linux). > BUG: unable to handle kernel NULL

NULL pointer dereference in ext4_ext_remove_space on 3.5.1

2012-08-15 Thread Marti Raudsepp
Hi list, I was moving and deleting some files between two of my ext4 partitions when it suddenly crashed and dropped me into an kernel oops screen (below). I'm using ext4 on kernel 3.5.1 (Arch Linux). Both likely suspect file systems are stored on LVM2, mounted with data=writeback,errors=remount-r