All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
@ 2005-09-15  7:29 Bas Vermeulen
  2005-09-15  8:58 ` Anton Altaparmakov
  0 siblings, 1 reply; 13+ messages in thread
From: Bas Vermeulen @ 2005-09-15  7:29 UTC (permalink / raw)
  To: linux-kernel

I get a kernel BUG when mounting my (dirty) NTFS volume.

Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS volume version 3.1.
Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS-fs error (device
sda2): load_system_files(): Volume is dirty.  Mounting read-only.  Run
chkdsk and mount in Windows.
Sep 12 18:54:47 laptop kernel: [4294709.063000] ------------[ cut
here ]------------
Sep 12 18:54:47 laptop kernel: [4294709.063000] kernel BUG at
fs/ntfs/aops.c:403!
Sep 12 18:54:47 laptop kernel: [4294709.063000] invalid operand: 0000
[#1]
Sep 12 18:54:47 laptop kernel: [4294709.063000] PREEMPT 
Sep 12 18:54:47 laptop kernel: [4294709.063000] Modules linked in:
nls_iso8859_1 yenta_socket rsrc_nonstatic uhci_hcd floppy
Sep 12 18:54:47 laptop kernel: [4294709.063000] CPU:    0
Sep 12 18:54:47 laptop kernel: [4294709.063000] EIP:    0060:
[<c0269d8f>]    Not tainted VLI
Sep 12 18:54:47 laptop kernel: [4294709.063000] EFLAGS: 00010203
(2.6.13-g2da65feb) 
Sep 12 18:54:47 laptop kernel: [4294709.063000] EIP is at ntfs_readpage
+0x2bf/0x2d0
Sep 12 18:54:47 laptop kernel: [4294709.063000] eax: 00000070   ebx:
c13dfb40   ecx: 00000020   edx: deede2bc
Sep 12 18:54:47 laptop kernel: [4294709.063000] esi: 00000000   edi:
c13dfb40   ebp: deede220   esp: df2b1c14
Sep 12 18:54:47 laptop kernel: [4294709.063000] ds: 007b   es: 007b
ss: 0068
Sep 12 18:54:47 laptop kernel: [4294709.063000] Process mount (pid:
2041, threadinfo=df2b0000 task=df830550)
Sep 12 18:54:47 laptop kernel: [4294709.063000] Stack: deede360 00000000
c13dfb40 df2b0000 deede35c c014576a 00000000 00000000 
Sep 12 18:54:47 laptop kernel: [4294709.063000]        c13dfb40 c13dfb40
c13dfb40 c13dfb40 00000000 c13dfb40 deede35c c014734c 
Sep 12 18:54:47 laptop kernel: [4294709.063000]        000000d0 c0269ad0
00000000 00000000 deede35c 00000000 00000000 c0271fb5 
Sep 12 18:54:47 laptop kernel: [4294709.063000] Call Trace:
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c014576a>]
add_to_page_cache+0x5a/0xb0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c014734c>]
read_cache_page+0xac/0x270
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0269ad0>]
ntfs_readpage+0x0/0x2d0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0271fb5>]
ntfs_lookup_inode_by_name+0x5d5/0xe50
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0275749>]
ntfs_read_locked_inode+0x749/0xf10
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0284c84>]
check_windows_hibernation_status+0x54/0x2f0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c02749f0>]
ntfs_init_locked_inode+0x0/0x100
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0286524>]
load_system_files+0x7e4/0xd40
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0287bf2>]
ntfs_fill_super+0x242/0x7e0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c016cc01>]
get_sb_bdev+0xb1/0x110
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c02881c9>]
ntfs_get_sb+0x19/0x1e
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c02879b0>]
ntfs_fill_super+0x0/0x7e0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c016ce9a>]
do_kern_mount+0x9a/0x170
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c018423b>]
do_new_mount+0x6b/0xc0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c018496f>] do_mount
+0x1cf/0x1e0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0181613>] iput
+0x53/0x70
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0184749>]
copy_mount_options+0x59/0xb0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c0184d09>] sys_mount
+0x79/0xb0
Sep 12 18:54:47 laptop kernel: [4294709.063000]  [<c010302b>]
sysenter_past_esp+0x54/0x75
Sep 12 18:54:47 laptop kernel: [4294709.063000] Code: ff 83 c1 80 75 0e
be f3 ff ff ff 89 74 24 1c e9 1e ff ff ff 0f 0b 8d 01 ce 2a 75 c0 eb e8
0f 0b 94 01 ce 2a 75 c0 e9 43 ff ff ff <0f> 0b 93 01 ce 2a 75 c0 e9 2b
ff ff ff 8d 74 26 00 55 57 56 53 

Not sure what's the cause, it started after the last NTFS code update.

-- 
Bas Vermeulen <bvermeul@blackstar.nl>


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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-15  7:29 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403 Bas Vermeulen
@ 2005-09-15  8:58 ` Anton Altaparmakov
  2005-09-15 19:24   ` Bas Vermeulen
  2005-09-17  9:44   ` Jean Delvare
  0 siblings, 2 replies; 13+ messages in thread
