Mail not delivered yet, still trying

SMTP MAILER postmaster at ddnvx2.afwl.af.mil
Fri Jan 19 00:57:44 AEST 1990


 ----Mail status follows----
Have been unable to send your mail to <declerck at sun4b.afwl.af.mil>,
will keep trying for a total of three days.
At that time your mail will be returned.

 ----Transcript of message follows----
Date: 18 Jan 90 01:54:00 MST
From: unix-wizards at BRL.MIL
Subject: UNIX-WIZARDS Digest  V9#050
To: "declerck" <declerck at sun4b.afwl.af.mil>

Return-Path: <unix-wizards-request at sem.brl.mil>
Received: from SEM.BRL.MIL by ddnvx2.afwl.af.mil with SMTP ; 
          Thu, 18 Jan 90 01:52:47 MST
Received: from SEM.BRL.MIL by SEM.BRL.MIL id aa08556; 18 Jan 90 3:02 EST
Received: from sem.brl.mil by SEM.BRL.MIL id aa08510; 18 Jan 90 2:45 EST
Date:       Thu, 18 Jan 90 02:45:15 EST
From:       The Moderator (Mike Muuss) <Unix-Wizards-Request at BRL.MIL>
To:         UNIX-WIZARDS at BRL.MIL
Reply-To:   UNIX-WIZARDS at BRL.MIL
Subject:    UNIX-WIZARDS Digest  V9#050
Message-ID:  <9001180245.aa08510 at SEM.BRL.MIL>

UNIX-WIZARDS Digest          Thu, 18 Jan 1990              V9#050

Today's Topics:
                 Re: Want documentation about threading
                           Re: socket -> UID
              Re: Managing a network of UNIX workstations
                 Re: xenix system V tty device drivers
                      Re: Quattro SB2422 and UUCP
        Re: Gripe about mickey-mouse VM behaviour on many Unixes
                    Uugetty/uucico hangs on Sysv/386
                       Interrupted library calls
                     Re: Interrupted library calls
     "bad ulimit" on all non-root "at" & "batch" jobs under 386/ix
   Re: "bad ulimit" on all non-root "at" & "batch" jobs under 386/ix
     8mm tape made on SUNOS 4.0.3, cannot be read with SUNOS 3.5.2
                            REAL TIME CLASS
                        XENIX tty device driver
          Re: How to delete a file with ^? chars in the name?
                 Dynamic Loader for DECstations wanted
               Re: Dynamic Loader for DECstations wanted
                 What do you want in a signal library?
               Re: What do you want in a signal library?
 noise posts (was re: How to delete a file with ^? chars in the name?)
                  SPEC Solicits Benchmark Applications
                   Request of final security checker.
       How does a VARARGS function call another VARARGS function?

-----------------------------------------------------------------

From: Eliot & <moss at takahe.cs.umass.edu>
Subject: Re: Want documentation about threading
Date: 14 Jan 90 19:19:33 GMT
Sender: news at dime.cs.umass.edu
To:       unix-wizards at sem.brl.mil

May I gently suggest that you clarify *which* concept of threading it is that
interests you? There are threaded lists and other *data structure techniques*,
threaded code (a style of programming language implementation), and threads
(also called lightweight processes), which represent loci of execution within
an address space. You might also try other groups (e.g., comp.os.research for
the lightweight process version, comp.compilers (or something like that) or
comp.languages.forth for the language version, etc.).		E
--

		J. Eliot B. Moss, Assistant Professor
		Department of Computer and Information Science
		Lederle Graduate Research Center
		University of Massachusetts
		Amherst, MA  01003
		(413) 545-4206; Moss at cs.umass.edu

-----------------------------

From: Larry McVoy <lm at snafu.sun.com>
Subject: Re: socket -> UID
Date: 16 Jan 90 05:56:20 GMT
Sender: news at sun.eng.sun.com
To:       unix-wizards at sem.brl.mil

In article <832 at unipas.fmi.uni-passau.de> hessmann at unipas.fmi.uni-passau.de (Georg Hessmann) writes:
>Two processes communicate with the help of a socket. 
>(Socket has the type PF_INET, SOCK_STREAM)
>The first process runs as a background demon (using inetd) and waits
>for incoming messages from the second process.
>
>Problem:
>How can the first process obtain the UID and GID of the second process 
>right from the socket without any extra message from the second process.
>
>We want to disable/enable services of process one for certain 
>UID's and GID's without changing the source code of the second process.

Well, this is a bummer.  You can do it if really have to, but it requires
that
(1) both sockets must be on the same machine, and
(2) having an indepth knowledge that machine's socket implementation.

If you have both of those, the inetd-like process could open /dev/kmem and
grovel around, looking for the socket that was sending, and figure out
to whom it belonged (I think).  You don't want to try this at home, campers,
so the real answer is: "you can't."
---
What I say is my opinion.  I am not paid to speak for Sun, I'm paid to hack.
    Besides, I frequently read news when I'n drjhgungh, err, um, drunk.

-----------------------------

From: brnstnd at stealth.acf.nyu.edu
Subject: Re: socket -> UID
Date: 17 Jan 90 08:18:51 GMT
To:       unix-wizards at sem.brl.mil

In article <1990Jan15.053647.24388 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
> In article <832 at unipas.fmi.uni-passau.de>, hessmann at unipas.fmi.uni-passau.de
> (Georg Hessmann) writes:
> [ How can a program at one end of an Internet socket find out what the ]
> [ UID and GID of the process at the other end of the socket are?       ]

You could use an RFC 931 Authentication Server implementation, so that
you can find out the username by asking TCP port 113 on the client machine.
My implementation is undergoing gamma testing.

Unfortunately, it's easy to compromise security below TCP, so if you
really want to know who you're talking to, run Kerberos.

>   This can't be done.  An Internet domain socket doesn't have any UID or GID
> information associated with it;

It should. The Internet inherited that administrative flaw from the Arpanet.

---Dan

-----------------------------

