[net.eunice] shell escape causes vi to lock up

chip@t4test.UUCP (Chip Rosenthal) (06/03/84)

I have been having an extremely frustrating problem with vi under
Eunice.  I wonder if anybody else has seen it, and if they know what is
going on.

Sometimes, a shell escape causes you to go off into never never land.
You enter your escape command to vi, and it goes off to open a shell.
Then, everything stops.  You can ^C or ^Y to your heart's content, but
nothing happens.  If a ^T is typed, you are told that the vi process is
waiting, but no other processes are going.  Furthermore, typing ^T a
few times shows that nothing is happening with the process--no cpu time
is being consumed.

I've found the only way to get out of this is to log onto another
terminal and kill your login process with VMS' STOP/ID= command.

Has anybody else seen this?

-- 
Chip Rosenthal, Intel/Santa Clara
{idi|intelca|icalqa|imcgpe|kremvax|qubix|ucscc}!t4test!{chip|news}

jqj@cornell.UUCP (J Q Johnson) (06/04/84)

A frequent cause of hanging in deeply nested process trees is exceeding
your max process count.  Check the entry in the AUTHORIZE database to
see if that is your problem.  In the scenario you describe, you have
only cshell + vi + sh + command, but an analogous situation is a command
in readnews like "s |mail someone" which uses cshell + readnews + sh
+ mail + a whole host of mail subprocesses.  I find that I need a process
limit of at least 10 to do much of anything under Eunice.  Another possible 
limit you might be hitting is BYTLM.

libes@nbs-amrf.UUCP (06/05/84)

This sounds like one of those "not closing all your files" problems.  After
finding that vi didn't recompile properly as distributed, I didn't look too
much further at this other than to note that you can execute 6 (or something
like that) shell escapes before this happens (yes, consistently).  I don't
think I ever complained to TWG about it, mainly because I use emacs these
days.

Don Libes	{allegra,seismo}!umcp-cs!nbs-amrf!libes

jss@sjuvax.UUCP (Jonathan Shapiro) (06/05/84)

[ Is this bug selective, at least? maybe even a VIRTUAL BUG ? ]

	I think I know what happens when your shell escape locks, and I am
going to use this opportunity to resurface my plea yet again, in the
vain hope that someone may yet answer.

	When you run out of VMS processes, VMS hangs waiting for one of
your processes to complete before it gives you the new one.  Suppose now
that you are in vi.  You are now in your third process - one for your login
VMS job, another for your eunice shell, and another vi. you exec a shell
escape - process #4.  If you do something like an ls, that fires up another
process to accomplish the sort, process #5.  basically, there are loads
of processes invisibly hanging around.  Further, after you are done with a
spawned job, eunice hangs onto it for a while so that if you ask for
another
it can reuse it.  The catch? EUNICE doesn't actually seem to do the reuse
part in real life.  The final scenario runs like this:

	vi spawns a job, and lets go of stdin and stdout so that the
		spawned job can have them.
	VMS gets a job request and goes hunting down the process list to
		see how many processes you are running.  It concludes
		that you are at your limit and waits for one of those
		other processes (all of which are actively in use to main-
		tain you where you are) to finish before exec'ing the
		new process.  Until the new process execs, no one has claim
		on the stdin and stdout for your terminal.  All you can do
		is fill the typeahead buffer (if you have one) in
		frustration. NOT EVEN INTERRUPTS GO ANYWHERE - you are hung
		in one of the problem spots between EUNICE and VMS.

	Actually, it is a bit worse than that.  If you examine VMS job
list you will find that at least one of your jobs - the one which is
trying to spawn - is in mwait.  go looking at the manuals and find out,
if you don't know, what mwait means and you will realize that that state
is truly ugly indeed.

	So that is what I suspect has happened to you.

	NOW THE PLEA:

	We are DESPERATELY trying to get netnews and uucp running on our
system.  Would ANYONE who has by hook or by crook managed to do it please
contact me either at sjuvax!jss by e-mail or at Haverford College if they
are willing to help us?  I have gotten many requests from people saying
they don't know how and would like to know how.  If you want help, I am
collecting those requests as soon as I am able to help (if ever).  Come on
folks, enough stuff is going out that someone out there is running EUNICE
on the net.  Please help us out...


Jonathan S. Shapiro
Haverford College
Haverford Pa.  19041

sjuvax!jss

kvc@scgvaxd.UUCP (06/13/84)

When a user runs out of VMS processes, you most definitely do NOT
hang in an MWAIT.  The $CREPRC system service instead returns with
an error status of "exceeded quota".  I do not know what Eunice does
when it gets this error, but if it's hanging you in an MWAIT, then
it is definitely doing something wrong.