From: Anton Altaparmakov @ 2005-09-15  8:58 UTC (permalink / raw)
  To: Bas Vermeulen; +Cc: linux-kernel

Hi,

On Thu, 15 Sep 2005, Bas Vermeulen wrote:
> I get a kernel BUG when mounting my (dirty) NTFS volume.
> 
> Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS volume version 3.1.
> Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS-fs error (device
> sda2): load_system_files(): Volume is dirty.  Mounting read-only.  Run
> chkdsk and mount in Windows.
> Sep 12 18:54:47 laptop kernel: [4294709.063000] ------------[ cut
> here ]------------
> Sep 12 18:54:47 laptop kernel: [4294709.063000] kernel BUG at
> fs/ntfs/aops.c:403!

Ouch.  )-:  Could you do two things for me so I can figure out what is 
going on?

1) Apply this patch to fs/ntfs/aops.c:

--- aops.c.old	2005-09-15 09:51:30.000000000 +0100
+++ aops.c	2005-09-15 09:53:53.000000000 +0100
@@ -400,6 +400,10 @@ retry_readpage:
 		}
 		/* Compressed data streams are handled in compress.c. */
 		if (NInoNonResident(ni) && NInoCompressed(ni)) {
+			ntfs_error(ni->vol->sb, "Eeek!  i_ino = 0x%lx, "
+					"type = 0x%x, name_len = 0x%x.",
+					VFS_I(ni)->i_ino, ni->type,
+					ni->name_len);
 			BUG_ON(ni->type != AT_DATA);
 			BUG_ON(ni->name_len);
 			return ntfs_read_compressed_block(page);

2) Enable ntfs debugging in the kernel configuration.

Recompile the ntfs module (or the kernel if ntfs is built in).

Then load the new module (if not built in).

Then enable debug output (as root do):

	echo 1 > /proc/sys/fs/ntfs-debug

Now do the mount and send me the resulting dmesg output.  That should 
hopefully enable me to fix it.

Thanks!

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-15  8:58 ` Anton Altaparmakov
@ 2005-09-15 19:24   ` Bas Vermeulen
  2005-09-15 21:21     ` Anton Altaparmakov
  2005-09-17  9:44   ` Jean Delvare
  1 sibling, 1 reply; 13+ messages in thread
From: Bas Vermeulen @ 2005-09-15 19:24 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: linux-kernel

On Thu, 2005-09-15 at 09:58 +0100, Anton Altaparmakov wrote:
> Ouch.  )-:  Could you do two things for me so I can figure out what is 
> going on?
> 
> 1) Apply this patch to fs/ntfs/aops.c:

done.

> 2) Enable ntfs debugging in the kernel configuration.

done.

> Recompile the ntfs module (or the kernel if ntfs is built in).
> 
> Then load the new module (if not built in).
> 
> Then enable debug output (as root do):
> 
> 	echo 1 > /proc/sys/fs/ntfs-debug

done.

> Now do the mount and send me the resulting dmesg output.  That should 
> hopefully enable me to fix it.