From: "Jonathan I. Kamens" <jik at athena.mit.edu>
Subject: Re: socket -> UID
Date: 18 Jan 90 03:28:13 GMT
Sender: News system <news at athena.mit.edu>
To:       unix-wizards at sem.brl.mil

In article <20784 at stealth.acf.nyu.edu>, brnstnd at stealth.acf.nyu.edu writes:
> In article <1990Jan15.053647.24388 at athena.mit.edu> jik at athena.mit.edu
> (Jonathan I. Kamens) writes:
> >   This can't be done.  An Internet domain socket doesn't have any
UID or GID
> > information associated with it;
> 
> It should. The Internet inherited that administrative flaw from the Arpanet.

  Not convinced.  The problem with assigning a UID and GID to a network
socket is
that not all machines connected to the network have a concept of UID's
and GID's.
It's quite common nowadays to see IBM PC's or Macs connected to an ethernet and
given a network address; what UID and GID should be associated with socket
connections to those machines.

  No, I would tend to agree with the decision not to associate UID and
GID with a
socket, simply because a UID's and GID's are Unix things, and the Internet is
certainly not restricted to Unix machines.

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710

-----------------------------

From: Barr3y Jaspan <bjaspan at athena.mit.edu>
Subject: Re: Managing a network of UNIX workstations
Date: 16 Jan 90 06:19:54 GMT
Sender: News system <news at athena.mit.edu>
To:       unix-wizards at sem.brl.mil

Warning!  This is a long-ish article.

In article <3949 at jhunix.HCF.JHU.EDU>, barrett at jhunix.HCF.JHU.EDU (Dan
Barrett) writes:
> 
> 	I may be managing a network of DECstation 3100's running Ultrix in
> the near future.  I have been managing VAXen for a long time, but never a
> network of workstations.  So, I have some questions:

Reading your message, it sounds like you are trying to set up *EXACTLY*
what MIT's Project Athena has already set up.  I'll see if I can address
each of your points, explain Project Athena's solution.

> 
> (1)	How do you handle inter-machine superuser privileges?
> 
> 	I do NOT want to put "root" in /.rhosts -- this is a big security
> 	risk, right?

Athena uses the Kerberos Authentication System for authenication and
authorization (which, by the way, is a "bug free" authentication system
at least in its abstract form (ie: the implementation may have bugs)). 
Each host can have a file called ".klogin" that says which users can log
in to the host as root.  So, if I have already proved to Kerberos that I
really am "bjaspan at athena.mit.edu" and if the machine FOOBAR.MIT.EDU has
me in its .klogin file, then I can log in there as root.

> 
> (2)	How do you do transparent backups?  I want to pop a tape in ONE
> 	tape drive and say "Back up ALL files from ALL workstations onto
> 	this tape."
> 
> 	Suppose I dedicate one workstation as the "main node", mount all
> 	other workstation disks on the main node using NFS, and then back it
> 	up.  This should work...?  But don't I have to worry about
> 	inter-machine superuser privileges?  After all, we want to back up
> 	EVERY file from EVERY machine.
>
> (5)	Should we put disks on every workstation, or have one fileserver and
> 	many diskless workstations?  Which is better?  Easier to maintain?
> 
> 	My idea is to have one or two fileservers, make the other
> 	workstations use NFS, but put a small disk on each workstation for
> 	swapping only.  Good?  Bad?  What's better?
> 

These two are related, so I'll group them.  Athena has set up a number
of fileservers (which use Kerberos authentication to make sure they only
give files  to the right people) to store files.  Each "public
workstation" (of which there are approximately 1000 at the moment) has a
small hard disk which contains enough software for the machine to
function (many of the standard "system files" are also stored on
fileservers) and some local scratch space on a partition called "/site".
Filesystems from the fileservers are then mounted on the local disk
using NFS (and we are also currently experimenting with AFS, the Andrew
File System).

The backup problem then becomes easier.  You don't have to backup the
workstations at all, because no working files are stored there.  You
only have to backup the fileservers, and there is some limited number of them.

> 
> (3)	We'd like all users to have accounts on all workstations.  What's
> 	the best way to maintain an inter-machine password file?  I've
> 	heard vaguely of "yellow pages" but have never used it.
> 

Project Athena's solution to this problem is called "Hesiod", which it a
simple network database containing information for each user.  At
Athena, for example, Hesiod stores the following information (plus others):

    PASSWD: bjaspan:*:9123:101:Barr3y
Jaspan,,E40-342,34261,59604:/mit/bjaspan:/
bin/csh
    FILSYS: AFS /afs/athena.mit.edu/user/b/bjaspan w /mit/bjaspan
     POBOX: POP ATHENA-PO-2.MIT.EDU bjaspan

