Re: Runaway logins, TCP/IP, UNIX SVR4, AT&T 3555
Posted in 1995
In <D80EHo.9GH@nntpa.cb.att.com> lou2@cbnews.cb.att.com (louis.avrami..jr) writes: >We have some users connecting to our GIS 3555 using TCP/IP via SWS. The >users are running two different PC TCP/IP packages; one is by Chameleon, >the other by FTP. Once the users log onto the 3555, which is running >UNIX SVR4 3.0, the are immediately placed into an INFORMIX application, >INFORMIX version 5.02. >What happens is that sometimes the users forget to log out off the >application. They will simply close their icon on their PC, shut off >their machine and go home. Unfortunately, this does not break their >communications link with the 3555. The default shell for the users is >the Korn Shell, and we've set the TIMEOUT variable in ksh to kill idle >users, but this doesn't always work. I suspect that it has something >to do with being in the INFORMIX app, but I'm told by others that >sometimes users are logged off, and sometimes there are not. Yes, been there, seen that. This is on a DG Unix machine (SVR4) with users coming in over a network as well, but have seen it on direct connects too. In our case, the cpu time on the 4gl job goes wild as well, sucking up cpu time like mad. It's something in Informix -- my guess is some read() somewhere isn't being checked for end of file and is just looping as fast as possible. Just a hunch from 15 years of systems programming in C. With 100s of users, this was a huge problem for us, so we had to kludge it. Our fix isn't pretty, but hasn't seemed to cause any indigestion as yet is to run a cron job (ours is every 15 min) to find all 4gl runners that have no controlling terminal ("?" in ps's "TTY" column) and send them a "kill -SEGV". Of course we skip 4gl jobs that are known to run in the background (hence might get no controlling tty if the user logs out). Something like procs=`ps -ef | egrep '\\?.*fglgo xxxx' | egrep -v egrep | awk '{print $2}'` if [ "$procs" ]; then kill -SEGV $procs fi where xxxx is the name of whatever app. you think shouldn't be running without a controlling tty. If you have more than one, make that egrep '\\?.*fglgo (xxxx|yyyy|zzzz)' for xxxx, yyyy, and zzzz apps. Do NOT send the signal to the sqlturbo or other DB job. Speaking of which, this is for 5.0 Online. I have no clue if it would be safe for SE or non 5.0 versions! The idea is that the 4gl job is (pretty obviously) stuck in a tight loop so a kill -SEGV (pretend it had a segmentation violation, i.e., out of bounds memory reference) is coming at a hopefully safe time, so it will go away, and the sqlturbo will close itself after seeing its peer vanish. So far (knock on wood) this has worked ok for us. -- Andrew Burt aburt@du.edu "'Ere, he says he's not dead."