9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Drawterm session close??
@ 2002-03-08 22:36 Russ Cox
  2002-03-09  1:47 ` Ish Rattan
  0 siblings, 1 reply; 4+ messages in thread
From: Russ Cox @ 2002-03-08 22:36 UTC (permalink / raw)
  To: 9fans

I'm not sure why the processes are left over.
Usually a name space loop, but in this case
that would mean rio has fs in its namespace
and fs has rio in its namespace, but I don't
think you can set things up that way.

To kill them as bootes, use Kill, which is like kill, but
stronger:

g% cat /bin/Kill
#!/bin/rc
ps | sed -n '/ '^$1^'$/s%^[^ ]* *([^ ]*).*%chmod 666 /proc/\1/ctl;echo kill > /proc/\1/ctl%p'
g% 



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

* Re: [9fans] Drawterm session close??
  2002-03-08 22:36 [9fans] Drawterm session close?? Russ Cox
@ 2002-03-09  1:47 ` Ish Rattan
  0 siblings, 0 replies; 4+ messages in thread
From: Ish Rattan @ 2002-03-09  1:47 UTC (permalink / raw)
  To: 9fans

On Fri, 8 Mar 2002, Russ Cox wrote:

> I'm not sure why the processes are left over.
> Usually a name space loop, but in this case
> that would mean rio has fs in its namespace
> and fs has rio in its namespace, but I don't
> think you can set things up that way.
Can you elaborate this point? I have no clue
what you are referring to.

> To kill them as bootes, use Kill, which is like kill, but
> stronger:
>
> g% cat /bin/Kill
> #!/bin/rc
> ps | sed -n '/ '^$1^'$/s%^[^ ]* *([^ ]*).*%chmod 666 /proc/\1/ctl;echo kill > /proc/\1/ctl%p'
> g%

I shall this. My problem arises because I am using Plan 9 for teaching a
class and only way I can get rid of these is by rebooting the machine
(I tried kill with no success).

-ishwar




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

* Re: [9fans] Drawterm session close??
@ 2002-03-09  1:53 Russ Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Russ Cox @ 2002-03-09  1:53 UTC (permalink / raw)
  To: 9fans

> > I'm not sure why the processes are left over.
> > Usually a name space loop, but in this case
> > that would mean rio has fs in its namespace
> > and fs has rio in its namespace, but I don't
> > think you can set things up that way.
> Can you elaborate this point? I have no clue
> what you are referring to.

File servers like rio and fs stick around until
the last references to their file servies go away.
Those references take the form of other processes
that have them mounted or the service files they
post in /srv.  (Actually the ref count is on the
pipe that you are serving 9P over.)

So: if rio has upas/fs mounted, and upas/fs has
rio mounted, then you have a ref count loop and
won't take them down.  You can accomplish an
easier ref count loop by writing a file server
that mounts itself.  This is why file servers
do rfork(RFNOTEG) before entering the service
loop.

It would be helpful to see the stacks of the
processes involved.  You can do

	chmod +rw /proc/pid/ctl
	acid pid
	stk()

to look at them (assuming you are bootes).

Russ


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

* [9fans] Drawterm session close??
@ 2002-03-08 19:47 Ish Rattan
  0 siblings, 0 replies; 4+ messages in thread
From: Ish Rattan @ 2002-03-08 19:47 UTC (permalink / raw)
  To: 9fans


Hello,

After a drawterm session is closed (on Linux or Windoes box) as

cpu% exit

and killing the window

PS command on cpu/auth server shows a hung connection with 4 processes
similar to the following.

glenda  5421  0:00  0:00 100K  Wait  tcp1703
glenda  5429  0:00  0:00 920K  Sleep rio
glenda  5456  0:00  0:00 240K  Read  fs
glenda  5457  0:00  0:00 240K  Sleep fs

So, what is the correct way to terminate a drawterm session?
Is there way to get rid of such process on cpu/auth server
as another user (eg., bootes)?

-ishwar




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

end of thread, other threads:[~2002-03-09  1:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-08 22:36 [9fans] Drawterm session close?? Russ Cox
2002-03-09  1:47 ` Ish Rattan
  -- strict thread matches above, loose matches on Subject: below --
2002-03-09  1:53 Russ Cox
2002-03-08 19:47 Ish Rattan

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