9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] cpu -c command
@ 2005-07-08  5:41 arisawa
  2005-07-08 10:45 ` Russ Cox
  0 siblings, 1 reply; 5+ messages in thread
From: arisawa @ 2005-07-08  5:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

man cpu(1) says:
If a -c argument is present, the remainder of the command
line is executed by rc on the server, and then cpu exits.

Yes
cpu -c remotecommand
exits. However
cpu -c localcommand
does not.

For example
cpu -c ps
exits, but
cpu -c /mnt/term/bin/ps
does not.

Is is merely a bug, or, feature of cpu command?

Kenji Arisawa



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

* Re: [9fans] cpu -c command
  2005-07-08  5:41 [9fans] cpu -c command arisawa
@ 2005-07-08 10:45 ` Russ Cox
  2005-07-09  5:06   ` arisawa
  2005-07-21  1:46   ` YAMANASHI Takeshi
  0 siblings, 2 replies; 5+ messages in thread
From: Russ Cox @ 2005-07-08 10:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Yes
> cpu -c remotecommand
> exits. However
> cpu -c localcommand
> does not.
> 
> For example
> cpu -c ps
> exits, but
> cpu -c /mnt/term/bin/ps
> does not.
> 
> Is is merely a bug, or, feature of cpu command?

cpu -c /mnt/term/bin/ps does not exit because
when you run /mnt/term/bin/ps, the kernel hangs
on to an open fid of the binary in its text cache,
holding a reference to /mnt/term, so even when
the remote cpu unmounts /mnt/term, there are
still lingering references and thus exportfs never
finishes.

the short answer is:
don't run binaries from file systems you want to
be able to unmount quickly.

russ


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

* Re: [9fans] cpu -c command
  2005-07-08 10:45 ` Russ Cox
@ 2005-07-09  5:06   ` arisawa
  2005-07-21  1:46   ` YAMANASHI Takeshi
  1 sibling, 0 replies; 5+ messages in thread
From: arisawa @ 2005-07-09  5:06 UTC (permalink / raw)
  To: Russ Cox, Fans of the OS Plan 9 from Bell Labs


> cpu -c /mnt/term/bin/ps does not exit because
> when you run /mnt/term/bin/ps, the kernel hangs
> on to an open fid of the binary in its text cache,
> holding a reference to /mnt/term, so even when
> the remote cpu unmounts /mnt/term, there are
> still lingering references and thus exportfs never
> finishes.
>

Thanks Russ,

I think we should fix this problem.
How about sending explicit "finished" message from remote side to 
client ?
/dev/cpunote might be a good place.

Kenji Arisawa



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

* Re: [9fans] cpu -c command
  2005-07-08 10:45 ` Russ Cox
  2005-07-09  5:06   ` arisawa
@ 2005-07-21  1:46   ` YAMANASHI Takeshi
  2005-07-21  4:16     ` arisawa
  1 sibling, 1 reply; 5+ messages in thread
From: YAMANASHI Takeshi @ 2005-07-21  1:46 UTC (permalink / raw)
  To: Russ Cox, Fans of the OS Plan 9 from Bell Labs

On 7/8/05, Russ Cox <russcox@gmail.com> wrote:
> > cpu -c ps
> > exits, but
> > cpu -c /mnt/term/bin/ps
> > does not.
 :
> cpu -c /mnt/term/bin/ps does not exit because
> when you run /mnt/term/bin/ps, the kernel hangs
> on to an open fid of the binary in its text cache,
> holding a reference to /mnt/term

How long the kernel holds the cache?  Will it timeout
and exportfs exit eventually?
-- 
YAMANASHI Takeshi


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

* Re: [9fans] cpu -c command
  2005-07-21  1:46   ` YAMANASHI Takeshi
@ 2005-07-21  4:16     ` arisawa
  0 siblings, 0 replies; 5+ messages in thread
From: arisawa @ 2005-07-21  4:16 UTC (permalink / raw)
  To: YAMANASHI Takeshi, Fans of the OS Plan 9 from Bell Labs


> On 7/8/05, Russ Cox <russcox@gmail.com> wrote:
>>> cpu -c ps
>>> exits, but
>>> cpu -c /mnt/term/bin/ps
>>> does not.
>  :
>> cpu -c /mnt/term/bin/ps does not exit because
>> when you run /mnt/term/bin/ps, the kernel hangs
>> on to an open fid of the binary in its text cache,
>> holding a reference to /mnt/term
>
> How long the kernel holds the cache?  Will it timeout
> and exportfs exit eventually?
> -- 
> YAMANASHI Takeshi
>

This has been fixed by Russ, I believe.

Kenji Arisawa



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

end of thread, other threads:[~2005-07-21  4:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-08  5:41 [9fans] cpu -c command arisawa
2005-07-08 10:45 ` Russ Cox
2005-07-09  5:06   ` arisawa
2005-07-21  1:46   ` YAMANASHI Takeshi
2005-07-21  4:16     ` arisawa

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