Bug 36863 - Setting a virtual memory limit of 256MB causes /bin/sort to immediately fail with memory exhausted
Setting a virtual memory limit of 256MB causes /bin/sort to immediately fail ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: textutils (Show other bugs)
7.1
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-20 13:33 EDT by Henrik Grubbstrvm
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-20 15:08:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Henrik Grubbstrvm 2001-04-20 13:33:05 EDT
sh-2.04$ ulimit -a
core file size (blocks)     1000000
data seg size (kbytes)      unlimited
file size (blocks)          unlimited
max locked memory (kbytes)  unlimited
max memory size (kbytes)    unlimited
open files                  1024
pipe size (512 bytes)       8
stack size (kbytes)         8192
cpu time (seconds)          unlimited
max user processes          8073
virtual memory (kbytes)     unlimited
sh-2.04$ sort
foo     
bar
baz
bar
baz
foo
sh-2.04$ ulimit -v 262144
sh-2.04$ sort
sort: memory exhausted
sh-2.04$ ulimit -a 
core file size (blocks)     1000000
data seg size (kbytes)      unlimited
file size (blocks)          unlimited
max locked memory (kbytes)  unlimited
max memory size (kbytes)    unlimited
open files                  1024
pipe size (512 bytes)       8
stack size (kbytes)         8192
cpu time (seconds)          unlimited
max user processes          8073
virtual memory (kbytes)     262144

Setting of the limit as above worked fine with the linux-2.4.0-0.43 kernel.
Comment 1 Arjan van de Ven 2001-04-20 15:07:59 EDT
this is a bug in sort; sort tries to allocate 2/3rds of physical memory 
regardless of what it is sorting
Comment 2 Bernhard Rosenkraenzer 2001-04-20 18:07:12 EDT
Used to, until we fixed it up a while before the 7.1 release.

Note You need to log in before you can comment on or make changes to this bug.