[systemd-devel] systemd-cgls - Memory overflow
Sven Anders
anders at anduras.de
Thu May 10 05:45:39 PDT 2012
Hello!
I'm experiencing a problem with systemd-cgls while testing systemd.
I run systemd for tests on a small KVM VM with ~700MB RAM and no swap.
If I execute the "systemd-cgls" command, I see the tree but without
the command lines of the executables. I only see "n/a".
Example:
└ system
├ 1 n/a
├ sshd.service
│ ├ 608 n/a
│ ├ 639 n/a
│ ├ 641 n/a
│ ├ 671 n/a
│ └ 672 n/a
├ getty at .service
│ ├ tty1
│ │ ├ 302 n/a
│ │ └ 610 n/a
│ └ tty2
│ └ 301 n/a
├ webredirect.service
│ └ 300 n/a
├ confgui.service
│ └ 299 n/a
├ dbus.service
│ └ 340 n/a
├ systemd-logind.service
│ └ 294 n/a
├ systemd-journald.service
│ └ 174 n/a
└ udev.service
├ 171 n/a
├ 348 n/a
└ 349 n/a
I investigated this further with strace and get the following errors:
[...]
access("/sys/fs/cgroup/systemd/system/webredirect.service", F_OK) = 0
open("/sys/fs/cgroup/systemd/system/webredirect.service/cgroup.procs", O_RDONLY|O_LARGEFILE|O_CLO
EXEC) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40047000
read(6, "300\n", 4096) = 4
open("/proc/300/cmdline", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
fstat64(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40048000
read(7, "/usr/sbin/webredirect\0-f\0", 1024) = 25
close(7) = 0
munmap(0x40048000, 4096) = 0
read(6, "", 4096) = 0
open("/proc/300/cmdline", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
mmap2(NULL, 1075859456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cann
ot allocate memory)
mmap2(NULL, 1075859456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cann
ot allocate memory)
brk(0x81ff6000) = 0x41de2000
mmap2(NULL, 1075990528, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cann
ot allocate memory)
close(7)
[...]
The command line is read successfully, but it's opened a second time and this time the
tool tries to memory map 1.075.859.456 bytes. Why? I think it will work, if I add swap space
or provide more RAM. But the tool should work with small RAM too...
Regards
Sven Anders
--
Sven Anders <anders at anduras.de> () UTF-8 Ribbon Campaign
/\ Support plain text e-mail
ANDURAS intranet security AG
Messestrasse 3 - 94036 Passau - Germany
Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 50-55
Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anders.vcf
Type: text/x-vcard
Size: 352 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120510/3f971575/attachment.vcf>
More information about the systemd-devel
mailing list