[systemd-devel] Memory leak in systemd on i686

Michael Tremer michael.tremer at ipfire.org
Mon Jan 28 10:21:49 PST 2013


Hello guys,

I have got a very weird problem and I would appreciate your help.

Here at IPFire, we are running systemd and compiling it for four
different architectures: x86_64, i686, armv7hl and armv5tel. It runs
perfectly on x86_64 and the ARM architectures, but we are experiencing a
very weird crash on i686:

Right when the system boots up, the PaX-enabled kernel panics because it
apparently has found a memory leak in systemd. You can see the message
that the kernel dumps in the attached screenshot and Stefan also got me
an strace dump. In order to make that dump, he had to manually start
systemd on the console.

The last version of systemd that we know of that starts properly up is
systemd 188. All versions including 197 crash like this.

As I don't have any idea where to start to search for this bug and
searching through the (massive amount of) commits did not bring me any
further, I hope you can help me.

Best,
-Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto vom 2013-01-27 12:22:00.png
Type: image/png
Size: 103681 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130128/153c577c/attachment-0001.png>
-------------- next part --------------
[root at ipfire systemd]# strace ./systemd
execve("./systemd", ["./systemd"], [/* 25 vars */]) = 0
brk(0)                                  = 0x16d54940
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xaa5ea000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17862, ...}) = 0
mmap2(NULL, 17862, PROT_READ, MAP_PRIVATE, 3, 0) = 0xaa5e5000
close(3)                                = 0
open("/lib/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 at I\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=136668, ...}) = 0
mmap2(NULL, 145940, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa5c1000
mmap2(0xaa5e2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20) = 0xaa5e2000
mmap2(0xaa5e4000, 2580, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xaa5e4000
close(3)                                = 0
open("/lib/libudev.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000%\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=71020, ...}) = 0
mmap2(NULL, 75844, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa5ae000
mmap2(0xaa5bf000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10) = 0xaa5bf000
close(3)                                = 0
open("/lib/libsystemd-daemon.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=13608, ...}) = 0
mmap2(NULL, 12296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa5aa000
mmap2(0xaa5ac000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xaa5ac000
close(3)                                = 0
open("/lib/libpam.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\35\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=58696, ...}) = 0
mmap2(NULL, 61456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa59a000
mprotect(0xaa5a7000, 4096, PROT_NONE)   = 0
mmap2(0xaa5a8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd) = 0xaa5a8000
close(3)                                = 0
open("/lib/libaudit.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \34\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=95504, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xaa599000
mmap2(NULL, 114784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa57c000
mmap2(0xaa593000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16) = 0xaa593000
mmap2(0xaa595000, 12384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xaa595000
close(3)                                = 0
open("/lib/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\17\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=17792, ...}) = 0
mmap2(NULL, 20660, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa576000
mmap2(0xaa57a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xaa57a000
close(3)                                = 0
open("/lib/libkmod.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0#\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=99684, ...}) = 0
mmap2(NULL, 102424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa55c000
mmap2(0xaa574000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17) = 0xaa574000
close(3)                                = 0
open("/lib/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000V\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=329004, ...}) = 0
mmap2(NULL, 332200, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa50a000
mmap2(0xaa55a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4f) = 0xaa55a000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220Y\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=87632, ...}) = 0
mmap2(NULL, 98524, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa4f1000
mmap2(0xaa506000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xaa506000
mmap2(0xaa508000, 4316, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xaa508000
close(3)                                = 0
open("/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\31\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=30352, ...}) = 0
mmap2(NULL, 33092, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa4e8000
mmap2(0xaa4ef000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xaa4ef000
close(3)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P \0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=116004, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xaa4e7000
mmap2(NULL, 119152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa4c9000
mmap2(0xaa4e5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b) = 0xaa4e5000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\235\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1799508, ...}) = 0
mmap2(NULL, 1810844, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa30e000
mmap2(0xaa4c2000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b4) = 0xaa4c2000
mmap2(0xaa4c5000, 12700, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xaa4c5000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=13696, ...}) = 0
mmap2(NULL, 16436, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa309000
mmap2(0xaa30c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xaa30c000
close(3)                                = 0
open("/lib/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\16\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=17692, ...}) = 0
mmap2(NULL, 20492, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa303000
mmap2(0xaa307000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xaa307000
close(3)                                = 0
open("/lib/liblzma.so.5", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\35\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=161052, ...}) = 0
mmap2(NULL, 163848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa2da000
mmap2(0xaa301000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26) = 0xaa301000
close(3)                                = 0
open("/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\30\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=91516, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xaa2d9000
mmap2(NULL, 94280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaa2c1000
mmap2(0xaa2d7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xaa2d7000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xaa2c0000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xaa2bf000
set_thread_area({entry_number:-1 -> 6, base_addr:0xaa2bf780, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xaa4c2000, 8192, PROT_READ)   = 0
mprotect(0xaa2d7000, 4096, PROT_READ)   = 0
mprotect(0xaa506000, 4096, PROT_READ)   = 0
mprotect(0xaa301000, 4096, PROT_READ)   = 0
mprotect(0xaa307000, 4096, PROT_READ)   = 0
mprotect(0xaa30c000, 4096, PROT_READ)   = 0
mprotect(0xaa4e5000, 4096, PROT_READ)   = 0
mprotect(0xaa4ef000, 4096, PROT_READ)   = 0
mprotect(0xaa55a000, 4096, PROT_READ)   = 0
mprotect(0xaa574000, 4096, PROT_READ)   = 0
mprotect(0xaa57a000, 4096, PROT_READ)   = 0
mprotect(0xaa593000, 4096, PROT_READ)   = 0
mprotect(0xaa5a8000, 4096, PROT_READ)   = 0
mprotect(0xaa5ac000, 4096, PROT_READ)   = 0
mprotect(0xaa5bf000, 4096, PROT_READ)   = 0
mprotect(0xaa5e2000, 4096, PROT_READ)   = 0
mprotect(0x12dae000, 57344, PROT_READ)  = 0
mprotect(0xaa60b000, 4096, PROT_READ)   = 0
munmap(0xaa5e5000, 17862)               = 0
set_tid_address(0xaa2bf7e8)             = 687
set_robust_list(0xaa2bf7f0, 12)         = 0
rt_sigaction(SIGRTMIN, {0xaa4f6430, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xaa4f64c0, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="ipfire.localdomain", ...}) = 0
statfs64("/sys/fs/selinux", 84, 0xb98cee78) = -1 ENOENT (No such file or directory)
statfs64("/selinux", 84, 0xb98cee78)    = -1 ENOENT (No such file or directory)
brk(0)                                  = 0x16d54940
brk(0x16d75940)                         = 0x16d75940
brk(0x16d76000)                         = 0x16d76000
open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xaa5e9000
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 301
read(3, "", 1024)                       = 0
brk(0x16d75000)                         = 0x16d75000
close(3)                                = 0
munmap(0xaa5e9000, 4096)                = 0
prctl(PR_SET_NAME, 0x12dbc2c8, 0, 0, 0) = 0
ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
geteuid32()                             = 0
name_to_handle_at(0xffffff9c, 0x12d83643, 0xb98ce8f0, 0xb98ce994, 0x400) = -1 EOPNOTSUPP (Operation not supported)
stat64("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
name_to_handle_at(0xffffff9c, 0x12d8364f, 0xb98ce8f0, 0xb98ce994, 0x400) = -1 EOPNOTSUPP (Operation not supported)
stat64("/sys", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0



More information about the systemd-devel mailing list