[9fans] p9_errstr2errno unknown mode - Plan9

This is a discussion on [9fans] p9_errstr2errno unknown mode - Plan9 ; Moin, I've mounted my Plan 9 fileserver via 9p from a linuxbox (2.6.23). I can create new files without problems. If I try to copy a file to the Plan 9 fileserver I got: p9_errstr2errno: errstr :unknown mode: not found ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: [9fans] p9_errstr2errno unknown mode

  1. [9fans] p9_errstr2errno unknown mode

    Moin,

    I've mounted my Plan 9 fileserver via 9p from a linuxbox (2.6.23). I can
    create new files without problems. If I try to copy a file to the Plan
    9 fileserver I got:

    p9_errstr2errno: errstr :unknown mode: not found
    p9_errstr2errno: errstr :unknown mode: not found

    How can I fix this?
    Matthias



  2. Re: [9fans] p9_errstr2errno unknown mode

    On Sun, Apr 6, 2008 at 3:47 AM, Matthias Teege wrote:
    > Moin,
    >
    > I've mounted my Plan 9 fileserver via 9p from a linuxbox (2.6.23). I can
    > create new files without problems. If I try to copy a file to the Plan
    > 9 fileserver I got:
    >
    > p9_errstr2errno: errstr :unknown mode: not found
    > p9_errstr2errno: errstr :unknown mode: not found
    >


    It must be doing something in the twstat that isn't correct, can you
    send me a 9p trace (either from the client by enabling debug
    (debug=0xffff during mount) or the server.

    Does it happen for all files, or just certain files?

    -eric


  3. Re: [9fans] p9_errstr2errno unknown mode

    > It must be doing something in the twstat that isn't correct, can you
    > send me a 9p trace (either from the client by enabling debug
    > (debug=0xffff during mount) or the server.


    sudo /bin/mount -t 9p -o uid=1000,gid=1000,user,uname=xom,proto=unix,noexte nd,noauto,debug=0xffff /tmp/ns.m/rn /n/rn
    doesn't give me any output in /var/log/messages

    I've made a tcpdump [1].

    > Does it happen for all files, or just certain files?


    I don't found a file that works.

    Many thanks
    Matthias

    http://mteege.de/2008/04/p9.dmp



  4. Re: [9fans] p9_errstr2errno unknown mode

    Unless this file got truncated, all I see here are walks and stats and
    clunks of a file, nothing more (I used wireshark to walk the file --
    it breaks out 9p pretty nicely). I don't see any twstat or open or
    create ... Am I missing something?

    ron


  5. Re: [9fans] p9_errstr2errno unknown mode

    btw, this 'unkown mode' -- what is all this you wonder?
    what's
    p9_errstr2errno: errstr :unknown mode: not found

    Not found? Huh? This is the errstr (from plan 9) to errno (for
    ancient, primitive OSes that don't have errstr, i.e. 'all of them').

    I see in fossil/9p.c this for create:
    if(omode == OREAD || omode == ORDWR || omode == OEXEC)
    open |= FidORead;
    if(omode == OWRITE || omode == ORDWR)
    open |= FidOWrite;
    if((open & (FidOWrite|FidORead)) == 0){
    vtSetError("unknown mode");
    goto error;
    }

    Or this for open:
    if((open & (FidOWrite|FidORead)) == 0){
    vtSetError("unknown mode");
    goto error;
    }

    So, seems linux client is sending bad omode?

    we sure could use that trace.

    ron


  6. Re: [9fans] p9_errstr2errno unknown mode

    > Unless this file got truncated, all I see here are walks and stats and

    The file isn't truncated.

    > clunks of a file, nothing more (I used wireshark to walk the file --
    > it breaks out 9p pretty nicely). I don't see any twstat or open or
    > create ... Am I missing something?


    I made a second dump [1] but I don't see any twstat in wireshark to. The
    dump is for the following commands:

    ; cp /n/crn/usr/mtg/testmail.txt /tmp
    ; cp /tmp/testmail.txt /n/crn/usr/mtg/testmail2.txt

    Reading isn't a problem. Is it possible that the error is generated
    before anything hitting the network?

    Matthias

    http://mteege.de/2008/04/p92.dmp



  7. Re: [9fans] p9_errstr2errno unknown mode

    On Sun, Apr 6, 2008 at 11:57 PM, Matthias Teege wrote:

    > ; cp /n/crn/usr/mtg/testmail.txt /tmp
    > ; cp /tmp/testmail.txt /n/crn/usr/mtg/testmail2.txt


    I'm more confused. You get the same error for each of these?

    to sum up:

    these are running on linux. First is copy from remote plan 9 system to
    local /tmp.
    second is copy from local /tmp to remote plan 9 server. Is that it?

    what's dmesg show?

    ron


  8. Re: [9fans] p9_errstr2errno unknown mode

    On Sun, Apr 6, 2008 at 11:57 PM, Matthias Teege wrote:

    >
    > ; cp /n/crn/usr/mtg/testmail.txt /tmp
    > ; cp /tmp/testmail.txt /n/crn/usr/mtg/testmail2.txt


    sorry, being dumb, time to go to bed. So the trace clearly shows the
    first one succeeding.

    There's never any sign that the second command even happens. How are
    you capturing this data? I don't see any bits from the second command.

    Oh well, off to bed, I'll read your answer tomorrow :-)

    ron


  9. Re: [9fans] p9_errstr2errno unknown mode

    > There's never any sign that the second command even happens. How are
    > you capturing this data? I don't see any bits from the second command.


    tcpdump -n -w /tmp/p93.dmp -s 0 -i eth0 port not 22

    As root I can create a file but cant copy a file to the Plan 9 fileserver..

    % whoami
    matthias
    % cd /n/crn/usr/mtg/
    % touch hello
    touch: cannot touch `hello': Permission denied
    % cp /home/matthias/notes.txt ./
    cp: cannot create regular file `./notes.txt': Permission denied
    % sudo su -
    # cd /n/crn/usr/mtg
    # touch hello
    # echo Hello >> hello
    # cat hello
    Hello
    # cp /root/scan.txt ./
    cp: cannot create regular file „./scan.txt“ : Permission denied

    There is only one TCreate and RError in the dump [1]. Its a little strange.

    Matthias

    http://mteege.de/2008/04/p93.dmp



  10. Re: [9fans] p9_errstr2errno unknown mode

    I think Ron is on the right track, it sounds like a bug in the
    Create/Open code which doesn't do the right thing with respect to
    extended/legacy mode. I'll try to look at it in depth today.

    -eric


    On Mon, Apr 7, 2008 at 8:18 AM, Matthias Teege wrote:
    > > There's never any sign that the second command even happens. How are
    > > you capturing this data? I don't see any bits from the second command.

    >
    > tcpdump -n -w /tmp/p93.dmp -s 0 -i eth0 port not 22
    >
    > As root I can create a file but cant copy a file to the Plan 9 fileserver.
    >
    > % whoami
    > matthias
    > % cd /n/crn/usr/mtg/
    > % touch hello
    > touch: cannot touch `hello': Permission denied
    > % cp /home/matthias/notes.txt ./
    > cp: cannot create regular file `./notes.txt': Permission denied
    > % sudo su -
    > # cd /n/crn/usr/mtg
    > # touch hello
    > # echo Hello >> hello
    > # cat hello
    > Hello
    > # cp /root/scan.txt ./
    > cp: cannot create regular file ./scan.txt" : Permission denied
    >
    > There is only one TCreate and RError in the dump [1]. Its a little strange.
    >
    > Matthias
    >
    > http://mteege.de/2008/04/p93.dmp
    >
    >
    >



+ Reply to Thread