9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Sources Gone?
Date: Wed, 28 Jan 2009 08:53:28 -0500	[thread overview]
Message-ID: <f3d7cb9073cb012bf3631b3114d57382@quanstro.net> (raw)
In-Reply-To: <5d375e920901272106v77866afeua36bb6dc8b7feeca@mail.gmail.com>

> They [hg/mecurial] are infinitely faster, more reliable, and more useful. And in
> some ways they are even conceptually simpler (I never quite understood
> some of the most subtle points of replica, like why it keeps saying it
> needs to update files that were already updated if I happen to have
> some local changes elsewhere, even when I have had them explained to
> me repeatedly, of course that is due to my own intellectual
> limitations, but...)

charles hit the main point — it's hard to fix things without
identifying the problem.

i do not use replica to update my machine, but this is a reflection
of the fact that legitimate changes to files i've never changed can
remove functionality that i use, like il.  i suspect that i'm a special
case in this regard and no amount of revision control fanciness
can save me.

i have used replica to move history between fs with different
on-disk layouts.  http://www.quanstro.net/plan9/history.pdf
has all the gory details.  i've been able to successfully
replicate about 3000 filesystems without a single problem.
but i had pretty controlled circumstances and i didn't have
any fs trouble.

in the case of sources, i think something is going wrong while
updatedb is running.  (hg or mecurial would likely suffer the same
fate, btw.)  from the log on sources:

; grep 386/init plan9.log
1196890780 540 a 386/init - 775 sys sys 1179372116 101487
1209616216 98 c 386/init - 775 sys sys 1209614871 101498
1219773605 695 a 386/init - 775 sys sys 1209614871 101498
1232008203 15347 d 386/init - 775 sys sys 1209614871 0
1232038858 697 a 386/init - 775 sys sys 1209614871 101498

the 3d column is the action 'a' for add 'c' for change and 'd'
for delete.  notice that other than the first and second line,
all the actions are suprising.

since several people have reported venti errors when
connecting to sources recently, it seems to me that the
most logical explination is that when the update process
ran on 15 jan, venti was mia.  then replica interpreted
the error to mean that 386/init had been deleted.

supposing this is correct, it would be logical to add this
patch which i added to replica for the history paper.
i think that adding a strcmp for "venti error"
to this patch would do the trick.