The logs are below. The mount resulted in a segmentation fault.

Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS volume version 3.1.
Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS-fs error (device
sda2): load_system_files(): Volume is dirty.  Mounting read-only.  Run
chkdsk and mount in Windows.
Sep 15 21:13:43 laptop kernel: [4295071.439000] NTFS-fs error (device
sda2): ntfs_readpage(): Eeek!  i_ino = 0x5, type = 0xa0, name_len = 0x4.
Sep 15 21:13:43 laptop kernel: [4295071.439000] ------------[ cut
here ]------------
Sep 15 21:13:43 laptop kernel: [4295071.439000] kernel BUG at
fs/ntfs/aops.c:407!
Sep 15 21:13:43 laptop kernel: [4295071.439000] invalid operand: 0000
[#1]
Sep 15 21:13:43 laptop kernel: [4295071.439000] PREEMPT 
Sep 15 21:13:43 laptop kernel: [4295071.439000] Modules linked in:
parport_pc lp parport nls_iso8859_1 yenta_socket rsrc_nonstatic uhci_hcd
floppy
Sep 15 21:13:43 laptop kernel: [4295071.439000] CPU:    0
Sep 15 21:13:43 laptop kernel: [4295071.439000] EIP:    0060:
[<c026a1ff>]    Not tainted VLI
Sep 15 21:13:43 laptop kernel: [4295071.439000] EFLAGS: 00010202
(2.6.14-rc1-g03055f0b) 
Sep 15 21:13:43 laptop kernel: [4295071.439000] EIP is at ntfs_readpage
+0x30f/0x320
Sep 15 21:13:43 laptop kernel: [4295071.439000] eax: 00000000   ebx:
c12c2220   ecx: 00000000   edx: 00000000
Sep 15 21:13:43 laptop kernel: [4295071.439000] esi: c076cfa0   edi:
c12c2220   ebp: d4b00220   esp: d8bc9bf4
Sep 15 21:13:43 laptop kernel: [4295071.439000] ds: 007b   es: 007b
ss: 0068
Sep 15 21:13:43 laptop kernel: [4295071.439000] Process mount (pid:
4398, threadinfo=d8bc8000 task=c649ea70)
Sep 15 21:13:43 laptop kernel: [4295071.439000] Stack: c070690b cdc28600
c076cfa0 00000005 000000a0 00000004 00000000 00000000 
Sep 15 21:13:43 laptop kernel: [4295071.439000]        c12c2220 c12c2220
c12c2220 c12c2220 00000000 c12c2220 d4b0035c c01476bc 
Sep 15 21:13:43 laptop kernel: [4295071.439000]        000000d0 c0269ef0
00000000 00000000 d4b0035c 00000000 00000000 c0273135 
Sep 15 21:13:43 laptop kernel: [4295071.439000] Call Trace:
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c01476bc>]
read_cache_page+0xac/0x270
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c0269ef0>]
ntfs_readpage+0x0/0x320
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c0273135>]
ntfs_lookup_inode_by_name+0x5d5/0xeb0
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c0276e0e>]
ntfs_read_locked_inode+0x51e/0xf70
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c02729ed>]
__ntfs_debug+0x8d/0xc0
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c028897b>]
check_windows_hibernation_status+0x7b/0x450
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c0276330>] ntfs_iget
+0x60/0x80
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c02761d0>]
ntfs_init_locked_inode+0x0/0x100
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c028a614>]
load_system_files+0x814/0xd70
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c028bfd1>]
ntfs_fill_super+0x2a1/0x860
Sep 15 21:13:43 laptop kernel: [4295071.439000]  [<c016d021>]
get_sb_bdev+0xb1/0x110
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c0183409>]
alloc_vfsmnt+0x89/0xc0
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c028c5c9>]
ntfs_get_sb+0x19/0x1e
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c028bd30>]
ntfs_fill_super+0x0/0x860
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c016d2ba>]
do_kern_mount+0x9a/0x170
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c01845eb>]
do_new_mount+0x6b/0xc0
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c0184d1f>] do_mount
+0x1cf/0x1e0
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c0184a62>]
exact_copy_from_user+0x32/0x70
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c0184af9>]
copy_mount_options+0x59/0xb0
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c01850b9>] sys_mount
+0x79/0xb0
Sep 15 21:13:44 laptop kernel: [4295071.439000]  [<c010302b>]
sysenter_past_esp+0x54/0x75
Sep 15 21:13:44 laptop kernel: [4295071.439000] Code: ff 83 c1 80 75 0e
bf f3 ff ff ff 89 7c 24 1c e9 ce fe ff ff 0f 0b 8d 01 8b 67 75 c0 eb e8
0f 0b 98 01 8b 67 75 c0 e9 2a ff ff ff <0f> 0b 97 01 8b 67 75 c0 e9 12
ff ff ff 8d 74 26 00 55 bd d4 cf 

