Re: some problems with chpst again
Charlie Brady <[email protected]>
| Newsgroups | gmane.comp.misc.pape.general |
|---|---|
| Message-ID | <Pine.LNX.4.44.0405111029150.17865-100000@e-smith.charlieb.ott.istop.com> |
On Tue, 11 May 2004, Charlie Brady wrote:
> On Tue, 11 May 2004, Payal Rathod wrote:
>
> > With softlimit, it runs fine.
...
> > But with chpst it has problems,
...
> I'd suggest that you capture strace output from each instance, and see
> what difference there is in the system calls. Instead of "exec ...", use
> "exec strace -o/tmp/strace.$$ ..."
Curiosity got the better of me, so I compared the two myself (using
"strace .... /bin/echo foo"). There's quite a difference in system calls.
softlimit:
...
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0Pv\1B4\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1402035, ...}) = 0
old_mmap(0x42000000, 1264960, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x42000000
mprotect(0x4212c000, 36160, PROT_NONE) = 0
old_mmap(0x4212c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12c000) = 0x4212c000
old_mmap(0x42131000, 15680, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42131000
close(3) = 0
munmap(0x40014000, 17350) = 0
brk(0) = 0x804bf60
brk(0x804bf90) = 0x804bf90
brk(0x804c000) = 0x804c000
getrlimit(0x9, 0xbffff2a0) = 0
setrlimit(RLIMIT_AS, {rlim_cur=4000000, rlim_max=RLIM_INFINITY}) = 0
execve("/bin/echo", ["/bin/echo", "foo"], [/* 19 vars */]) = 0
...
chpst:
...
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0Pv\1B4\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1402035, ...}) = 0
old_mmap(0x42000000, 1264960, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x42000000
mprotect(0x4212c000, 36160, PROT_NONE) = 0
old_mmap(0x4212c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12c000) = 0x4212c000
old_mmap(0x42131000, 15680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42131000
close(3) = 0
munmap(0x40014000, 17350) = 0
brk(0) = 0x804cbc0
brk(0x804cbf0) = 0x804cbf0
brk(0x804d000) = 0x804d000
getrlimit(0x2, 0xbfffdfa0) = 0
setrlimit(RLIMIT_DATA, {rlim_cur=4000000, rlim_max=RLIM_INFINITY}) = 0
getrlimit(0x3, 0xbfffdfa0) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=4000000, rlim_max=RLIM_INFINITY}) = 0
getrlimit(0x8, 0xbfffdfa0) = 0
setrlimit(RLIMIT_MEMLOCK, {rlim_cur=4000000, rlim_max=RLIM_INFINITY}) = 0
getrlimit(0x9, 0xbfffdfa0) = 0
setrlimit(RLIMIT_AS, {rlim_cur=4000000, rlim_max=RLIM_INFINITY}) = 0
execve("/bin/echo", ["/bin/echo", "foo"], [/* 19 vars */]) = 0
...
The next step in the investigation would involved reading "man setrlimit",
to work out what those extra calls are doing. You might also look at the
clamd strace, and see what it was doing when it reported the problem.
---
Charlie