/n/sources/plan9//sys/src/cmd/replica/updatedb.c:77,87 - updatedb.c:77,91
  			change = 1;
  		}
  	}else{
- 		if((d.mode&DMDIR)==0 && (od.mtime!=d.mtime || od.length!=d.length)){
+ 		if((od.mode&DMDIR) != (d.mode&DMDIR)){
+ 			xlog('d', new, &d);
+ 			xlog('a', new, &d);
+ 			change = 1;
+ 		}else if((d.mode&DMDIR)==0 && (od.mtime!=d.mtime || od.length!=d.length)){
  			xlog('c', new, &d);
  			change = 1;
  		}
- 		if((!uid&&strcmp(od.uid,d.uid)!=0)
+ 		else if((!uid&&strcmp(od.uid,d.uid)!=0)
  		|| strcmp(od.gid,d.gid)!=0
  		|| od.mode!=d.mode){
  			xlog('m', new, &d);
/n/sources/plan9//sys/src/cmd/replica/updatedb.c:97,135 - updatedb.c:101,106
  }

  void
- warn(char *msg, void*)
- {
- 	char *p;
-
- 	fprint(2, "warning: %s\n", msg);
-
- 	/* find the %r in "can't open foo: %r" */
- 	p = strstr(msg, ": ");
- 	if(p)
- 		p += 2;
-
- 	/*
- 	 * if the error is about a remote server failing,
- 	 * then there's no point in continuing to look
- 	 * for changes -- we'll think everything got deleted!
- 	 *
- 	 * actual errors i see are:
- 	 *	"i/o on hungup channel" for a local hangup
- 	 *	"i/o on hungup channel" for a timeout (yank the network wire)
- 	 *	"'/n/sources/plan9' Hangup" for a remote hangup
- 	 * the rest is paranoia.
- 	 */
- 	if(p){
- 		if(cistrstr(p, "hungup") || cistrstr(p, "Hangup")
- 		|| cistrstr(p, "rpc error")
- 		|| cistrstr(p, "shut down")
- 		|| cistrstr(p, "i/o")
- 		|| cistrstr(p, "connection"))
- 			sysfatal("suspected network or i/o error - bailing out");
- 	}
- }
-
- void
  usage(void)
  {
  	fprint(2, "usage: replica/updatedb [-c] [-p proto] [-r root] [-t now n] [-u uid] [-x path]... db [paths]\n");
/n/sources/plan9//sys/src/cmd/replica/updatedb.c:184,190 - updatedb.c:155,161
  	nmatch = argc-1;

  	db = opendb(argv[0]);
- 	if(rdproto(proto, root, walk, warn, nil) < 0)
+ 	if(rdproto(proto, root, walk, nil, nil) < 0)
  		sysfatal("rdproto: %r");

  	if(!changesonly){


- erik



  parent reply	other threads:[~2009-01-28 13:53 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 11:56 Gregory Pavelcak
2009-01-23 14:15 ` erik quanstrom
2009-01-23 14:54 ` lucio
2009-01-23 15:09   ` erik quanstrom
2009-01-27 22:59   ` Uriel
2009-01-27 23:32     ` Russ Cox
2009-01-28  0:58       ` Kenji Arisawa
2009-01-28  5:06       ` Uriel
2009-01-28 11:46         ` Iruata Souza
2009-01-28 12:41           ` Charles Forsyth
2009-01-28 13:53         ` erik quanstrom [this message]
2009-01-29 12:12           ` Uriel
2009-01-29 13:37             ` erik quanstrom
2009-01-29 16:45               ` Roman V. Shaposhnik
2009-01-29 16:15             ` ron minnich
2009-01-29 16:34               ` Roman V. Shaposhnik
2009-01-29 16:30             ` Roman V. Shaposhnik
2009-01-29 17:18               ` Russ Cox
2009-01-29 17:30                 ` erik quanstrom
2009-01-29 17:43                   ` Russ Cox
2009-01-29 17:39                 ` gas
2009-01-29 21:09                 ` Roman V. Shaposhnik
2009-01-29 21:42                   ` erik quanstrom
2009-01-29 23:05                     ` Roman V. Shaposhnik
2009-01-29 23:49                       ` erik quanstrom
2009-01-30  0:28                         ` Russ Cox
2009-01-30  4:46                           ` [9fans] Venti and version control (Was: Sources Gone?) lucio
2009-01-30  5:18                       ` [9fans] Sources Gone? lucio
2009-01-31 13:45                         ` Bruce Ellis
2009-01-31 18:12                           ` Akshat Kumar
2009-01-31 18:44                             ` Bruce Ellis
2009-02-02 22:33                         ` Roman V. Shaposhnik
2009-02-02 22:43                           ` erik quanstrom
2009-02-02 23:26                             ` Roman V. Shaposhnik
2009-02-02 23:39                               ` erik quanstrom
2009-02-03 10:04                             ` Richard Miller
2009-02-03  4:23                           ` lucio
2009-02-03  5:23                             ` erik quanstrom
2009-02-03  5:47                               ` lucio
2009-02-03 12:54                                 ` erik quanstrom
2009-02-03 13:38                                   ` roger peppe
2009-02-03 14:01                                     ` erik quanstrom
2009-02-03 16:13                                       ` Anthony Sorace
2009-02-03 16:22                                         ` erik quanstrom
2009-02-03 16:51                                       ` roger peppe
2009-02-03 16:55                                         ` erik quanstrom
2009-02-03 17:30                                         ` Brian L. Stuart
2009-02-05  1:24                                           ` Roman V. Shaposhnik
2009-02-03 17:42                                       ` lucio
2009-02-03 17:40                                     ` lucio
2009-02-03 17:51                                       ` erik quanstrom
2009-02-04  8:40                                   ` sqweek
2009-02-04 16:40                                     ` [9fans] Some arithmetic [was: Re: Sources Gone?] Nathaniel W Filardo
2009-02-04 17:10                                       ` Nathaniel W Filardo
2009-02-04 17:49                                       ` hiro
2009-02-05 11:19                                         ` Dave Eckhardt
2009-02-05 17:38                                           ` Russ Cox
2009-02-05 17:41                                             ` erik quanstrom
2009-02-05 18:08                                               ` Roman V. Shaposhnik
2009-02-05 18:22                                                 ` Micah Stetson
2009-02-05 18:29                                                   ` Roman V. Shaposhnik
2009-02-05 18:31                                                     ` erik quanstrom
2009-02-05 18:32                                               ` hiro
2009-01-30  4:25                     ` [9fans] Sources Gone? lucio
2009-01-29 22:33                   ` Russ Cox
2009-01-29 22:58                     ` Roman V. Shaposhnik
2009-01-29 23:06                       ` Russ Cox
2009-01-29 12:13           ` kokamoto
2009-01-27 23:11   ` Patrick Kristiansen
2009-01-28  0:11     ` Tharaneedharan Vilwanathan
2009-01-28  5:55       ` lucio
2009-01-29 18:00 erik quanstrom
2009-01-29 18:00 erik quanstrom
     [not found] <2b0250f2fe16a645a4641825c2f33741@quanstro.net>
2009-02-03 17:27 ` lucio
2009-02-05  1:20   ` Roman V. Shaposhnik

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=f3d7cb9073cb012bf3631b3114d57382@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).