-- 
Bas Vermeulen <bvermeul@blackstar.nl>


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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-15 19:24   ` Bas Vermeulen
@ 2005-09-15 21:21     ` Anton Altaparmakov
  2005-09-15 22:14       ` Bas Vermeulen
  0 siblings, 1 reply; 13+ messages in thread
From: Anton Altaparmakov @ 2005-09-15 21:21 UTC (permalink / raw)
  To: Bas Vermeulen; +Cc: linux-kernel

On Thu, 15 Sep 2005, Bas Vermeulen wrote:
> Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS volume version 3.1.
> Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS-fs error (device
> sda2): load_system_files(): Volume is dirty.  Mounting read-only.  Run
> chkdsk and mount in Windows.
> Sep 15 21:13:43 laptop kernel: [4295071.439000] NTFS-fs error (device
> sda2): ntfs_readpage(): Eeek!  i_ino = 0x5, type = 0xa0, name_len = 0x4.

Great, thanks!  I suspected this might be the case but I didn't think 
that was possible.  )-:

Could you confirm for me that this ntfs volume is compressed?  (I.e. the 
compression bit is enabled on the root directory.)

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-15 21:21     ` Anton Altaparmakov
@ 2005-09-15 22:14       ` Bas Vermeulen
  2005-09-16  0:11         ` Anton Altaparmakov
  0 siblings, 1 reply; 13+ messages in thread
From: Bas Vermeulen @ 2005-09-15 22:14 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: linux-kernel

On Thu, 2005-09-15 at 22:21 +0100, Anton Altaparmakov wrote:
> On Thu, 15 Sep 2005, Bas Vermeulen wrote:
> > Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS volume version 3.1.
> > Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS-fs error (device
> > sda2): load_system_files(): Volume is dirty.  Mounting read-only.  Run
> > chkdsk and mount in Windows.
> > Sep 15 21:13:43 laptop kernel: [4295071.439000] NTFS-fs error (device
> > sda2): ntfs_readpage(): Eeek!  i_ino = 0x5, type = 0xa0, name_len = 0x4.
> 
> Great, thanks!  I suspected this might be the case but I didn't think 
> that was possible.  )-:
> 
> Could you confirm for me that this ntfs volume is compressed?  (I.e. the 
> compression bit is enabled on the root directory.)

Yes, it is compressed.

Regards,

-- 
Bas Vermeulen <bvermeul@blackstar.nl>


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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-15 22:14       ` Bas Vermeulen
@ 2005-09-16  0:11         ` Anton Altaparmakov
  0 siblings, 0 replies; 13+ messages in thread
From: Anton Altaparmakov @ 2005-09-16  0:11 UTC (permalink / raw)
  To: Bas Vermeulen; +Cc: linux-kernel

On Fri, 16 Sep 2005, Bas Vermeulen wrote:
> On Thu, 2005-09-15 at 22:21 +0100, Anton Altaparmakov wrote:
> > On Thu, 15 Sep 2005, Bas Vermeulen wrote:
> > > Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS volume version 3.1.
> > > Sep 15 21:13:43 laptop kernel: [4295071.339000] NTFS-fs error (device
> > > sda2): load_system_files(): Volume is dirty.  Mounting read-only.  Run
> > > chkdsk and mount in Windows.
> > > Sep 15 21:13:43 laptop kernel: [4295071.439000] NTFS-fs error (device
> > > sda2): ntfs_readpage(): Eeek!  i_ino = 0x5, type = 0xa0, name_len = 0x4.
> > 
> > Great, thanks!  I suspected this might be the case but I didn't think 
> > that was possible.  )-:
> > 
> > Could you confirm for me that this ntfs volume is compressed?  (I.e. the 
> > compression bit is enabled on the root directory.)
> 
> Yes, it is compressed.

Excellent, thanks.  I will try and do the fix tomorrow and send it to 
Linus.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-15  8:58 ` Anton Altaparmakov
  2005-09-15 19:24   ` Bas Vermeulen
@ 2005-09-17  9:44   ` Jean Delvare
  2005-09-17 14:51     ` Luca
  1 sibling, 1 reply; 13+ messages in thread
From: Jean Delvare @ 2005-09-17  9:44 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Bas Vermeulen, LKML

Hi Anton, Bas, all,

[Bas Vermeulen]
> > I get a kernel BUG when mounting my (dirty) NTFS volume.
> > 
> > Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS volume version
> > 3.1. Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS-fs error
> > (device sda2): load_system_files(): Volume is dirty.  Mounting
> > read-only.  Run chkdsk and mount in Windows.
> > Sep 12 18:54:47 laptop kernel: [4294709.063000] ------------[ cut
> > here ]------------
> > Sep 12 18:54:47 laptop kernel: [4294709.063000] kernel BUG at
> > fs/ntfs/aops.c:403!

I just hit the same BUG in different conditions. My NTFS volume is not
dirty, not compressed (BTW, is there a way to tell from Linux directly?)
and the BUG triggered on use (updatedb), not mount.

