Re: 1352 NUL bytes at the end of a page? (was Re: Assertion `s && s->tree' failed: The saga continues.)

Steven Cole
2004-05-17T23:56:03Z

[-- Attachment #1: Type: text/plain, Size: 2762 bytes --]

On Monday 17 May 2004 03:29 pm, Andrew Morton wrote:
> Steven Cole <elenstev@mesatop.com> wrote:
> >
> > 1) Apply your patch to 2.6.6-current, build with PREEMPT
> > 2) Test bk pull via ppp on reiserfs until and if it breaks.
> > 3) Test bk pull via ppp on ext3 and take a look at the s.ChangeSet file
> > if/when the failure occurs.
> > 4) Apply akpm's patch here:
> > http://marc.theaimsgroup.com/?l=linux-kernel&m=108478018304305&w=2
> > 5) Repeat 2,3
>
> Nope. Please just see if this makes the problem go away:
>
> --- 25/fs/buffer.c~a Mon May 17 14:28:51 2004
> +++ 25-akpm/fs/buffer.c Mon May 17 14:29:02 2004
> @@ -2723,7 +2723,6 @@ int block_write_full_page(struct page *p
> * writes to that region are not written out to the file."
> */
> kaddr = kmap_atomic(page, KM_USER0);
> - memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset);
> flush_dcache_page(page);
> kunmap_atomic(kaddr, KM_USER0);
> return __block_write_full_page(inode, page, get_block, wbc);
>
> _
>
> If this patch is confirmed to fix things up, then and only then should you
> bother testing the vmtruncate patch.
>
> Thanks.
>
>
OK, applied your one-liner above with PREEMPT.

Pull bk://linux.bkbits.net/linux-2.5
-> file://home/steven/BK/save-2.6
---------------------- Receiving the following csets -----------------------
1.1727 1.1726 1.1725 1.1626.1.10 1.1626.1.9 1.1626.1.8 1.1626.1.7
1.1612.11.1 1.1371.746.12 1.1371.746.11 1.1371.746.10 1.1371.746.9
1.1371.746.8 1.1371.746.7 1.1371.746.6 1.1371.746.5 1.1371.746.4
1.1371.746.3 1.1371.746.2 1.1371.746.1
----------------------------------------------------------------------------
ChangeSet: 20 deltas
[snipped list of files]
---------------------------------------------------------------------------
takepatch: saved entire patch in PENDING/2004-05-17.01
---------------------------------------------------------------------------
Applying  20 revisions to ChangeSet renumber: can't read SCCS info in "RESYNC/SCCS/s.ChangeSet"       .
bk: takepatch.c:1343: applyCsetPatch: Assertion `s && s->tree' failed.
11760 bytes uncompressed to 57721, 4.91X expansion
[steven@spc save-2.6]$ exit
Script done, file is test1
[steven@spc save-2.6]$ saga <RESYNC/SCCS/s.ChangeSet
Found null start 0xfb259a end 0xfb3000 len 0xa66 line 478846

The above was on reiserfs and happened on the very first pull.

Attaching the source of saga.c for reference.

So, what next doc?  Back out that one-liner and try your vmtruncate?
Or try Chris' patch for reiserfs?

At the moment I'm testing on ext3, which survived the two pull/unpulls.
This is like watching paint dry.

I'll do some more bk unpull and bk pull cycles until this breaks on ext3.

Steven

[-- Attachment #2: saga.c --]
[-- Type: text/x-csrc, Size: 388 bytes --]

#include <stdio.h>
main()
{
int c, where = -1, line = 0;
int start;
int null = 0;

while ((c = getchar()) != EOF) {
where++;
if (c == '\n') line++;
if (c && null) {
fprintf(stderr,
"Found null start 0x%x end 0x%x len 0x%x line %d\n",
start, where, where - start, line);
}
if (c) {null = 0; continue;}
if (null) continue;
start = where;
null = 1;
}
}