Since VMS processes share many resource quotas, is more likely that you
are running out of some other resource while you are trying to create
the process.  Some resources will wait in the MWAIT state for things
to free up.  If this is the problem, then you may try upping some of the
other process quotas.  You should look in the book to see what quotas
are shared (and hence being exhausted by multiple spawnings) and which
of those will hang in resource wait mode.

	/Kevin Carosso              allegra!scgvaxd!engvax!kvc
	 Hughes Aircraft Co.

chip@t4test.UUCP (06/15/84)

=== REFERENCED ARTICLE =============================================

From: chip@t4test.UUCP (Chip Rosenthal)

I have been having an extremely frustrating problem with vi under
Eunice.  I wonder if anybody else has seen it, and if they know what is
going on.  Sometimes, a shell escape causes you to go off into never
never land.

Has anybody else seen this?

====================================================================

Apparently, many other people have seen this.

Tom Merrick (hocda!tbm) wrote me saying:

>  Yes we have.  Happens all the time.  I tried to get a vispell working
>  yesterday and locked up every time.  No solutions, but glad to know I
>  am not alone.
>  
>  Tom Merrick ATT BTL N. Andover MA  617-681-6436

David Kashtan ( kashtan@sri-iu ) wrote to me wondering "how recent a 
version of `vi' TWG was supplying".  I don't know the answer offhand.  
Anybody out there know this?

If I put the pieces of the many postings together, it sounds to me
like `vi' is not properly reusing the suspended Eunice processes
lying around, just goes on creating more processes, and at some
point runs into its limit.  Summary of comments to this newsgroup:


J. Johnson (cornell!jqj)			<299@cornell.UUCP>

>  A frequent cause of hanging in deeply nested process trees is exceeding
>  your max process count.  Check the entry in the AUTHORIZE database to
>  see if that is your problem.


D. Libes (nbs-amrf!libes)			<302@nbs-amrf.UUCP>

>  This sounds like one of those "not closing all your files" problems.
>  After finding that vi didn't recompile properly as distributed, I
>  didn't look too much further at this other than to note that you can
>  execute 6 (or something like that) shell escapes before this happens
>  (yes, consistently).


J. Shapiro (jss@sjuvax)				<349@sjuvax.UUCP>

>  When you run out of VMS processes, VMS hangs waiting for one of your
>  processes to complete before it gives you the new one.....  
>  ...after you are done with a spawned job, Eunice hangs onto it for
>  a while so that if you ask for another it can reuse it.  That catch?
>  Eunice doesn't actually seem to do the reuse part in real life.


K. Carosso (!scgdvax!engvax!kvc)		<196@scgvaxd.UUCP>

>  When a user runs out of VMS processes, you most definately do NOT
>  hang in an MWAIT.  ...Since VMS processes share many resource quotas,
>  [it] is more likely that you are running out of some other resource
>  while you are trying to create the process.  Some resources will
>  wait in the MWAIT state for things to free up.


In summary, it looks like it has something to do with the creation of
processes, and topping out on some resource limit.  Possibly this limit
is the number of processes.  It appears that Eunice is not properly
reusing these processes.  I think we could continue to run it down
(there are some good leads already), but I feel that it is not my
responsibility to fix a broken product.  I will submit a "Modification
Request" form to TWG documenting this problem.

One thing I wonder about is given the fact that TWG wrote their own
editor (FSE), how willing would they be to support vi? By the way, has 
anybody out there used FSE?  How does it compare to a vi or emacs?


-- 
Chip Rosenthal, Intel/Santa Clara
{idi|intelca|icalqa|imcgpe|kremvax|qubix|ucscc}!t4test!{chip|news}

ted@usceast.UUCP (Ted Nolan) (06/17/84)

<Eunice!.. Shut up Momma!>
It is not just vi that causes eunice to lock up.  We have been trying off and
on to set up a csnet link with the department of engineering here on campus
and I have gotten hung up in eunice several times (over their lone dialup line 
too, I got flames on that!).  The symptoms are that eunice suddenly starts 
completely ignoring me except for echoing certain control characters. Every now
and then at seemingly random moments a meaningless message (to me) is displayed
but does not affect the situation.

I have been very wary to try eunice recently, but , as I remember it, once
it went away when I tried a "head" command, and once when I tried an "at".

			
-- 
--------------------------------------------------------------------------------
Ted Nolan                               ...decvac!mcnc!ncsu!ncrcae!usceast!ted
6536 Brookside Circle
Columbia, SC 29206                      ("Sixty-sixty?" he suggested)
--------------------------------------------------------------------------------