[Anton Altaparmakov]
> Ouch.  )-:  Could you do two things for me so I can figure out what
> is going on?
> 
> 1) Apply this patch to fs/ntfs/aops.c:
> 
> --- aops.c.old	2005-09-15 09:51:30.000000000 +0100
> +++ aops.c	2005-09-15 09:53:53.000000000 +0100
> @@ -400,6 +400,10 @@ retry_readpage:
>  		}
>  		/* Compressed data streams are handled in compress.c. */
>  		if (NInoNonResident(ni) && NInoCompressed(ni)) {
> +			ntfs_error(ni->vol->sb, "Eeek!  i_ino = 0x%lx, "
> +					"type = 0x%x, name_len = 0x%x.",
> +					VFS_I(ni)->i_ino, ni->type,
> +					ni->name_len);
>  			BUG_ON(ni->type != AT_DATA);
>  			BUG_ON(ni->name_len);
>  			return ntfs_read_compressed_block(page);
> 
> 2) Enable ntfs debugging in the kernel configuration.
> 
> Recompile the ntfs module (or the kernel if ntfs is built in).
> 
> Then load the new module (if not built in).
> 
> Then enable debug output (as root do):
> 
> 	echo 1 > /proc/sys/fs/ntfs-debug
> 
> Now do the mount and send me the resulting dmesg output.  That should 
> hopefully enable me to fix it.

I've done all this, ran updatedb and got a segmentation fault, here is
the resulting dmesg log:

NTFS driver 2.1.24 [Flags: R/O DEBUG MODULE].
NTFS volume version 3.0.
(...)
NTFS-fs DEBUG (fs/ntfs/namei.c, 135): ntfs_lookup(): Done.  (Case 1.)
NTFS-fs DEBUG (fs/ntfs/dir.c, 1121): ntfs_readdir(): Entering for inode 0x19, fpos 0xf400.
NTFS-fs DEBUG (fs/ntfs/dir.c, 1451): ntfs_readdir(): EOD, fpos 0xf400, returning 0.
NTFS-fs DEBUG (fs/ntfs/dir.c, 1121): ntfs_readdir(): Entering for inode 0x2e26, fpos 0x0.
NTFS-fs DEBUG (fs/ntfs/dir.c, 1130): ntfs_readdir(): Calling filldir for . with len 1, fpos 0x0, inode 0x2e26, DT_DIR.
NTFS-fs DEBUG (fs/ntfs/dir.c, 1139): ntfs_readdir(): Calling filldir for .. with len 2, fpos 0x1, inode 0x19, DT_DIR.
NTFS-fs DEBUG (fs/ntfs/mft.c, 155): map_mft_record(): Entering for mft_no 0x2e26.
NTFS-fs DEBUG (fs/ntfs/attrib.c, 1013): ntfs_attr_lookup(): Entering.
NTFS-fs DEBUG (fs/ntfs/mft.c, 215): unmap_mft_record(): Entering for mft_no 0x2e26.
NTFS-fs DEBUG (fs/ntfs/dir.c, 1216): ntfs_readdir(): In index root, offset 0x20.
NTFS-fs DEBUG (fs/ntfs/dir.c, 1279): ntfs_readdir(): Reading bitmap with page index 0x0, bit ofs 0x0
NTFS-fs DEBUG (fs/ntfs/mft.c, 155): map_mft_record(): Entering for mft_no 0x2e26.
NTFS-fs DEBUG (fs/ntfs/attrib.c, 1013): ntfs_attr_lookup(): Entering.
NTFS-fs DEBUG (fs/ntfs/mft.c, 215): unmap_mft_record(): Entering for mft_no 0x2e26.
NTFS-fs DEBUG (fs/ntfs/dir.c, 1310): ntfs_readdir(): Handling index buffer 0x0.
NTFS-fs error (device hda1): ntfs_readpage(): Eeek!  i_ino = 0x2e26, type = 0xa0, name_len = 0x4.
------------[ cut here ]------------
kernel BUG at fs/ntfs/aops.c:407!
invalid operand: 0000 [#1]
Modules linked in: cpufreq_powersave cpufreq_conservative powernow_k8 freq_table it87 hwmon_vid hwmon i2c_isa rtc snd_pcm_oss snd_mixer_oss smbfs ohci_hcd sr_mod cdrom sym53c8xx scsi_transport_spi scsi_mod zr36060 adv7175 saa7110 zr36067 videocodec videodev uhci_hcd ehci_hcd usbcore i2c_viapro snd_via82xx snd_ac97_codec snd_ac97_bus snd_pcm snd_timer snd_page_alloc snd_mpu401_uart snd_rawmidi snd soundcore ohci1394 eth1394 ieee1394 via_rhine mii r8169 nls_iso8859_1 nls_cp437 vfat nls_utf8 ntfs radeon drm amd64_agp agpgart
CPU:    0
EIP:    0060:[<f8862ad3>]    Not tainted VLI
EFLAGS: 00010202   (2.6.14-rc1) 
EIP is at ntfs_readpage+0x2a3/0x2eb [ntfs]
eax: 00000068   ebx: c1552220   ecx: c0367380   edx: 007c742b
esi: eaf632c0   edi: c1552220   ebp: eaf633fc   esp: f1b73e18
ds: 007b   es: 007b   ss: 0068
Process updatedb (pid: 5385, threadinfo=f1b72000 task=f15c8a90)
Stack: f887458b f7150400 f8875e40 00002e26 000000a0 00000004 c1552220 00000000 
       c1552220 00000000 c013442a c1552220 c1552220 c1552220 00000000 00000000 
       eaf633fc c0135d82 00000000 c1552220 00000000 000000d0 00000000 eaf633fc 
Call Trace:
 [<c013442a>] add_to_page_cache_lru+0x4a/0x50
 [<c0135d82>] read_cache_page+0x72/0x230
 [<f8867da2>] ntfs_readdir+0xa52/0x1690 [ntfs]
 [<f8862830>] ntfs_readpage+0x0/0x2eb [ntfs]
 [<c0161ff7>] vfs_readdir+0x77/0x90
 [<c01622e0>] filldir64+0x0/0x100
 [<c0162457>] sys_getdents64+0x77/0xcb
 [<c01622e0>] filldir64+0x0/0x100
 [<c0102cf5>] syscall_call+0x7/0xb
Code: 80 00 00 00 75 25 8b 6e 2c 85 ed 75 14 8b 44 24 30 89 44 24 48 83 c4 34 5b 5e 5f 5d e9 b7 23 00 00 0f 0b 98 01 80 51 87 f8 eb e2 <0f> 0b 97 01 80 51 87 f8 eb d1 83 c1 80 75 0d c7 44 24 24 f3 ff 

There is much more debug stuff before the BUG happens but it was a bit
large to include here. Available of request.

The relevant line in /etc/fstab is:
/dev/hda1        /mnt/win/c       ntfs        gid=497,umask=0227,nls=utf8,noexec,ro        1 0

Note that I don't care about that NTFS volume myself, I don't use it,
I'm only mounting it in order to help find bugs in the ntfs driver. It
seems to work ;)

