9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: namec (was Re: [9fans] Strange date/time on some created files)
Date: Wed, 15 Feb 2006 13:04:58 +0000	[thread overview]
Message-ID: <d18e0e06ef57f7ff0617010370dd3b82@vitanuova.com> (raw)
In-Reply-To: <775b8d190602142229m745c406ft1c5a8aa5617e2b8a@mail.gmail.com>

this conversation reminded me of a little piece of
annoying behaviour under plan9. [please accept my apologies if
you've seen this before - it didn't seem to get through last time]

here's a demonstration:

cpu% pwd
/usr/rog/c
cpu% > /tmp/tst
cpu% cp /bin/echo 8.out
cpu% bind 8.out /tmp/tst
cpu% /tmp/tst -z
-z
cpu% cp /bin/sed 8.out
cpu% /tmp/tst -z
tst 424799: suicide: sys: trap: fault write addr=0x24fffbde pc=0x00017e7c

the problem seems to be that attachimage() relies on sysexec()
giving it a Chan with a currently valid qid.version, but when
the last component of the path is translated by a mount
point, namec returns the qid in the mount table's Chan,
which holds a stale version number, hence the old
shared text segment incorrectly used.

i can think of several ways of fixing it, but all of them
either slow things down slightly, or increase complexity.
(for instance, one doesn't really want to do a stat when the
version returned from namec *is* current, which is almost
all the time).



  reply	other threads:[~2006-02-15 13:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-11  3:40 [9fans] More 'Sam I am' quanstro
2006-02-11  3:46 ` [9fans] Mt. Xinu Lyndon Nerenberg
2006-02-14 21:42   ` plan9
2006-02-14 22:03     ` Brantley Coile
2006-02-14 22:48       ` Bruce Ellis
2006-02-15  4:39     ` Jim McKie
2006-02-15  6:29       ` Bruce Ellis
2006-02-15 13:04         ` rog [this message]
2006-02-15 13:07           ` namec (was Re: [9fans] Strange date/time on some created files) rog
2006-02-12 13:58 rog
2006-02-15  8:32 ` Russ Cox

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=d18e0e06ef57f7ff0617010370dd3b82@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).