Re: [9fans] venti woes with brand new install - Plan9

This is a discussion on Re: [9fans] venti woes with brand new install - Plan9 ; > hello > here is what you suggested: > > cid% venti/venti -r -L -d -s -c /dev/sdC0/arenas -a 'tcp!127.1!59999' -h 'tcp!127.1!8009' > T+0.0000 venti: conf... > corrupt zblock: 18042e0 b->_size=8192 > 64 65 66 67 68 69 6a 6b ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Re: [9fans] venti woes with brand new install

  1. Re: [9fans] venti woes with brand new install


    > hello


    > here is what you suggested:
    >
    > cid% venti/venti -r -L -d -s -c /dev/sdC0/arenas -a 'tcp!127.1!59999' -h 'tcp!127.1!8009'
    > T+0.0000 venti: conf...
    > corrupt zblock: 18042e0 b->_size=8192
    > 64 65 66 67 68 69 6a 6b
    > 6c 6d 6e 6f 70 71 72 73
    > 74 75 76 6b 00 00 00 00
    > 20 00 00 cd 22 80 01 b8
    > venti 1400: suicide: sys: trap: fault read addr=0x0 pc=0x0002120d
    > cid% acid 1400
    > /proc/1400/text:386 plan 9 executable


    found it!

    that is "defghijklmnopqrstuv..." instead of the expected "1234567890abc..."

    13 bytes!

    b->data is incremented (and b->len decremented)13 bytes to skip the
    "venti config" magic in readifile() ifile.c:39.
    and freezblock() alculates the position of the zmagic by b->data + b->_size.

    maybe add a b->_data in ZBuffer or fix ifile.c?

    cinap


  2. Re: [9fans] venti woes with brand new install

    > found it!
    >
    > that is "defghijklmnopqrstuv..." instead of the expected "1234567890abc..."
    >
    > 13 bytes!
    >
    > b->data is incremented (and b->len decremented)13 bytes to skip the
    > "venti config" magic in readifile() ifile.c:39.
    > and freezblock() alculates the position of the zmagic by b->data + b->_size.
    >
    > maybe add a b->_data in ZBuffer or fix ifile.c?
    >
    > cinap


    this might not fix everything as the tail magic was corrupted, too.

    - erik


    n/sources/plan9//sys/src/cmd/venti/srv/ifile.c:36,43 - ifile.c:36,44
    freepart(p);
    return -1;
    }
    - b->data += m;
    - b->len -= m;
    + memmove(b->data, b->data+m, 8192-m);
    + memset(b->data+8192-m, 0, 8192-m);
    +
    z = memchr(b->data, 0, b->len);
    if(z)
    b->len = z - b->data;


  3. Re: [9fans] venti woes with brand new install

    > 64 65 66 67 68 69 6a 6b
    > 6c 6d 6e 6f 70 71 72 73
    > 74 75 76 6b 00 00 00 00
    > 20 00 00 cd 22 80 01 b8


    tailmagic corrupted?

    we got:
    defghijklmnopqrstuv | k\0\0\0\0 \0\0\cd\22\80\01\b8

    we expect:
    1234567890abcdefghijklmnopqrstuv | xyz

    OverflowCheck is 32 bytes, so xyz are not included in the buffer.

    i dont think that the zmagic got corrupted.

    cinap


  4. Re: [9fans] venti woes with brand new install

    > n/sources/plan9//sys/src/cmd/venti/srv/ifile.c:36,43 - ifile.c:36,44
    > freepart(p);
    > return -1;
    > }
    > - b->data += m;
    > - b->len -= m;
    > + memmove(b->data, b->data+m, 8192-m);


    /*
    * > + memset(b->data+8192-m, 0, 8192-m);
    */

    memset(b->data + 8192-m, 0, m);

    > +
    > z = memchr(b->data, 0, b->len);
    > if(z)
    > b->len = z - b->data;


    cinap


  5. Re: [9fans] venti woes with brand new install

    re all!
    Well after quite a debugging session with cinap tonight on irc, I can confirm that the patch from eric with the modifications cinap made to it works like a charm. I was able to boot the new kernel, and it's now up and running.

    regards
    John

    On Sat, 8 Sep 2007 21:08:34 +0200
    cinap_lenrek@gmx.de wrote:

    > > n/sources/plan9//sys/src/cmd/venti/srv/ifile.c:36,43 - ifile.c:36,44
    > > freepart(p);
    > > return -1;
    > > }
    > > - b->data += m;
    > > - b->len -= m;
    > > + memmove(b->data, b->data+m, 8192-m);

    >
    > /*
    > * > + memset(b->data+8192-m, 0, 8192-m);
    > */
    >
    > memset(b->data + 8192-m, 0, m);
    >
    > > +
    > > z = memchr(b->data, 0, b->len);
    > > if(z)
    > > b->len = z - b->data;

    >
    > cinap
    >


+ Reply to Thread