From: hubler@galaxy.lerc.nasa.gov (Dale Hubler)
Subject: SUMMARY - 2 srcmstrs on console-less systems
Organization: NASA Lewis Research Center
Date: Thu, 21 Jan 1993 12:47:26 GMT

In article <1992Nov30.185636.14597@eagle.lerc.nasa.gov>
hubler@galaxy.lerc.nasa.gov (Dale Hubler) writes:

>We are scratching our heads here over a problem we have on systems
>that have no console, or have an async terminal as the console,
>but not attached or turned off.  The first symptom we see is that
>we get a second srcmstr running.  But the second srcmstr is pretty
>worthless as we can't use the stop/startsrc commands, refresh
>inetd, etc.  So if you boot the machine without a console, srcmstr
>gets hosed and qdaemon won't start, among other problems.  Buying
>consoles for everything is not a solution so does anybody know
>another way to fix this?  

I got replies from the following and must also make profuse
apologies to two - someone who sent a reply about a simple wrap plug they
used to fool the system into thinking something was attached.  I
thought the solution clever, but regrettably lost the article,  -
duh!.... I also didn't note the first person that sent me the ptf
# to apply for the official software fix, they had also experienced
this.  I followed their advice, requested and installed the patch, 
and the problem is gone.

hubert@rs530.ncs.mainz.ibm.com (Bernhard Zeller/131000)
losburn@teal.csn.org (Lynn Osburn)
marc@watson.ibm.com (Marc Auslander)
Mark S. Gallion    Bell Communications Research
jocox@ks.austin.ibm.com   (James O. Cox)

I almost immediately was provided the update number.  U403042.  I
requested and applied it immediately before I got some of the other
replies.  A couple of replies mentioned setting the clocal 
attribute for the appropriate tty.  This would have been an
acceptable solution for us had we not applied the patch so quickly.

>From: hubert@rs530.ncs.mainz.ibm.com (Bernhard Zeller/131000)
>(also from others but this was the most succinct)
>
>Just do:
>
>    smit chgtty
>
>and add the keyword 'clocal' in following lines:
>
>   STTY attributes for RUN TIME
>   STTY attributes for LOGIN


There was also a suggestion to use the chcons command and redirect
console output to a file.  This would work on some, but not our,
situations.  We do have a couple of async terminals we move about
and use.  Furthermore, we have a 32 port async adapter and are
going to control most the systems concerned from one console.  It
will usually be there, but not always.  So we needed the solution
to work for both instances.   

The most thorough explanation came from Jim Cox via my posing the
same question to him at the AIX Technical Exchange in December. 
Thanks Jim.  His reply is included from here down.  My chatter
ends.

Thanks for all the help
Dale Hubler



From  jocox@ks.austin.ibm.com    

Here are the news items from Internet that I was talking about this
morning.  I talked to the developer and asked about this problem.
Actually the problem is that srcmstr is in the processing of
spawning the child process which will remain active as the daemon
process. When that process starts and attempts to open the console,
it is getting blocked and will not complete. The main process is
waiting on death of child. That is why it appears that there are 
two processes running. 

Given that scenario, it looks to me like the workaround mentioned
below will work for your environment without changing the srcmstr
program. Setting clocal will cause the open to succeed without DTR
being set on the console and srcmstr should start successfully.
From reading the defect abstract, it appears that the problem is
officially fixed in U403042. You will need to reboot the machine
after installing this fix for it to take effect. I got the source
file that changed and it appears to me that they fixed the problem.
The fix was on two levels. 1) Then changed the open to use
O_NODELAY. 2) They added an alarm timeout that will break out if
the open if the first fails. If you are still having problem with
the fix, the workaround should let you work ok. However, please let
someone know if the fix didn't fix your problem. 

Regards Jim 


  Disclamer: These comments are my opinion and not necessaril
             the opinion of the IBM Corporation             
  James O. Cox, AIX System Architecture, AWSD, IBM Corporation
  Internet: jocox@ks.austin.ibm.com    Phone:    (512) 838-3328 
  Ausnet:   jim@jocox                  Tie-line: 678-3328
  VNET:     JOCOX at AUSTIN            FAX     : (512) 838-348


--
Dale A. Hubler  (216) 977-7014   hubler@lerc.nasa.gov
For each and every low-tech problem there exists a high-tech solution
Newsgroups: comp.unix.aix