PASSWD is a standard password entry, except that password field itself
is the special character "*", meaning "ask the user for the password and
use Kerberos to do the authentication."  FILSYS says where my personal
filesystem is (which server, what path on that server, what the name of
the mountpoint on the local machine should be.  (My homedir is on AFS. 
An NFS entry looks like this:
"NFS /u1/lockers/testuser cyrus w /mit/testuser" -- it contains
essentially the same info.)  POBOX is used my the mailhub to determine
which machine stores my mail until I pick it up (mail server is
something you didn't mention.  A post office server holds my mail for me
until I call it up and ask for (using Kerberos to authenticate, of
course).  This way I can read my mail from any workstation.)

> (4)	We'd like a system where the entire network appears to each user as
> 	if it were one huge "machine".  A user would log onto this "machine"
> 	and not care which workstation s/he were actually using.  (Maybe the
> 	"machine" would automatically log the user onto the workstation with
> 	the lightest system load.  I've seen this done with VMS systems at
> 	other schools.)  Can this entire scheme be done?  Transparently?
> 

Well, at Athena, all workstations look essentially the same.  We have
VAXen, IBM RTs, and DECstation 3100s (running BSD4.3, BSD4.3, and
Ultrix, respectively) all running the X window system and the look
exactly the same to users.  (Well, almost.. :-)  Hesiod allows the
network services to be independent of which workstation a user is
actually logged on to.

One thing Athena doesn't do is the "using the machine with the lightest
load" trick.  The premise of Athena is that a workstation should be used
by a single user at a time (although of course they all support multiple
users) so any empty machine is the same as any other.


> 
> (6)	Does anybody make a removable media drive, like the Syquist
> 	44-megabyte cartridge drive, for the DS3100?
> 

I don't actually know what Project Athena uses to back up its
fileservers (I work for sysdev, not operations).  The Student
Information Processing Board (SIPB), however, has a tape drive made by
Exabyte that stores 2.2 GIGAbytes on an tape (we buy the tapes at our
local Tower Records store, and I think they're about $8 apiece.. most
people around here by Sony.)  We are currently running the Exabyte of a
VSII, but I think that is because we are using it to back up the SIPB
AFS cell, and the AFS software doesn't yet work on the DS3100 (we
actually have DS3100's in our office as well) but I seem to recall
hearing someone say that the drive does actually work with that machine.
 Incidentally, Exabyte has announced that they will be releasing a drive
that can store 5 gigabytes (instead of 2.2)
on the same tape by the end of this year.

I have no connection to Exabyte Corp.


> 	Thanks very much for your advice!
> 
>                                                         Dan

You're very welcome.  The best part about all this information that I've
given you is that the software to run it is FREE.  You can get Kerberos
and Hesiod by anonymous FTP from athena-dist.mit.edu.  There are also
things you didn't mention, like "How do users communicate with each
other?"  The answer is the Zephyr Notification Service, which you can
also get from athena-dist.  With all these services, you need a
service-management system, which we also have and is called Moira and
you can FTP it from.. you get the idea.  (Have you ever heard of a
networked conference system called "discuss"?  Well...)

This is a rough sketch of how we do things here.  There are more
knowledgeable people about running a network here that could be far more
useful to you.. 


Barry Jaspan, MIT-Project Athena
bjaspan at athena.mit.edu

-----------------------------

From: Jonathan Bayer <jbayer at ispi.uucp>
Subject: Re: xenix system V tty device drivers
Date: 16 Jan 90 15:35:45 GMT
To:       unix-wizards at sem.brl.mil

saeed at sunseeker.UUCP (Saeed Talebbeik) writes:

>yes there is a section in xenix manual for writing a tty driver but it is 
>only 500 lines. The SCO tech support claims that a true blue tty driver 
>is about 2000 lines. We are missing 1500 lines ! What are they ? What does
>that 1500 line is supposed to do ? That is exactly the problem. What are
>the issues involved that have to be addressed in that 1500 lines ?
>I guess except having access to a sample tty driver source code and running 
>through it there is no way of writing a tty driver for a novice 


I have found that SCO Tech Support makes mistakes in questions like
these.  I was able to implement the serial driver as printed in the
manual.  It doesn't have modem control, but it does work.


JB
-- 
Jonathan Bayer		Intelligent Software Products, Inc.
(201) 245-5922		500 Oakwood Ave.
jbayer at ispi.COM		Roselle Park, NJ   07204    

-----------------------------

From: Andy Ingle <andy at acorn.co.uk>
Subject: Re: Quattro SB2422 and UUCP
Date: 16 Jan 90 15:57:14 GMT
To:       unix-wizards at sem.brl.mil

In article <560 at bodie.advsys.UUCP> derek at advent.co.uk (Derek Mulcahy) writes:
>We have a number of customer sites with Dowty Quattro SB2422 modems.
>
>They are all connected to Sun's.  We use uucp for mail and file transfer.
>Most of the time uucp works just fine.  Sometimes it manages to login but when
>it starts the uucp transfer it just gives up.
> [rest of article deleted]

Do make sure that neither modem will recognise X-ON/X-OFF flow control
during uucp as sooner or later an X-OFF char will be sent as part of a
uucp or ack packet and the modem will just stop.

Another point about these modems is they will auto-set the baud rate
*and* *parity* from the first "AT" command they get. Once they think
the're getting even parity they will ignore any odd bytes.  Check that
dial-in modems get setup from a terminal with parity off, and dial-out
ones have a "P_NONE" (or similar) statement in the uucp chat script.

--Andy Ingle

-----------------------------

From: Larry McVoy <lm at snafu.sun.com>
Subject: Re: Gripe about mickey-mouse VM behaviour on many Unixes
Keywords: MIPS, System-V, paging performance, working-set
Date: 17 Jan 90 01:18:43 GMT
Sender: news at sun.eng.sun.com
To:       unix-wizards at sem.brl.mil

In article <19821 at watdragon.waterloo.edu> tbray at watsol.waterloo.edu (Tim Bray) writes:
>1. On a 32-Mb (4.3bsd) machine with *nothing* else happening, the OS stupidly 
>   pages away at you if you try to use more than about 20 Mb in the inane 
>   belief that the memory will be needed any moment for one of those gettys or
>   nfsds or something that aren't doing anything.

Not a great alg but not terrible if you are running a time sharing system.
Take your 32 meg, chop of the ~2 meg for the kernel, chop off the ~4 meg
for the buffer cache, and you have about 26 meg left.  Now there is still 
something fishy here - if I've got the numbers right, it does seem odd that
the pager is beating you up with 6 megs free.  I don't believe this for a
second.  Try this

$ adb /vmunix /dev/kmem
lotsfree/D
freemem/D
^D

The pager does not turn on until freemem < lotsfree (and lotsfree on Sun's
is typically small, like 256K or so).  So something is wacko.

>2. A process using only a moderate amount of memory (you think) runs like
>   a dog, and you note that the system is spending much of its time in
>   system state or idle.  Why, you wonder.  It quickly becomes apparent 
>   that the information produced by items such as ps, vmstat, vsar, top, 
>   and so on, is comparable in relevance and accuracy to Robert Ludlum novels 
>   or peyote visions.  (SunOS the villain here).

Yeah, well, um, yeah.  Right. Well, it's like this see...  Actually, the real
problem is sharing.  Who do you charge shared libraries to?  The numbers
displayed by all those programs don't take that into account, but they should
give you a general idea.  Oh, yeah, I assume 4.0 or greater, things were
easy before then.

>3. On a 64-Mb (MIPS) machine, your paging rate, system time, and idle time 
>   all go through the roof if your process insolently tries to random-access
>   more than 32 Mb of memory at once.

Waddya expect?  :-) :-)

