Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-22-2013, 06:07 PM   #1
LQ Newbie
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
How can I tell if a memory limit is being applied to an application?

I am a newbie so I apologize if this is an RTFM-type question.

I have an application that I am trying to run that seems to be failing due to a memory limit. I can run the job just fine on someone else's server that has 24GB of memory, but when I try to run it on one of my servers, it fails. The most recent attempt was on a Dell R815 server that has 128GB of RAM and is running 64-bit RHEL6.

The application is a bioinformatics program called HAPCUT and is distributed as an x86_64 binary.

I ran the job as root (even though running things as root is generally a bad idea, I did in this case in an effort to get it to work).

First I ran
ulimit -c unlimited
to enable core files.

Then I ran ulimit -a
and got the following output:
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 1032072
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
Then when the program was running, I ran top (sorted by %MEM) in another window. This is what was on the screen when the program terminated with the eror:
Segmentation fault (core dumped)
top - 15:30:47 up 267 days, 23:54,  3 users,  load average: 0.54, 0.23, 0.34
Tasks: 1191 total,   2 running, 1189 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.6%us,  0.0%sy,  0.0%ni, 98.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  132124744k total, 23287424k used, 108837320k free,   135916k buffers
Swap:  2097144k total,    11300k used,  2085844k free, 15601464k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                    
64621 root      20   0 7502m 5.3g  592 R 100.0  4.2   0:46.30 HAPCUT
If I'm reading this correctly, it was using only 4.2% of the RAM, so it should have been ok.

It generated a core dump and I ran gdb on it. Here is the output from that:
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /mnt/thor/home/sselvara/phasing/CAST.129/haplotype/software/HAPCUT-latest/HAPCUT...(no debugging symbols found)...done.
[New Thread 64692]
Missing separate debuginfo for 
Try: yum --disablerepo='*' --enablerepo='*-debug*' install /usr/lib/debug/.build-id/80/1b9608daa2cd5f7035ad415e9c7dd06ebdb0a2
Reading symbols from /lib64/ debugging symbols found)...done.
Loaded symbols for /lib64/
Reading symbols from /lib64/ debugging symbols found)...done.
Loaded symbols for /lib64/
Reading symbols from /lib64/ debugging symbols found)...done.
Loaded symbols for /lib64/
Core was generated by `/mnt/thor/home/sselvara/phasing/CAST.129/haplotype/software/HAPCUT-latest/HAPCU'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000403d3c in label_node ()
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6.x86_64
Does anyone have any thoughts/suggestions about things I can check/try?

Thank you very much.
Old 03-23-2013, 08:51 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,810

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
Nothing to do with being low on memory.
Segmentation fault is a software error in your program. The part that tells you what is wrong is the stack trace printed after the error. Post that if you need help figuring it out.

bt dumps the stack in gdb.

Last edited by smallpond; 03-23-2013 at 08:54 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: SEDA applied at application level LXer Syndicated Linux News 0 02-07-2013 02:20 PM
LXer: SEDA applied at application level LXer Syndicated Linux News 0 02-07-2013 01:40 PM
[SOLVED] Virtual Memory limit exhausted at 1TB? malloc/mmap failures even with free memory mfkraft Linux - Server 2 09-16-2012 08:27 AM
How to Limit suphp user memory limit? Rundi Linux - Server 2 05-14-2010 12:27 PM
Limit max thread and memory for application in linux kernel 2.4.x manhvt Linux - General 4 07-12-2005 03:41 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration