I confirm this behaviour.
I use lxc for testing purposes. For each set of tests a few containers are
created. Lifetime span is about a few seconds, and the tests are beeing run one
after another continuously. After a few days init takes more than 2GB of
memory. What's interesting - after stopping the tests two days ago, upstart is
still creating/destroying non-existing virtual interfaces for the containers:
$ sudo lxc-list
RUNNING
FROZEN
STOPPED
$
$ sudo strace -ff -p 1 2>&1 | grep execve | grep if
[pid 7511] execve("/bin/sh", ["/bin/sh", "-e", "-c", "exec ifdown --allow auto
$INTERF"..., "/bin/sh"], [/* 16 vars */]
[pid 7511] execve("/sbin/ifdown", ["ifdown", "--allow", "auto", "vetha9Ks2v"],
[/* 18 vars */]) = 0
[pid 7513] execve("/bin/sh", ["/bin/sh", "-e", "-c", "exec ifdown --allow auto
$INTERF"..., "/bin/sh"], [/* 16 vars */]
[pid 7513] execve("/sbin/ifdown", ["ifdown", "--allow", "auto", "vethDDYJtI"],
[/* 18 vars */]) = 0
[pid 7514] execve("/bin/sh", ["/bin/sh", "-e", "-c", "exec ifdown --allow auto
$INTERF"..., "/bin/sh"], [/* 16 vars */]
[pid 7514] execve("/sbin/ifdown", ["ifdown", "--allow", "auto", "vetheaOt3H"],
[/* 18 vars */]) = 0
[pid 7523] execve("/sbin/ifup", ["ifup", "--allow", "auto", "vethcqVeRj"], [/*
17 vars */]
[pid 7522] execve("/sbin/ifup", ["ifup", "--allow", "auto", "veth0m5onm"], [/*
17 vars */]) = 0
[pid 7530] execve("/sbin/ifup", ["ifup", "--allow", "auto", "vethh6VSTB"], [/*
17 vars */]
[pid 7529] execve("/sbin/ifup", ["ifup", "--allow", "auto", "vethfgF5ty"], [/*
17 vars */]
[pid 7538] execve("/bin/sh", ["/bin/sh", "-e", "-c", "exec ifdown --allow auto
$INTERF"..., "/bin/sh"], [/* 16 vars */]
[pid 7538] execve("/sbin/ifdown", ["ifdown", "--allow", "auto", "vethcqVeRj"],
[/* 18 vars */]) = 0
[pid 7539] execve("/bin/sh", ["/bin/sh", "-e", "-c", "exec ifdown --allow auto
$INTERF"..., "/bin/sh"], [/* 16 vars */]
[pid 7539] execve("/sbin/ifdown", ["ifdown", "--allow", "auto", "vethfgF5ty"],
[/* 18 vars */]
[pid 7537] execve("/sbin/ifup", ["ifup", "--allow", "auto", "vethkx0wFy"], [/*
17 vars */]
[pid 7536] execve("/sbin/ifup", ["ifup", "--allow", "auto", "veth9z1M5B"], [/*
17 vars */]) = 0
[pid 7542] execve("/bin/sh", ["/bin/sh", "-e", "-c", "exec ifdown --allow auto
$INTERF"..., "/bin/sh"], [/* 16 vars */]
[pid 7542] execve("/sbin/ifdown", ["ifdown", "--allow", "auto", "vethkx0wFy"],
[/* 18 vars */]) = 0
[pid 7548] execve("/sbin/ifup", ["ifup", "--allow", "auto", "vethgClCAf"], [/*
17 vars */]
[pid 7547] execve("/sbin/ifup", ["ifup", "--allow", "auto", "veth8baiZ7"], [/*
17 vars */]) = 0
[pid 7560] execve("/bin/sh", ["/bin/sh", "-e", "-c", "exec ifdown --allow auto
$INTERF"..., "/bin/sh"], [/* 16 vars */]
[pid 7560] execve("/sbin/ifdown", ["ifdown", "--allow", "auto", "veth8baiZ7"],
[/* 18 vars */]) = 0
[pid 7558] execve("/sbin/ifup", ["ifup", "--allow", "auto", "vethTcUttE"], [/*
17 vars */]
$ sudo pmap -x 1
1: /sbin/init
Address Kbytes RSS Dirty Mode Mapping
7fde5cf0c000 025082508 rw---[ anon ]
7fde5d30d000 012561256 rw---[ anon ]
7fde5d50e000 025082508 rw---[ anon ]
7fde5da93000 012561256 rw---[ anon ]
7fde5dd96000 0 0 0 r-x-- libnss_files-2.15.so
7fde5dda2000 0 0 0 - libnss_files-2.15.so
7fde5dfa1000 0 0 0 r libnss_files-2.15.so
7fde5dfa2000 0 0 0 rw--- libnss_files-2.15.so
7fde5dfa3000 0 0 0 r-x-- libnss_nis-2.15.so
7fde5dfad000 0 0 0 - libnss_nis-2.15.so
7fde5e1ad000 0 0 0 r libnss_nis-2.15.so
7fde5e1ae000 0 0 0 rw--- libnss_nis-2.15.so
7fde5e1af000 0 0 0 r-x-- libnsl-2.15.so
7fde5e1c6000 0 0 0 - libnsl-2.15.so
7fde5e3c5000 0 0 0 r libnsl-2.15.so
7fde5e3c6000 0 0 0 rw--- libnsl-2.15.so
7fde5e3c7000 0 0 0 rw---[ anon ]
7fde5e3c9000 0 0 0 r-x-- libnss_compat-2.15.so
7fde5e3d1000 0 0 0 - libnss_compat-2.15.so
7fde5e5d 0 0 0 r libnss_compat-2.15.so
7fde5e5d1000 0 0 0 rw--- libnss_compat-2.15.so
7fde5e5d2000 0 404 0 r-x-- libc-2.15.so
7fde5e787000 0 0 0 - libc-2.15.so
7fde5e986000 0 16 16 r libc-2.15.so
7fde5e98a000 0 8 8 rw--- libc-2.15.so
7fde5e98c000 0 16 16 rw---[ anon ]
7fde5e991000 0 4 0 r-x-- librt-2.15.so
7fde5e998000 0 0 0 - librt-2.15.so
7fde5eb97000 0 4 4 r librt-2.15.so
7fde5eb98000 0 0 0 rw--- librt-2.15.so
7fde5eb99000 0 24 0 r-x--