>Look, we all appreciate the tender loving care that VM architects have put
>into strategies that are friendly to 100+ moderate-size processes context
>switching rapidly in time-sharing mode.  But there are other ways to use
>computers, and they are currently very poorly supported.  We paid for that
>memory, we have a good use for it, and the OS is getting in our way, and it's
>also REFUSING TO TELL US ACCURATELY WHAT'S GOING ON - an unforgiveable sin by
>my Unix dogma.

Hmm.  The SunOS VM model was designed with exactly this in mind.  You can
use damn near 100% of physical mem on a 4.0 or greater rev of the OS (the
os uses some, but on a 32 meg machine you should be looking at close to
30 megs of user usable ram).

At any rate, qwitchyerbitchin and tell me what you want to have happen.
Don't forget that your solution has to work well when I'm time sharing,
when one process wants the whole machine, and when two processes want the
whole machine.  And if you get it right, I'll get it into SunOS or die
trying.  Looking forward to your reply,
---
What I say is my opinion.  I am not paid to speak for Sun, I'm paid to hack.
    Besides, I frequently read news when I'm drjhgunghc, err, um, drunk.
Larry McVoy, Sun Microsystems     (415) 336-7627       ...!sun!lm or lm at sun.com

-----------------------------

From: Malaclypse the Elder <dwc at cbnewsh.att.com>
Subject: Re: Gripe about mickey-mouse VM behaviour on many Unixes
Keywords: MIPS, System-V, paging performance, working-set
Date: 17 Jan 90 18:55:59 GMT
To:       unix-wizards at sem.brl.mil

In article <130347 at sun.Eng.Sun.COM>, lm at snafu.Sun.COM (Larry McVoy) writes:
> >Look, we all appreciate the tender loving care that VM architects have put
> >into strategies that are friendly to 100+ moderate-size processes context
> >switching rapidly in time-sharing mode.  But there are other ways to use
> >computers, and they are currently very poorly supported.  We paid for that
> >memory, we have a good use for it, and the OS is getting in our way, and it's
> >also REFUSING TO TELL US ACCURATELY WHAT'S GOING ON - an unforgiveable sin by
> >my Unix dogma.
> 
> Hmm.  The SunOS VM model was designed with exactly this in mind.  You can
> use damn near 100% of physical mem on a 4.0 or greater rev of the OS (the
> os uses some, but on a 32 meg machine you should be looking at close to
> 30 megs of user usable ram).
> 
actually, the vm model address using all of physical memory because
it has integrated the paging pool with the buffer pool.  but it really
hasn't done much for such things as page stealing.  in fact, on the
version that was ported into system v release 4, i believe it still uses the
two hand clock algorithm which goes through physical memory regardless
of what that page is being used for.  my studies have shown that you
really want to classify pages according to "type" even with reference
information.  i worked with some developers on prototyping some
improvements in the old regions architecture (system v release 3)
and maybe will get around to integrating it into the vm model.

danny chen
att!hocus!dwc

-----------------------------

From: ACP Network <acp at ms.uky.edu>
Subject: Uugetty/uucico hangs on Sysv/386
Date: 16 Jan 90 16:32:51 GMT
To:       unix-wizards at sem.brl.mil

One of our uucp sites is having trouble with uucico.  We (ukma) call it
every day to exchange netnews and mail, but frequently uucico locks up
on his end.  The machine with the problem is an AT&T 6386 WGS running SysV/386
version 3.1 (or possibly 3.2) with HDB uucp (the standard AT&T distribution); 
the machine that always calls it is a vax running ultrix and Version 2 uucp.  
The modems on both ends are Telebit T-1000's connecting in an MNP mode.

The call takes place around 4 or 5 AM; when the sysop arrives in the
morning, he finds that uucico hung during the call and is still running
(the phone connection is broken).  Uucico can be killed, but the uugetty
refuses to give up the line, and in fact is immune to kill -9.  He has
to shut down the machine & restart to get the serial port back.

Here is a sample of the /usr/spool/uucp/.Log/uucico/ukma file from a crash
(with inserted line breaks):

uucp ukma  (1/10-5:33:37,5057,0) OK (startup)
uucp ukma  (1/10-5:33:39,5057,0) REMOTE REQUESTED 
   (ukma!D.ukmaBYs32 --> acpunc!D.ukmaSYs32 (netnews))
uucp ukma  (1/10-5:34:00,5057,1) REMOTE REQUESTED 
   (ukma!D.ukmaXYs30 --> acpunc!X.ukmaAYs33 (netnews))
uucp ukma  (1/10-5:34:04,5057,2) REMOTE REQUESTED 
   (ukma!D.ukmaBYs42 --> acpunc!D.ukmaSYs42 (netnews))
uucp ukma  (1/10-5:34:43,5057,3) REMOTE REQUESTED 
   (ukma!D.ukmaXYs40 --> acpunc!X.ukmaAYs43 (netnews))
uucp ukma  (1/10-5:34:46,5057,4) REMOTE REQUESTED 
   (ukma!D.ukmaBYs52 --> acpunc!D.ukmaSYs52 (netnews))
netnews ukma  (1/10-5:36:41,5057,5) IN SEND/SLAVE MODE (INPUT FAILURE)
netnews ukma  (1/10-5:36:41,5057,5) FAILED (conversation complete)

A few other items of note:

1) The lockup is intermittent, though it's been getting worse.
2) Other 6386s use the same uucp configuration files, the same modem,
   and are called by the same site without trouble (or, at least not
   this much trouble).
3) The modem on the 6386 has been replaced; this did nothing to fix the
   problem. 

I assume the uugetty is the actual culprit, since it becomes unkillable
(and uucico has enough wits to finish writing its log file).  

Does anyone have any suggestions?  Also, does anyone know how uugetty
becomes unkillable and what could be done to remove it without rebooting?
Please write me directly instead of posting, since I've crossposted
to three groups.  I'll summarize & post if there's any interest.

