9front - general discussion about 9front
 help / color / mirror / Atom feed
* plumber will spin if plumber srv file is removed
@ 2016-07-19 16:55 Benjamin Purcell
  2016-07-19 17:19 ` [9front] " cinap_lenrek
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Purcell @ 2016-07-19 16:55 UTC (permalink / raw)
  To: 9front

If the plumber's srv file is removed then the plumber will spin in a
while loop continually reading 0 bytes. The patch at
http://okturing.com/src/3740/body fixes this behavior. I'll apply it
in a few days if there are no objections.

spew


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

* Re: [9front] plumber will spin if plumber srv file is removed
  2016-07-19 16:55 plumber will spin if plumber srv file is removed Benjamin Purcell
@ 2016-07-19 17:19 ` cinap_lenrek
  2016-07-19 17:31   ` Benjamin Purcell
  0 siblings, 1 reply; 4+ messages in thread
From: cinap_lenrek @ 2016-07-19 17:19 UTC (permalink / raw)
  To: 9front

will it? if the chan is hung up, you will get an error after
reading past the eof:

		if(q->state & Qclosed){
			if(++q->eof > 3)
				return -1;
			if(*q->err && strcmp(q->err, Ehungup) != 0)
				return -1;
			return 0;
		}

can you reproduce this behaviour?

--
cinap


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

* Re: [9front] plumber will spin if plumber srv file is removed
  2016-07-19 17:19 ` [9front] " cinap_lenrek
@ 2016-07-19 17:31   ` Benjamin Purcell
  2016-07-19 18:02     ` cinap_lenrek
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Purcell @ 2016-07-19 17:31 UTC (permalink / raw)
  To: 9front

You're right it does eventually get a -1. I should have checked.

On Tue, Jul 19, 2016 at 12:19 PM,  <cinap_lenrek@felloff.net> wrote:
> will it? if the chan is hung up, you will get an error after
> reading past the eof:
>
>                 if(q->state & Qclosed){
>                         if(++q->eof > 3)
>                                 return -1;
>                         if(*q->err && strcmp(q->err, Ehungup) != 0)
>                                 return -1;
>                         return 0;
>                 }
>
> can you reproduce this behaviour?
>
> --
> cinap


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

* Re: [9front] plumber will spin if plumber srv file is removed
  2016-07-19 17:31   ` Benjamin Purcell
@ 2016-07-19 18:02     ` cinap_lenrek
  0 siblings, 0 replies; 4+ messages in thread
From: cinap_lenrek @ 2016-07-19 18:02 UTC (permalink / raw)
  To: 9front

the loop is still strange. there should be no reason to try to
read again after getting a eof in theory.

i remember we had issues with apparently getting spurious zero
byte reads, causing cat-v to be fucked a few times a week. tho
that was the only machine encountering these problems... i was
unable to reproduce it. the real cause was never found and
debugging it was difficult.

so we might as well grep all the code for read9pmsg() and make
it consistently thread zero byte reads as eof and give up
immidiately. this is correct thing todo.

--
cinap


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

end of thread, other threads:[~2016-07-19 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 16:55 plumber will spin if plumber srv file is removed Benjamin Purcell
2016-07-19 17:19 ` [9front] " cinap_lenrek
2016-07-19 17:31   ` Benjamin Purcell
2016-07-19 18:02     ` cinap_lenrek

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