9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jacob Moody <moody@posixcafe.org>
To: Alyssa M via 9fans <9fans@9fans.net>
Subject: Re: [9fans] Re: Hello, RPi fixes and bind -b trouble
Date: Fri, 23 Feb 2024 12:18:37 -0600	[thread overview]
Message-ID: <8acfd2f2-d802-4918-813f-4f903fb5453a@posixcafe.org> (raw)
In-Reply-To: <17086903380.CDcDB65.976941@composer.9fans.topicbox.com>

Responses in-line.

On 2/23/24 06:12, Alyssa M via 9fans wrote:
> (Lucio posted while I've been thinking/composing/trying things...)
> Thanks for putting up with me!

No, thank you for your thoughts and helping test.

> I confess I've been thinking about this a bit more, as something about this doesn't feel right:
> As I understand it, the kernel is getting an error string from some file server, and is decorating it with a filename/pathname for the benefit of the user, then returning it to userspace through errstr(2).
> exportfs(4) is then sending the decorated error string out to whatever mounts it.
> But, another machine that mounts that exported file system will then decorate it a second time... If that composite file system is exported to a third computer, then that system will mount it and its kernel will decorate it a third time...
> This being plan 9, you can do this all on the same machine, so I tried it.
> In each  window I typed/snarfed/pasted something like:
> term% srv tcp!themachine!9123 step1
> term% mount /srv/step1 /power
> term% aux/listen1 -t tcp!*!9124 /bin/service/tcp5564
> (/power is just a handy unused directory to mount on. ;))
> /bin/service/tcp5564 above is:
> #!/bin/rc
> exec /bin/exportfs -r /
> I created 3 windows, each mounting a composite file system exported from the previous one (by advancing the port numbers and srv names I used above). And sure enough, the error message strings get longer and longer!
> Eventually I got:
> term% echo >/lib
> /fd/0:10: > can't create: lib: is a directory: './power/lib': './power/power/lib': './power/power/power/lib': 'lib'

Oh dear yes that does seem to be a bit of an issue.

> I had to generate an 'is a directory' error to see this, rather than a 'file not found' error, as the latter seems to get treated a bit differently, and doesn't show this concatenative effect.

I am curious as to why this was treated differently, can't recall off the top of my head.

> This seems a bit daft.
> I was thinking that maybe exportfs should be stripping off the filename decoration after all: I'm not sure I can think of a scenario where sending it through Rerror is helpful.
> but this still doesn't feel right.
> exportfs is having to remove a decoration on an error string that the kernel added for the benefit of the user. I think the kernel should probably not be doing this. The outcome is nice, but maybe it would be better if it were done in libc, perhaps in the implementation of %r. Maybe the system call functions in user space could record the pathname in a global buffer when an error occurs, and %r could use that.
> Exportfs could then forward the error string without the kernel decorating it, and we could leave Linux v9fs alone.
> Would that be better?

Maybe? It's hard to tell without looking at a patch that does this. It seems like the end result would be the same. Exportfs is chucking the resulting
errstr across the network. So whether set by libc or the kernel doesn't make much of a difference. I am also not entirely sure that having an extra
"opt-in" step is the correct thing to do here.  If there were to be a way around these problems then perhaps it would be worth pursuing.
> Although English is my first language, I live among people for whom it mostly isn't, so I see these issues every day. There's definitely a tension between the obvious practicality of using English as a "Lingua Franca" and not wanting to lose other languages, which is important to some people. The whole internationalisation thing is complicated and political, and thus hopefully something we can ignore here most of the time! I probably shouldn't have mentioned it.  :D

Yes that is a tough question. I have spent a lot of time thinking about language support on 9front. What I would like first before "localization" of
things like error messages is just to be able to input and display the multitude of languages that people use. Right now we are not so great about this.
Some of the work I've done for 9front has helped improve this, we have more aware unicode routines with respect to word breaks, line breaks, and grapheme
breaks. Ktrans has been included and expanded to cover some chinese input methods. However the system still has issues dealing with decomposed unicode,
both in display and input. There are lots of tricky things to get right there w.r.t. mouse selection, display and so on that this current code was just
not built for. Part of that problem is the bitmap fonts are just not built for this world really either. I find these to be much more pressing and interesting


9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tbc78d29ab04652a2-M2affd026483c5a273ee22a92
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

  reply	other threads:[~2024-02-23 18:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 15:07 [9fans] " Alyssa M via 9fans
2024-02-04 16:41 ` [9fans] " moody
2024-02-04 16:50   ` Alyssa M via 9fans
2024-02-04 22:19     ` Alyssa M via 9fans
2024-02-22 19:45       ` Alyssa M via 9fans
2024-02-22 20:27         ` Jacob Moody
2024-02-23 12:12           ` Alyssa M via 9fans
2024-02-23 18:18             ` Jacob Moody [this message]
2024-02-25  1:01               ` Alyssa M via 9fans
2024-02-23  8:03         ` Lucio De Re
2024-02-04 16:46 ` moody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8acfd2f2-d802-4918-813f-4f903fb5453a@posixcafe.org \
    --to=moody@posixcafe.org \
    --cc=9fans@9fans.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).