9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] cs trouble on multi-ether
@ 1999-01-06  6:49 arisawa
  0 siblings, 0 replies; 3+ messages in thread
From: arisawa @ 1999-01-06  6:49 UTC (permalink / raw)


Hello Russ!

>In this case, dnresolve.c uses udpport()
>to get a UDP port for DNS queries, and the process
>of dialing asks cs how to translate udp!0.0.0.0!0.

OK. I have confirmed the origin of "udp!0.0.0.0!0" is dns.
After stopping  to run dns, "udp!0.0.0.0!0"'s are disappeared
and it seems the system become stable.


>Which call to reorder() is looping?  There are two that could be.

If I run dns and allow cs to accept "udp!0.0.0.0!0", cs can fall into
endless loop.
The pass to the loop is shown bellow:

int
lookup(Mfile *mf, char *net, char *host, char *serv)
{
	...
		for(np = netlist; np; np = np->next){
			nt = (*np->lookup)(np, host, serv, 0);
	...
}

Ndbtuple*
iplookup(Network *np, char *host, char *serv, int nolookup)
{
	...
	return reorder(t, s.t);
}

Ndbtuple*
reorder(Ndbtuple *t, Ndbtuple *x)
{
	...
	for(line = x; line->entry == line->line; line = line->line)
		if(line->line == x)  abort()/* inserted to detect endless loop */
		;
	...
}


By the way, IP's of may system are configured as follows:
# corega etherlink II
ip=202.250.160.40  ether=0000f45d4345    sys=ar
        dom=ar.aichi-u.ac.jp
        bootf=/386/n9pccpu
        proto=il

# alias (ether1) of ar
# 3c905b
ip=202.250.160.122  ether=00a024d113a2    sys=plan9
        dom=plan9.aichi-u.ac.jp
        bootf=/386/n9pccpu
        proto=il

Which IP will be used on calling dial() ?
It seems to me dial() uses ether0 and we have no way to select IP.


Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




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

* [9fans] cs trouble on multi-ether
@ 1999-01-05 13:27 Russ
  0 siblings, 0 replies; 3+ messages in thread
From: Russ @ 1999-01-05 13:27 UTC (permalink / raw)


  I don't know why rwrite receives "udp!0.0.0.0!0" on mutli-ether,
  and I am not convinced this is the solution.

It's there in the non-multi-ether as well, although
perhaps you are running the old DNS code there and the new
DNS code under multi-ether, which would explain a lot of
different behavior.

In this case, dnresolve.c uses udpport()
to get a UDP port for DNS queries, and the process
of dialing asks cs how to translate udp!0.0.0.0!0.

Which call to reorder() is looping?  There are two
that could be.

Russ




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

* [9fans] cs trouble on multi-ether
@ 1999-01-05  7:32 Kenji
  0 siblings, 0 replies; 3+ messages in thread
From: Kenji @ 1999-01-05  7:32 UTC (permalink / raw)


Hello David and 9fans!

Help!
I have been annoyed with a cs problem.
My cs sometimes falls into broken state on sending a mail to
other system.
It falls into endless loop at the line in the function reorder():
    for(line = x; line->entry == line->line; line = line->line)
The phenomena is peculiar to multi-ether.

I investigated the problem farther and found:
cs receives the data "udp!0.0.0.0!0" when I send a mail, and then
the data grows divergently.
I confirmed the phenomena adding a line to rwrite() in cs.c.

void
rwrite(Mfile *mf)
{
	int cnt, n;
	char *err, errbuf[ERRLEN];
	char *field[3];
	int rv;

fprint(2,"cs: rwrite: %s\n", rhp->data); /* inserted */
	err = 0;
	cnt = rhp->count;


My two ether-cards are connected to the same HUB.
If "rwrite" immediately returns when it receives "udp!0.0.0.0!0",
the divergence is suppressed and (it seems) the system becomes
steady.

I don't know why rwrite receives "udp!0.0.0.0!0" on mutli-ether,
and I am not convinced this is the solution.
Comments are welcome.

P.S.
Today, I found the problem is not fixed yet.
reorder() can fall into endless loop at the line I mentioned above.

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




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

end of thread, other threads:[~1999-01-06  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-06  6:49 [9fans] cs trouble on multi-ether arisawa
  -- strict thread matches above, loose matches on Subject: below --
1999-01-05 13:27 Russ
1999-01-05  7:32 Kenji

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