RS/6000 SIGDANGER / low paging space

RS/6000 SIGDANGER / low paging space

Post by Todd Cromwe » Sun, 03 May 1992 09:56:02

Dear RS/6000 SIGDANGER / low paging space enthusiasts,

Some time ago some messages went by on comp.unix.aix about SIGDANGER
and the behaviour of the RS/6000 system when paging space is low.

I need to make a decision as to what to do about this problem: my
application, like many, I would guess, is not prepared to handle a
certain aspect of the RS/6000 system, that is, my application simply
relies on the return status of malloc to tell when out of memory.

Some of my options include:

1. Leave my application alone, which means that either it or other
processes may die if it or others run the system low on paging space.
Note regarding material in Info Explorer article Paging Space
Overview: ("If the shortage continues and falls below a second
threshold known as the paging space kill level, the system sends the
SIGKILL signal to processes that are the major users of paging space
_and that do not have a signal handler for the SIGDANGER signal_.").
I was told explicitly today by Leonard James at IBM AIX technical
support that the latter (underlined) half is not correct, that is,
that whether the process catches SIGDANGER is _not_ considered by the
kernel when finding processes to KILL (or: the "Angel of Death" does
not in fact skip processes which catch SIGDANGER).  Is this really the
case?  (I was told that the kernel either (3.1.x) kills the biggest
processes off in order, or (3.2.x) kills something like the last
processes started).

2. Install a handler for SIGDANGER which warns the user that paging
space is low, and either (a) continues merrily (and, if I was
allocating and not just sitting there, likely get KILLed or cause
others to be KILLed) or (b) stop and free or perhaps disclaim() some
memory.  Some handler for SIGDANGER like this might be the best

3. Use code like that in /usr/lpp/bos/samples/psmalloc.c whenever I
malloc, calloc, or realloc memory (the psmalloc sample code allocates
paging space at malloc time by checking psdanger() for space left, and
by catching SIGDANGER temporarily while touching all pages allocated).
The problem here is that this is another weird complication to my code
and place for things to break, and also there may well be things that
extend the brk value which wouldn't go through my psmalloc() (things
in the C or system runtime libraries, and a few small places in my


I would like to know if anyone knows of any other information about
SIGDANGER and the paging space low condition than I found in Paging
Space Overview and /usr/lpp/bos/samples/psmalloc, and if so, could
they send it or let me know about it.

If anyone has a collection of messages that went across comp.unix.aix
or elsewhere on this subject, I would be very appreciative if they
could mail it to me.

If anyone has handled this in his or her application, I'd love to hear
about how you solved it and why you solved it that way (and how
reliable/failsafe you think the solution is).

Finally, I would love it someone has an article/message explaining the
philosophy of why IBM chose the SIGDANGER and KILL behaviour over
other more conventional methods (most other UNIX workstations).  I
have a vague idea for some reasons why, but for some reason I can't
really seem to understand this one, and I didn't seem to get a
complete answer about the philosophy of why from IBM AIX tech support.

Please e-mail me directly with info or respond on the newsgroup.

Thank you very much,

Todd P. Cromwell III


1. SIGDANGER - page space low

Hi folks,

I receive the following error when compiling some C++ templates with xlC
under AIX 4.3:

        1540-173: (U) SIGDANGER received:  page space low, compilation stopping.

I'm no AIX guru (yet) so I am not sure whether there's much I can do about
this problem.  Does anyone have any suggestions?


Douglas Barton, Software Engineer, DASCOM Australia Pty Ltd

97 CBR900RR ***** VTr250 "QuarterStorm" ***** Live to RRide

2. NetBSD-1.1 and X windows, help plea..

3. Memory and paging space on RS/6000

4. Getting Solaris vold to log to syslog

5. Paging space on RS/6000

6. cache on a AXPpci33

7. RS/6000 error msgs (Was: Re: RS/6000 survey - will post summary)

8. Intel 100Mbit PRO networkadapter

9. Fonts for InfoExplorer on RS/6000 (was: Re: Font problems on RS/6000 running X11R5)

10. Paging space, SIGDANGER, etc.

11. swap space on RS/6000

12. RS/6000 81 page report by Harley Hahn 'WANTED'

13. Paging using RS/6000 (AIX v.4.3.2)