2

I'm getting a segmentation fault when I try to run a simple "ps aux" for a certain user. If I run as root or another user it runs well. So I think is something related with ulimits, but I think that those parameters are enough:

bash-4.1$ ulimit -aS core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 128516 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 16384 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 256 cpu time (seconds, -t) unlimited max user processes (-u) 16384 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited bash-4.1$ ps aux Segmentation fault (core dumped) 

I also tried to run with strace but I don't see anything:

bash-4.1$ strace -f -F -v -s 8192 ps aux ... uname({sysname="Linux", nodename="node1", release="2.6.39-400.215.10.el6uek.x86_64", version="#1 SMP Wed Sep 10 00:07:12 PDT 2014", machine="x86_64"}) = 0 open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3 read(3, "0-3\n", 8192) = 4 close(3) = 0 statfs("/selinux", {f_type=0xf97cff8c, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 brk(0) = 0x1daa000 brk(0x1dcb000) = 0x1dcb000 open("/usr/lib/locale/locale-archive", O_RDONLY) = 3 fstat(3, {st_dev=makedev(252, 0), st_ino=408478, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=193600, st_size=99158576, st_atime=2015/05/03-16:54:32, st_mtime=2014/09/03-11:14:03, st_ctime=2014/09/03-11:14:03}) = 0 mmap(NULL, 99158576, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8d56d55000 ... rt_sigaction(SIGTRAP, {0x401ed0, ~[RTMIN RT_1], SA_RESTORER, 0x37ad8326b0}, NULL, 8) = 0 rt_sigaction(SIGILL, {0x401ed0, ~[RTMIN RT_1], SA_RESTORER, 0x37ad8326b0}, NULL, 8) = 0 rt_sigaction(SIGHUP, {0x401ed0, ~[RTMIN RT_1], SA_RESTORER, 0x37ad8326b0}, NULL, 8) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV (core dumped) +++ Segmentation fault (core dumped) 

Thanks in advance!

2
  • What is your OS/version ? Commented May 4, 2015 at 11:01
  • Oracle Linux Server release 6.5 $ uname -r 2.6.39-400.215.10.el6uek.x86_64 Commented May 4, 2015 at 12:16

1 Answer 1

4

Try to increment the user stack size, the default on my Linux workstation is:

stack size (kbytes, -s) 8192 
3
  • ok, I think you're right. I created a new user and it has the 8192 as stack size. The ps runs OK then when I change it to 256 I got the segmentation fault. Now I've to find where is configured the 256 limit for that user because the file /etc/security/limits.conf is with default values. Commented May 4, 2015 at 12:19
  • Nice, set it in limits.conf for the concerned user then and restart, it should work. Commented May 4, 2015 at 13:09
  • some consultant set up "ulimit -s 256" on the .bash_profile and didn't noticed us :-( Commented May 4, 2015 at 14:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.