Kenneth Herron
-- 
acp at ms.uky.edu        University of Kentucky         ACP Network Consultant
ukma!acp         Dept. of Mathematics, room 715 POT          (606) 257-2975
                       Lexington, KY 40506

-----------------------------

From: Paul Breslaw <paul at mecazh.uucp>
Subject: Interrupted library calls
Keywords: Xlib, library, signals, longjmp
Date: 16 Jan 90 17:36:33 GMT
To:       unix-wizards at sem.brl.mil


This problem cropped up in the context of Xlib, but could equally apply to 
any Unix library. Hence the posting to more than one group.

Our application (a CAM package on HP9000/3xx machines under HP-UX6.5 X11.R2)
crashes sometimes when we handle a signal and return from 
the signal handler in a different context from the one in which the handler 
was entered. In other words we do a longjmp(3) from inside the handler.

We found that this is an elegant way to design certain features into a program.

[ Those of you who might want to argue this assertion read on. Those
  who are prepared to accept it can skip to the end of this []'ed bit.

  Our CAM package is a monolithic application running as a single
  process. Until Open Look or Motif is declared winner of the current
  X Look and Feel War, our application remains implemented using no tool
  kit, ie only pure Xlib calls.

  A user of our package can start a computation/display operation
  that might take a long time to complete. We wanted to allow him to
  hit a key to stop it, which would take him back to an earlier point
  in the dialogue.

  There are a large number of such long operations, so we needed a
  fairly general mechanism. 

  We did not want to sprinkle calls to X arbitrarily in the code
  in the hope that they would provide a frequent enough poll.  

  Neither did we want a signal handler to set a global flag and return
  normally, because that is simply the same polling problem in a different
  guise. You then have to sprinkle calls to check the global flag in the
  hope ... etc etc.

  So we had to have a signal handler to implement the required 
  asynchronousness, and it had to exit abnormally to achieve its end.
]

It is all the same, a pretty dangerous thing to do.    

This is especially so if the signal is allowed to interrupt any old bit of 
code that might be updating some data structure that is subsequently needed. 
And this, of course, is what happened when certain Xlib routines were 
interrupted.

Now good old BSD and friends (like Ultrix and HP-UX) offer a number of
means for dealing with the problem.

1. Interrupted system calls can be identified, and restarted when (if) the
   signal handler returns normally.

2. The application can be defensively programmed so that system calls which
   can be interrupted or partially completed are correctly handled.

3. Critical regions can be created with sigblock(2) and sigsetmask(2) providing
   DISABLE and ENABLE capabilities.

Clearly 1 and 2 are fine for system calls, but useless for libraries.

That leaves 3 - but whose responsibility is it to defend the data in the
library - the implementor or the user?

