[Bug 1198180] Re: possible leak in upstart 1.5

Paweł Hikiert 1198180 at bugs.launchpad.net
Mon Aug 5 10:50:50 UTC 2013


Update: I've found another memory-hog, the upstart-udev-bridge. Looks
like stopping it (sudo stop upstart-udev-bridge) also stops memory
leaking in the upstart (init) process.

$ pmap -x 368
368:   upstart-udev-bridge --daemon
Address           Kbytes     RSS   Dirty Mode   Mapping
----------------  ------  ------  ------
total kB               0       0       0
coding at wbec170:~$ sudo pmap -x 368
368:   upstart-udev-bridge --daemon
Address           Kbytes     RSS   Dirty Mode   Mapping
00007f66c06af000       0    6988    6988 rw---    [ anon ]
00007f66c82b6000       0     260     260 rw---    [ anon ]
00007f66c9ede000       0       4       0 r-x--  librt-2.15.so
00007f66c9ee5000       0       0       0 -----  librt-2.15.so
00007f66ca0e4000       0       4       4 r----  librt-2.15.so
00007f66ca0e5000       0       0       0 rw---  librt-2.15.so
00007f66ca0e6000       0     228       0 r-x--  libc-2.15.so
00007f66ca29b000       0       0       0 -----  libc-2.15.so
00007f66ca49a000       0       8       8 r----  libc-2.15.so
00007f66ca49e000       0       8       8 rw---  libc-2.15.so
00007f66ca4a0000       0      12      12 rw---    [ anon ]
00007f66ca4a5000       0       4       0 r-x--  libudev.so.0.13.0
00007f66ca4b1000       0       0       0 -----  libudev.so.0.13.0
00007f66ca6b0000       0       4       4 r----  libudev.so.0.13.0
00007f66ca6b1000       0       0       0 rw---  libudev.so.0.13.0
00007f66ca6b2000       0      12       0 r-x--  libpthread-2.15.so
00007f66ca6ca000       0       0       0 -----  libpthread-2.15.so
00007f66ca8c9000       0       4       4 r----  libpthread-2.15.so
00007f66ca8ca000       0       0       0 rw---  libpthread-2.15.so
00007f66ca8cb000       0       4       4 rw---    [ anon ]
00007f66ca8cf000       0     144       0 r-x--  libdbus-1.so.3.5.8
00007f66ca911000       0       0       0 -----  libdbus-1.so.3.5.8
00007f66cab11000       0       4       4 r----  libdbus-1.so.3.5.8
00007f66cab12000       0       4       4 rw---  libdbus-1.so.3.5.8
00007f66cab13000       0       4       0 r-x--  libnih-dbus.so.1.0.0
00007f66cab1b000       0       0       0 -----  libnih-dbus.so.1.0.0
00007f66cad1b000       0       4       4 r----  libnih-dbus.so.1.0.0
00007f66cad1c000       0       0       0 rw---  libnih-dbus.so.1.0.0
00007f66cad1d000       0       8       0 r-x--  libnih.so.1.0.0
00007f66cad33000       0       0       0 -----  libnih.so.1.0.0
00007f66caf33000       0       4       4 r----  libnih.so.1.0.0
00007f66caf34000       0       4       4 rw---  libnih.so.1.0.0
00007f66caf35000       0       0       0 r-x--  ld-2.15.so
00007f66cafaf000       0      48      48 rw---    [ anon ]
00007f66cb133000       0       4       4 rw---    [ anon ]
00007f66cb155000       0       0       0 rw---    [ anon ]
00007f66cb157000       0       0       0 r----  ld-2.15.so
00007f66cb158000       0       0       0 rw---  ld-2.15.so
00007f66cb15a000       0       0       0 r-x--  upstart-udev-bridge
00007f66cb365000       0       4       4 r----  upstart-udev-bridge
00007f66cb366000       0       4       4 rw---  upstart-udev-bridge
00007f66cb750000       0     124     124 rw---    [ anon ]
00007f66cb771000       0  849976  847232 rw---    [ anon ]
00007fffb8a0b000       0      20      16 rw---    [ stack ]
00007fffb8a69000       0       4       0 r-x--    [ anon ]
ffffffffff600000       0       0       0 r-x--    [ anon ]
----------------  ------  ------  ------
total kB         1919108  857900  854744

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/1198180

Title:
  possible leak in upstart 1.5

Status in “upstart” package in Ubuntu:
  Confirmed

Bug description:
  Description:    Ubuntu 12.04.2 LTS
  Release:        12.04
  Package:    1.5-0ubuntu7.2
  Kernel:      Linux XXX 3.8.0-23-generic #34~precise1-Ubuntu SMP Wed May 29 21:12:31 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

  We're starting lxc containers on demand, so there's lots and lots of
  network interfaces going up and down. Udev emits signal, that goes to
  upstart-udev-bridge, and next to the upstart itself. After about 40K
  containers created/destroyed, upstart takes about 250MB or RAM, and it
  grows with every event received/send. Not only RAM is beeing used, but
  also init spends more time for every new event on the socket.

  What happens:
  init uses more RAM and more CPU during lifetime, when lots of network interfaces are beeing created/destroyed

  What is expected:
  init work should not change depending on number of events served

  technical detail:
  # pmap -x 1
  00007f446f865000       0  237036  237036 rw---    [ anon ]
  00007fffc694d000       0      24      24 rw---    [ stack ]
  00007fffc69fe000       0       4       0 r-x--    [ anon ]
  ffffffffff600000       0       0       0 r-x--    [ anon ]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/1198180/+subscriptions




More information about the foundations-bugs mailing list