Thanks,
-- 
Jean Delvare

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-17  9:44   ` Jean Delvare
@ 2005-09-17 14:51     ` Luca
  2005-09-19  9:39       ` Anton Altaparmakov
  0 siblings, 1 reply; 13+ messages in thread
From: Luca @ 2005-09-17 14:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jean Delvare, Anton Altaparmakov, Bas Vermeulen

Jean Delvare <khali@linux-fr.org> ha scritto:
> Hi Anton, Bas, all,
> 
> [Bas Vermeulen]
>> > I get a kernel BUG when mounting my (dirty) NTFS volume.
>> > 
>> > Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS volume version
>> > 3.1. Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS-fs error
>> > (device sda2): load_system_files(): Volume is dirty.  Mounting
>> > read-only.  Run chkdsk and mount in Windows.
>> > Sep 12 18:54:47 laptop kernel: [4294709.063000] ------------[ cut
>> > here ]------------
>> > Sep 12 18:54:47 laptop kernel: [4294709.063000] kernel BUG at
>> > fs/ntfs/aops.c:403!
>
> I just hit the same BUG in different conditions. My NTFS volume is not
> dirty, not compressed and the BUG triggered on use (updatedb), not
> mount.

Same here, but it only triggers accessing a compressed directory. I can
reproduce at will just by using 'ls' inside a compressed dir.

> (BTW, is there a way to tell from Linux directly?)

ntfsinfo(8)

Luca
-- 
Home: http://kronoz.cjb.net
Se non puoi convincerli, confondili.

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-17 14:51     ` Luca
@ 2005-09-19  9:39       ` Anton Altaparmakov
  2005-09-20 17:44         ` Luca
  2005-09-21 18:37         ` Jean Delvare
  0 siblings, 2 replies; 13+ messages in thread
From: Anton Altaparmakov @ 2005-09-19  9:39 UTC (permalink / raw)
  To: kronos; +Cc: linux-kernel, Jean Delvare, Bas Vermeulen

Hi,

On Sat, 2005-09-17 at 16:51 +0200, Luca wrote:
> Jean Delvare <khali@linux-fr.org> ha scritto:
> > Hi Anton, Bas, all,
> > 
> > [Bas Vermeulen]
> >> > I get a kernel BUG when mounting my (dirty) NTFS volume.
> >> > 
> >> > Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS volume version
> >> > 3.1. Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS-fs error
> >> > (device sda2): load_system_files(): Volume is dirty.  Mounting
> >> > read-only.  Run chkdsk and mount in Windows.
> >> > Sep 12 18:54:47 laptop kernel: [4294709.063000] ------------[ cut
> >> > here ]------------
> >> > Sep 12 18:54:47 laptop kernel: [4294709.063000] kernel BUG at
> >> > fs/ntfs/aops.c:403!
> >
> > I just hit the same BUG in different conditions. My NTFS volume is not
> > dirty, not compressed and the BUG triggered on use (updatedb), not
> > mount.
> 
> Same here, but it only triggers accessing a compressed directory. I can
> reproduce at will just by using 'ls' inside a compressed dir.

Below is the fix I just sent off to Linus.

Best regards,

        Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

Subject: [PATCH 2/3] NTFS: Fix handling of compressed directories that I broke in earlier changeset.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

---

 fs/ntfs/aops.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

4e64c88693fde1b1cbaa4cfecad43a0c3fad354e
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -389,9 +389,11 @@ retry_readpage:
 	 * Only $DATA attributes can be encrypted and only unnamed $DATA
 	 * attributes can be compressed.  Index root can have the flags set but
 	 * this means to create compressed/encrypted files, not that the
-	 * attribute is compressed/encrypted.
+	 * attribute is compressed/encrypted.  Note we need to check for
+	 * AT_INDEX_ALLOCATION since this is the type of both directory and
+	 * index inodes.
 	 */
-	if (ni->type != AT_INDEX_ROOT) {
+	if (ni->type != AT_INDEX_ALLOCATION) {
 		/* If attribute is encrypted, deny access, just like NT4. */
 		if (NInoEncrypted(ni)) {
 			BUG_ON(ni->type != AT_DATA);
@@ -1341,9 +1343,11 @@ retry_writepage:
 	 * Only $DATA attributes can be encrypted and only unnamed $DATA
 	 * attributes can be compressed.  Index root can have the flags set but
 	 * this means to create compressed/encrypted files, not that the
-	 * attribute is compressed/encrypted.
+	 * attribute is compressed/encrypted.  Note we need to check for
+	 * AT_INDEX_ALLOCATION since this is the type of both directory and
+	 * index inodes.
 	 */
-	if (ni->type != AT_INDEX_ROOT) {
+	if (ni->type != AT_INDEX_ALLOCATION) {
 		/* If file is encrypted, deny access, just like NT4. */
 		if (NInoEncrypted(ni)) {
 			unlock_page(page);



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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-19  9:39       ` Anton Altaparmakov
@ 2005-09-20 17:44         ` Luca
  2005-09-20 17:47           ` Anton Altaparmakov
  2005-09-21 18:37         ` Jean Delvare
  1 sibling, 1 reply; 13+ messages in thread
From: Luca @ 2005-09-20 17:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Anton Altaparmakov

Anton Altaparmakov <aia21@cam.ac.uk> ha scritto:
> Hi,
> 
> On Sat, 2005-09-17 at 16:51 +0200, Luca wrote:
>> Jean Delvare <khali@linux-fr.org> ha scritto:
>> > Hi Anton, Bas, all,
>> > 
>> > [Bas Vermeulen]
>> >> > I get a kernel BUG when mounting my (dirty) NTFS volume.
>> >> > 
>> >> > Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS volume version
>> >> > 3.1. Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS-fs error
>> >> > (device sda2): load_system_files(): Volume is dirty.  Mounting
>> >> > read-only.  Run chkdsk and mount in Windows.
>> >> > Sep 12 18:54:47 laptop kernel: [4294709.063000] ------------[ cut
>> >> > here ]------------
>> >> > Sep 12 18:54:47 laptop kernel: [4294709.063000] kernel BUG at
>> >> > fs/ntfs/aops.c:403!
>> >
>> > I just hit the same BUG in different conditions. My NTFS volume is not
>> > dirty, not compressed and the BUG triggered on use (updatedb), not
>> > mount.
>> 
>> Same here, but it only triggers accessing a compressed directory. I can
>> reproduce at will just by using 'ls' inside a compressed dir.
> 
> Below is the fix I just sent off to Linus.

Hi Anton,
I can confirm that the patch fixes the bug.

thanks,
Luca
-- 
Home: http://kronoz.cjb.net
"It is more complicated than you think"
                -- The Eighth Networking Truth from RFC 1925

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-20 17:44         ` Luca
@ 2005-09-20 17:47           ` Anton Altaparmakov
  0 siblings, 0 replies; 13+ messages in thread
From: Anton Altaparmakov @ 2005-09-20 17:47 UTC (permalink / raw)
  To: Luca; +Cc: linux-kernel

On Tue, 20 Sep 2005, Luca wrote:
> Anton Altaparmakov <aia21@cam.ac.uk> ha scritto:
> > On Sat, 2005-09-17 at 16:51 +0200, Luca wrote:
> >> Jean Delvare <khali@linux-fr.org> ha scritto:
> >> > Hi Anton, Bas, all,
> >> > 
> >> > [Bas Vermeulen]
> >> >> > I get a kernel BUG when mounting my (dirty) NTFS volume.
> >> >> > 
> >> >> > Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS volume version
> >> >> > 3.1. Sep 12 18:54:47 laptop kernel: [4294708.961000] NTFS-fs error
> >> >> > (device sda2): load_system_files(): Volume is dirty.  Mounting
> >> >> > read-only.  Run chkdsk and mount in Windows.
> >> >> > Sep 12 18:54:47 laptop kernel: [4294709.063000] ------------[ cut
> >> >> > here ]------------
> >> >> > Sep 12 18:54:47 laptop kernel: [4294709.063000] kernel BUG at
> >> >> > fs/ntfs/aops.c:403!
> >> >
> >> > I just hit the same BUG in different conditions. My NTFS volume is not
> >> > dirty, not compressed and the BUG triggered on use (updatedb), not
> >> > mount.
> >> 
> >> Same here, but it only triggers accessing a compressed directory. I can
> >> reproduce at will just by using 'ls' inside a compressed dir.
> > 
> > Below is the fix I just sent off to Linus.
> 
> Hi Anton,
> I can confirm that the patch fixes the bug.

Cool, thanks.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-19  9:39       ` Anton Altaparmakov
  2005-09-20 17:44         ` Luca
@ 2005-09-21 18:37         ` Jean Delvare
  2005-09-21 19:34           ` Anton Altaparmakov
  1 sibling, 1 reply; 13+ messages in thread
From: Jean Delvare @ 2005-09-21 18:37 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: kronos, linux-kernel, Bas Vermeulen

Hi Anton,

> Below is the fix I just sent off to Linus.

2.6.14-rc2 works for me.

Thanks,
-- 
Jean Delvare

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

* Re: 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403
  2005-09-21 18:37         ` Jean Delvare