I suppose someone out there will cry `caveat emptor', but there are 
literally hundreds of X calls. How do I know which ones are critical and 
which ones not? If I bracket all the ones I use, I will end up with
ugly code that runs slowly (remember it's two system calls per X call).

Clearly this is a general problem, but I do not recall seeing anything
about it on the net.

Advice welcomed.


Paul Breslaw.
   

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Paul Breslaw, Mecasoft SA,          |  telephone :  41 1 362 2040
Guggachstrasse 10, CH-8057 Zurich,  |  e-mail    :  mcsun!chx400!mecazh!paul
Switzerland.                        |               paul at mecazh.UUCP

-----------------------------

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: Interrupted library calls
Keywords: Xlib, library, signals, longjmp
Date: 17 Jan 90 14:57:14 GMT
Followup-To: comp.unix.wizards
To:       unix-wizards at sem.brl.mil

In article <373 at node17.mecazh.UUCP> paul at mecazh.UUCP (Paul Breslaw) writes:
>This is especially so if the signal is allowed to interrupt any old bit of 
>code that might be updating some data structure that is subsequently needed. 
>And this, of course, is what happened when certain Xlib routines were 
>interrupted.
>That leaves 3 - but whose responsibility is it to defend the data in the
>library - the implementor or the user?
>Clearly this is a general problem, but I do not recall seeing anything
>about it on the net.

The relevant properties are reentrancy and noninterruptibility.

These issues were recognized by the various standardization groups.
For example, ANSI C requires that signal() be invokable within any
signal handler, and that a signal handler function terminate only
via return, abort(), exit(), or longjmp().  IEEE 1003.1 adds a
large number of ("system call") functions that are required to be
invokable reentrantly or else block signals during their operation
(so that reentrance is not possible).  The X/Open Portability Guide
adds chroot() to this list and imposes these constraints on abort(),
exit(), and longjmp() (which are therefore hard to implement!).

Note that stdio functions and other similar library functions were
NOT so constrained, in order to avoid paying a run-time penalty on
each use of these heavily-used functions.  However, some vendors of
multiprocessor implementations of UNIX have decided to go ahead and
use semaphores to protect critical regions within such library
functions, in order to prevent the kind of problem you encountered.

Unless the specification of a library function states that it is
safe to abort or reenter it, you the application programmer should
take steps to avoid doing so.

-----------------------------

From: Greyham Stoney <greyham at hades.oz>
Subject: "bad ulimit" on all non-root "at" & "batch" jobs under 386/ix
Date: 16 Jan 90 19:37:11 GMT
To:       unix-wizards at sem.brl.mil

Our system has suddenly, and for no apparent reason, started rejecting all
jobs from "at" and "batch" by users other than root with the error message
"bad ulimit" mailed back to the user when the command is run.

The problem appears to be in setting up the batch environment to be the
same as the one in which the job was queue'ed. Our /etc/default/login
contains:
	ULIMIT=99999
(to make filesize effectively unlimited).

Then, the /usr/lib/cron/.proto file has an entry:
	ulimit $l
(to set the ulimit the same as when the batch job was queued).

But, when this 'ulimit' command is ultimately run in the batch job, it
gets rejected with the "bad ulimit" message. Only root can increase it's
ulimit; so presumably cron should be starting the jobs with unlimited
(or very large) ulimit, so that the .proto generated entry can bring it
down to what it should be. So, what could be causing cron to start the job
with too small a ulimit?. Or is something else wrong here?. Any ideas?.

Thanks, Greyham.

-- 
/*  Greyham Stoney:                            Australia: (02) 428 6476  *
 *     greyham at hades.oz  - Ausonics Pty Ltd, Lane Cove, Sydney, Oz.      *
 *                ISDN: Interface Subscribers Don't Need                 */

-----------------------------

From: "Conor P. Cahill" <cpcahil at virtech.uucp>
Subject: Re: "bad ulimit" on all non-root "at" & "batch" jobs under 386/ix
Date: 17 Jan 90 00:23:48 GMT
To:       unix-wizards at sem.brl.mil

In article <558 at hades.OZ>, greyham at hades.OZ (Greyham Stoney) writes:
> But, when this 'ulimit' command is ultimately run in the batch job, it
> gets rejected with the "bad ulimit" message. Only root can increase it's
> ulimit; so presumably cron should be starting the jobs with unlimited
> (or very large) ulimit, so that the .proto generated entry can bring it
> down to what it should be. So, what could be causing cron to start the job
> with too small a ulimit?. Or is something else wrong here?. Any ideas?.

Cron starts from an /etc/rc2.d file, which is run by init.  The ULIMIT in
effect when init starts cron is the ulimit in the kernel (max at 12228 or 
something like that).  Since cron is running as root, it does not 
to obey the ulimit (and any of root's cron jobs doesn't either).  However,
once the job starts up as non-root it must obey the ulimit.  

The fix for this is to modify the startup file (/etc/rc2.d/S75cron on this 
system) so that it sets it's ulimit real high before starting cron. 

-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

-----------------------------

From: "Steven M. Schultz" <sms at wlv.imsd.contel.com>
Subject: Re: "bad ulimit" on all non-root "at" & "batch" jobs under 386/ix
Date: 17 Jan 90 10:38:30 GMT
Sender: news at wlbr.imsd.contel.com
Followup-To: comp.unix.i386
To:       unix-wizards at sem.brl.mil

In article <1990Jan17.002348.11507 at virtech.uucp> cpcahil at virtech.uucp (Conor P. Cahill) writes:
>In article <558 at hades.OZ>, greyham at hades.OZ (Greyham Stoney) writes:
>> But, when this 'ulimit' command is ultimately run in the batch job, it
>> gets rejected with the "bad ulimit" message...
>
>Cron starts from an /etc/rc2.d file, which is run by init.  The ULIMIT in
>effect when init starts cron is the ulimit in the kernel (max at 12228...

	i must disagree.

	"ulimit" is BAD,  actually 'impish' is more descriptive - it does
	no real good, but a great deal of inconvenience and mischieve.

	the "correct" fix is to convince the purveyors of
	the product which include this brain-dead system call to remove
	it and implement disc quotas (a la 4.3/2.10.1BSD).

	Steven M. Schultz
	sms at wlv.imsd.contel.com

-----------------------------

From: Joseph Sarkes <joe at junkyard.uucp>
Subject: Re: "bad ulimit" on all non-root "at" & "batch" jobs under 386/ix
Date: 17 Jan 90 23:02:59 GMT
Followup-To: poster
To:       unix-wizards at sem.brl.mil


ulimit is set by the kernel for all programs using the compiled in
value. This is set in the configuration file (stune) or whatever
your system uses. since login runs as root, it can take the default
value and raise it. a process started by cron is not started by
login, thus it does not get its ulimit raised before running. thus
is is necessary to have the stune value of ulimit as high or higher
than the default login value for cron to work right, or you can
change the cron prototype if that works better for you. 

Joseph Sarkes	(junkyard!joe)

-----------------------------

From: Jay Llewellyn <jkl at eplrx7.uucp>
Subject: 8mm tape made on SUNOS 4.0.3, cannot be read with SUNOS 3.5.2
Keywords: 8mm SUNOS
Date: 16 Jan 90 20:59:49 GMT
Sender: usenet at udel.edu
To:       unix-wizards at sem.brl.mil


	I currently have a problem reading 8mm tapes between two
different versions of the SUNOS.  My two active brain cells tell
be that this had been discussed at some point in the past.  If this 
topic has been covered in detail previously, and you have a summary 
please e-mail, otherwise here goes with the problem description.


	The two machines in question:

		4/260 running SUNOS 4.0.3
		3/160 running SUNOS 3.5.2

	Tapes make on the 3/160 can be read on both machines but,
the tapes made on the 4/260 can only be read by the 4/260.  When a
3/160 tape is tried on the 4/260 an I/O error occurs.  Both dump and
tar were tried, dd also fails with a I/O error. 

	Can this problem be overcome, without upgrading the 3/160,  
and how can it be done.

Thanks in advance.

jkl
-- 
    Jay Llewellyn                 |    E.I. Du Pont de Nemours & Co.
    eplrx7!jkl at uunet.uu.net       |    Engineering Physics Laboratory
    (302) 695-8209/7395           |    P.O. Box 80357
   "Maybe it was the roses"       |    Wilmington, DE 19880-0357
--
The UUCP Mailer

-----------------------------

From: Saeed Talebbeik <saeed at sunseeker.uucp>
Subject: REAL TIME CLASS
Date: 17 Jan 90 03:21:16 GMT
Sender: news at cirrusl.uucp
To:       unix-wizards at sem.brl.mil

I live in San Jose, California. I am looking for a good hands on course in
"real time software design". Does anyone have any idea which university 
offers such a course ? 

-----------------------------

From: Saeed Talebbeik <saeed at sunseeker.uucp>
Subject: XENIX tty device driver
Date: 17 Jan 90 03:27:53 GMT
Sender: news at cirrusl.uucp
To:       unix-wizards at sem.brl.mil

This message is for Mr. Jonathan Bayer in particular:
Thanks for the info. That makes me feel a little better. However does this code
in the XENIX manual handle the issue of multiple serial lines on one controller.
I guess the answer is yes since if it can handle one serial port it should be
able to handle several. Also do the line descipline routines handle the
issue of several processes trying to write to a single port? How about several
processes trying to read from the same port? This should be illegal since only
the first process that opens the tty for reading should be the sole reader
and other processes should not be able to read from the tty device(breach of
security I guess). If you JB or others have any comments please leave a message
for me . Thanks.

-----------------------------

From: Barry Shein <bzs at world.std.com>
Subject: Re: How to delete a file with ^? chars in the name?
Date: 17 Jan 90 05:15:08 GMT
To:       unix-wizards at sem.brl.mil


From: jik at athena.mit.edu (Jonathan I. Kamens)
>  The number of unnecessary postings, many of them wrong, about "How to
>delete a file with ^? chars in the name?" is really, really getting
>irritating.  Can people just *stop* posting, please?  And if you *are*
>going to post about it, then post about the *real* question, which is
>how to deal with files that have the eighth bit set in characters in
>their names.

Although your heart's in the right place you're missing the point. I
would bet that most people who post dumb/repetitive questions are new
to the list so they won't see your pleas.

I used to like to stand up in front of a class on the first day of the
semester, look out at the audience confused and comment "didn't I
explain all this stuff *last* year? What's your problem?"

Probably some of these questions are unleashed between "frequently
asked questions" postings although on USENET these sorts of things are
supposed to be archived and somehow the new user nudged toward them. I
must admit that such helpful hints are getting so large as to be less
than helpful.

On my system I have well over 1,000 newsgroups, imagine if even 10%
had a few pages of "frequently asked questions" or equivalent, no one
would read it, hundreds of pages. It's bulky already with frequently
asked questions, emily_postnews, netiquette, group descriptions, etc.

Here's an evil idea:

Let's put a hook into the mail readers which ignores all postings on
unix-wizards which doesn't, oh I dunno, have a subject line ending
with a period, or exactly two blank lines at the beginning, something.

Then explain this requirement at the end of frequently asked questions...

heh heh...:-)

-- 
        -Barry Shein

Software Tool & Die, Purveyors to the Trade         | bzs at world.std.com
1330 Beacon St, Brookline, MA 02146, (617) 739-0202 | {xylogics,uunet}world!bzs

-----------------------------

From: Greg Kemnitz <kemnitz at postgres.uucp>
Subject: Dynamic Loader for DECstations wanted
Date: 17 Jan 90 08:58:50 GMT
Sender: news at pasteur.berkeley.edu
To:       unix-wizards at sem.brl.mil

This is probably wishful thinking, but does anyone out there know of any
public domain dynamic loaders (lets you load a .o file and its associated
procedures at runtime) for DECstations (or have any source code :-))??  Any
and all help is greatly appreciated.


 -----------------------------------------------------------------------
Greg Kemnitz                  |      "I ran out of the room - I
Postgres Chief Programmer     |      didn't want to be killed by a pile
kemnitz at postgres.berkeley.edu |      of ULTRIX manuals" :-)
                              |
                              |      --A friend at DEC Palo Alto in the Quake

-----------------------------

From: George Hartzell <hartzell at boulder.colorado.edu>
Subject: Re: Dynamic Loader for DECstations wanted
Date: 17 Jan 90 17:16:43 GMT
Sender: news at boulder.colorado.edu
Followup-To: comp.unix.ultrix
To:       unix-wizards at sem.brl.mil

In article <21209 at pasteur.Berkeley.EDU>, kemnitz at postgres (Greg Kemnitz) writes:
>This is probably wishful thinking, but does anyone out there know of any
>public domain dynamic loaders (lets you load a .o file and its associated
>procedures at runtime) for DECstations (or have any source code :-))??  Any
>and all help is greatly appreciated.
>

I wrote something that works with the newer MIPS compilers (I was
using 2.10 because I needed there builtin alloca for another part
of the port) that does dynamic loading for a version of scheme called
ELK.  It should work for DECstations, but several people have told me
that there is a problem with the MIPS 1.31 ld's handling of the -T
option.  The jist of it seemed to be that it wasn't possible under the
current compiler release.  I think that they have the newer release
(I don't know if it is MIPS 2.0 or 2.1) in field test.  If you want to
see the code, let me know.
g.
George Hartzell			                  (303) 492-4535
 MCD Biology, University of Colorado-Boulder, Boulder, CO 80309
hartzell at Boulder.Colorado.EDU  ..!{ncar,nbires}!boulder!hartzell

-----------------------------

From: brnstnd at stealth.acf.nyu.edu
Subject: What do you want in a signal library?
Date: 17 Jan 90 08:59:27 GMT
To:       unix-wizards at sem.brl.mil

For amusement I'm writing a BSD library for dealing with signals in
The Right Way. Each signal gets a stack of handlers, invoked one at a
time when the signal arrives. There are functions for manipulating the
stacks, temporarily blocking a signal (but receiving it when the block
is released), turning off the special handling, etc. What else do people
want? Should there be special routines dealing with particular signals:
CHLD, time signals (ALRM, VTALRM, PROF), and so on?

On the same subject: How does one correctly code ANSI C raise() so as to
prevent race conditions? I want to make sure I'm not messing this up.

---Dan

-----------------------------

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: What do you want in a signal library?
Date: 17 Jan 90 15:02:44 GMT
To:       unix-wizards at sem.brl.mil

In article <20926 at stealth.acf.nyu.edu> brnstnd at stealth.acf.nyu.edu (Dan Bernstein) writes:
>On the same subject: How does one correctly code ANSI C raise() so as to
>prevent race conditions? I want to make sure I'm not messing this up.

/*
	raise() -- send a signal to the current process

	public-domain implementation

	last edit:	16-Jan-1990	Gwyn at BRL.MIL

	complies with the following standards:
		ANSI X3.159-1989
		IEEE Std 1003.1-1988
		SVID Issue 3
 */

extern int	getpid(), kill();	/* UNIX/POSIX system calls */

int
raise(sig)
	int	sig;
	{
	return kill(getpid(), sig);	/* set errno to EINVAL if sig invalid */
	}

-----------------------------

From: Jamie Zawinski <jwz at teak.berkeley.edu>
Subject: noise posts (was re: How to delete a file with ^? chars in the name?)
Date: 17 Jan 90 19:17:58 GMT
Sender: news at pasteur.berkeley.edu
To:       unix-wizards at sem.brl.mil

In article <1990Jan17.051508.2531 at world.std.com> bzs at world.std.com (Barry Shein) writes:
- [ ... ]
- Although your heart's in the right place you're missing the point. I
- would bet that most people who post dumb/repetitive questions are new
- to the list so they won't see your pleas.
- [ ... ]
- Here's an evil idea:
- Let's put a hook into the mail readers which ignores all postings on
- unix-wizards which doesn't, oh I dunno, have a subject line ending
- with a period, or exactly two blank lines at the beginning, something.
- Then explain this requirement at the end of frequently asked questions...
- 
- heh heh...:-)

This is from the weekly posting of alt.hackers:

- To cut down on mindless violations of the rule, the group is
- self-moderated - marked as moderated, but with no moderator's address.
- Anyone who can figure out how to approve a message is welcome to post.
- I'm not going to post the (trivial) instructions for actually doing
- it.

Just a thought.  Of course, someone would just end up putting the
instructions for doing this in a new-users file somewhere, but it might
last for a while.

		-- Jamie

-----------------------------

From: "Robert E. Novak" <rnovak at mips.com>
Subject: SPEC Solicits Benchmark Applications
Date: 17 Jan 90 22:14:45 GMT
Sender: news at mips.com
To:       unix-wizards at sem.brl.mil

SPEC is actively soliciting for source code that will be included in future
SPEC benchmark releases.  The attached memo is the form that must be
completed BEFORE a benchmark is submitted.  SPEC cannot consider a
benchmark unless we can have a clear permission to use and distribute from
the author/owner of the benchmark.  We are particularly interested in
applications as opposed to synthetic benchmarks.  In a separate posting I
will publish the SPEC guidelines for good application programs.


                                              SPEC



       subject: Permission to Use and         date: January 17, 1990
                Distribute Computer
                Program                       from: SPEC Steering Committee



       1.  Name_and_Description_of_Program








       2.  Name_and_Address_of_Program_SUBMITTER








       3.  Permission_to_Use_and_Distribute

         1.  License.  SUBMITTER grants SPEC the non-revokable,
             non-exclusive/exclusive (strike one) right to copy,
             modify and distribute the PROGRAM to third parties
             insofar as SUBMITTER has proprietary rights in the
             PROGRAM.

         2.  Fee.  SUBMITTER waives any fee for the license of
             paragraph 1, both from SPEC and from end users to whom
             SPEC may license PROGRAM.

         3.  Restrictions.  The following restrictions are imposed
             by SUBMITTER on SPEC with regard to the license of
             paragraph 1 (write None if none apply; use separate
             continuation sheet, if needed):






         4.  Representation.  SUBMITTER represents that the PROGRAM
             submitted to SPEC is the best available version of the
             PROGRAM and that the PROGRAM is either in the public
             domain or owned by SUBMITTER and that SUBMITTER is not
             aware of any actual or threatened infringement claim











                                  - 2 -



             relating to the PROGRAM.

       SUBMITTER


       By _____________________________


       Name ___________________________


       Address ________________________


       ________________________________


       Telephone ______________________



       SPEC


       By _____________________________


       Memorandum to
       Standard Performance Evaluation Corporation
       c/o Waterside Associates
       39510 Paseo Padre Parkway
       Suite 350
       Fremont CA  94538

 -----
Robert E. Novak                                     MIPS Computer Systems, Inc.
{ames,decwrl,pyramid}!mips!rnovak      928 E. Arques Ave.  Sunnyvale, CA  94086
rnovak at mips.COM       (rnovak%mips.COM at ames.arc.nasa.gov)       +1 408 991-0402
-- 
Robert E. Novak                                     MIPS Computer Systems, Inc.
{ames,decwrl,pyramid}!mips!rnovak      928 E. Arques Ave.  Sunnyvale, CA  94086
rnovak at mips.COM       (rnovak%mips.COM at ames.arc.nasa.gov)       +1 408 991-0402

-----------------------------

From: "Gregory A. Hooten" <gahooten at orion.arc.nasa.gov>
Subject: Request of final security checker.
Date: 18 Jan 90 01:09:45 GMT
Sender: usenet at ames.arc.nasa.gov
To:       unix-wizards at sem.brl.mil

A while back, a person asked what people would put into a security checking 
program if they had a choice.  Has anyone condenced the program down to a 
list of requested items to check for?  I would be interested in this infor-
mation if possible.

Thanks

Greg Hooten
GAHOOTEN at ames.arc.nasa.gov

-----------------------------

From: Fariborz "Skip" Tavakkolian <fst at gtenmc.uucp>
Subject: How does a VARARGS function call another VARARGS function?
Keywords: VARARGS
Date: 18 Jan 90 01:52:24 GMT
To:       unix-wizards at sem.brl.mil

I think I have tried everything, though not sure. The problem looks like
this:

void error_function_1(file, line, errorlevel, fmt, va_alist)
	char *file, *fmt, *errorlevel;
	int line;
	va_dcl
	{
	va_list args;
	/* do stuff */
	error_function_2(errorlevel, fmt, args);
	/* do stuff */
	va_end();
	}

/* error_function_2 is another VARARGS function which uses vfprintf
 * for further processing
 */

Short of doing the ugly _arg1, _arg2, _arg3, ..., _arg1001, etc... is there
a ``right'' way of doing this?

Many thanks.

Skip
-- 
 ----------------------------------------------------------------------------
Fariborz "Skip" Tavakkolian  -of-  Automated Cellular Engineering
Currently consulting         -at-  GTE Telecom, Inc. Bothell, Wa
Mail:                              tiny1!fst at mcgp1  -or-  fst at gtenmc

-----------------------------


End of UNIX-WIZARDS Digest
**************************



More information about the Comp.unix.wizards mailing list