9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] p9_errstr2errno unknown mode
@ 2008-04-06  8:47 Matthias Teege
  2008-04-06 14:39 ` Eric Van Hensbergen
  0 siblings, 1 reply; 10+ messages in thread
From: Matthias Teege @ 2008-04-06  8:47 UTC (permalink / raw)
  To: 9fans

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



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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-06  8:47 [9fans] p9_errstr2errno unknown mode Matthias Teege
@ 2008-04-06 14:39 ` Eric Van Hensbergen
  2008-04-06 16:15   ` Matthias Teege
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Van Hensbergen @ 2008-04-06 14:39 UTC (permalink / raw)
  To: 9fans

On Sun, Apr 6, 2008 at 3:47 AM, Matthias Teege <matthias-9fs@mteege.de> 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


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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-06 14:39 ` Eric Van Hensbergen
@ 2008-04-06 16:15   ` Matthias Teege
  2008-04-07  6:35     ` ron minnich
  0 siblings, 1 reply; 10+ messages in thread
From: Matthias Teege @ 2008-04-06 16:15 UTC (permalink / raw)
  To: ericvh, 9fans

> 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,noextend,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



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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-06 16:15   ` Matthias Teege
@ 2008-04-07  6:35     ` ron minnich
  2008-04-07  6:45       ` ron minnich
  2008-04-07  6:57       ` Matthias Teege
  0 siblings, 2 replies; 10+ messages in thread
From: ron minnich @ 2008-04-07  6:35 UTC (permalink / raw)
  To: 9fans

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


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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-07  6:35     ` ron minnich
@ 2008-04-07  6:45       ` ron minnich
  2008-04-07  6:57       ` Matthias Teege
  1 sibling, 0 replies; 10+ messages in thread
From: ron minnich @ 2008-04-07  6:45 UTC (permalink / raw)
  To: 9fans

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


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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-07  6:35     ` ron minnich
  2008-04-07  6:45       ` ron minnich
@ 2008-04-07  6:57       ` Matthias Teege
  2008-04-07  7:02         ` ron minnich
  2008-04-07  7:06         ` ron minnich
  1 sibling, 2 replies; 10+ messages in thread
From: Matthias Teege @ 2008-04-07  6:57 UTC (permalink / raw)
  To: rminnich, 9fans

> 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



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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-07  6:57       ` Matthias Teege
@ 2008-04-07  7:02         ` ron minnich
  2008-04-07  7:06         ` ron minnich
  1 sibling, 0 replies; 10+ messages in thread
From: ron minnich @ 2008-04-07  7:02 UTC (permalink / raw)
  To: 9fans

On Sun, Apr 6, 2008 at 11:57 PM, Matthias Teege <matthias-9fs@mteege.de> 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


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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-07  6:57       ` Matthias Teege
  2008-04-07  7:02         ` ron minnich
@ 2008-04-07  7:06         ` ron minnich
  2008-04-07 13:18           ` Matthias Teege
  1 sibling, 1 reply; 10+ messages in thread
From: ron minnich @ 2008-04-07  7:06 UTC (permalink / raw)
  To: 9fans

On Sun, Apr 6, 2008 at 11:57 PM, Matthias Teege <matthias-9fs@mteege.de> 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


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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-07  7:06         ` ron minnich
@ 2008-04-07 13:18           ` Matthias Teege
  2008-04-07 14:20             ` Eric Van Hensbergen
  0 siblings, 1 reply; 10+ messages in thread
From: Matthias Teege @ 2008-04-07 13:18 UTC (permalink / raw)
  To: rminnich, 9fans

> 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



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

* Re: [9fans] p9_errstr2errno unknown mode
  2008-04-07 13:18           ` Matthias Teege
@ 2008-04-07 14:20             ` Eric Van Hensbergen
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Van Hensbergen @ 2008-04-07 14:20 UTC (permalink / raw)
  To: 9fans

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 <matthias-9fs@mteege.de> 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
>
>
>


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

end of thread, other threads:[~2008-04-07 14:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-06  8:47 [9fans] p9_errstr2errno unknown mode Matthias Teege
2008-04-06 14:39 ` Eric Van Hensbergen
2008-04-06 16:15   ` Matthias Teege
2008-04-07  6:35     ` ron minnich
2008-04-07  6:45       ` ron minnich
2008-04-07  6:57       ` Matthias Teege
2008-04-07  7:02         ` ron minnich
2008-04-07  7:06         ` ron minnich
2008-04-07 13:18           ` Matthias Teege
2008-04-07 14:20             ` Eric Van Hensbergen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).