Technical article 105084

sort(C) fails with "sort: allocation error before sort" during a kernel relink.

OpenServer 5.0.0

Written · Last revised

Problem

The error below is displayed when running sort(C), or when attempting to relink the kernel:

sort: allocation error before sort

Cause

sort(C) is attempting to allocate memory, but is failing because:

(a) The system has run out of virtual memory.

(b) sort(C) is exceeding the maximum process size governed by the kernel parameter MAXUMEM.

(c) MAXUMEM is set larger than its maximum value of 524287. This causes variables in the kernel to overflow when it checks for the process exceeding maximum process size.

Solution

(a) Check the system's available virtual memory by monitoring the
    kernel variable "availsmem".  If this is low, increase the
    amount of swap space.  See TA104908, "'Fork failed' messages
    appear on the system console" for further details on "availsmem"
    and increasing swap space.
(b) Increase the kernel tunable MAXUMEM by using the configure(ADM)
    program in /etc/conf/cf.d.  Relink the kernel and reboot the
    system for this to take effect.
(c) Reduce MAXUMEM to 524287.

See also

configure(ADM), sort(C)

From the Xinuos technical article database, record 105084. Reproduced with permission. The original is at www.sco.com/ta/105084, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.