@ 2005-09-21 19:34           ` Anton Altaparmakov
  0 siblings, 0 replies; 13+ messages in thread
From: Anton Altaparmakov @ 2005-09-21 19:34 UTC (permalink / raw)
  To: Jean Delvare; +Cc: kronos, linux-kernel, Bas Vermeulen

Hi,

On Wed, 21 Sep 2005, Jean Delvare wrote:
> > Below is the fix I just sent off to Linus.
> 
> 2.6.14-rc2 works for me.

Great, thanks.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

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

end of thread, other threads:[~2005-09-21 19:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-15  7:29 2.6.14-rc1 - kernel BUG at fs/ntfs/aops.c:403 Bas Vermeulen
2005-09-15  8:58 ` Anton Altaparmakov
2005-09-15 19:24   ` Bas Vermeulen
2005-09-15 21:21     ` Anton Altaparmakov
2005-09-15 22:14       ` Bas Vermeulen
2005-09-16  0:11         ` Anton Altaparmakov
2005-09-17  9:44   ` Jean Delvare
2005-09-17 14:51     ` Luca
2005-09-19  9:39       ` Anton Altaparmakov
2005-09-20 17:44         ` Luca
2005-09-20 17:47           ` Anton Altaparmakov
2005-09-21 18:37         ` Jean Delvare
2005-09-21 19:34           ` Anton Altaparmakov

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.