LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: Problem starting keepalived 1.1.7

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Problem starting keepalived 1.1.7
From: Samuel Tran <stran@xxxxxxxx>
Date: Tue, 07 Dec 2004 12:12:51 -0500
Hi Kees,

Thanks for your reply.

Here is the output of:
strace -f -o strace.out /usr/local/sbin/keepalived -D
-f/etc/keepalived/keepalived.conf


3186  execve("/usr/local/sbin/keepalived",
["/usr/local/sbin/keepalived", "-D",
"-f/etc/keepalived/keepalived.conf"], [/* 12 vars */]) = 0
3186  uname({sys="Linux", node="idun", ...}) = 0
3186  brk(0)                            = 0x806c23c
3186  open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
3186  open("/etc/ld.so.cache", O_RDONLY) = 3
3186  fstat64(3, {st_mode=S_IFREG|0644, st_size=9603, ...}) = 0
3186  old_mmap(NULL, 9603, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
3186  close(3)                          = 0
3186  open("/lib/libpopt.so.0", O_RDONLY) = 3
3186  read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\21\0\000"..., 1024) =
1024
3186  fstat64(3, {st_mode=S_IFREG|0644, st_size=20704, ...}) = 0
3186  old_mmap(NULL, 23828, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x40017000
3186  mprotect(0x4001c000, 3348, PROT_NONE) = 0
3186  old_mmap(0x4001c000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x4001c000
3186  close(3)                          = 0
3186  open("/usr/lib/libssl.so.0.9.6", O_RDONLY) = 3
3186  read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\215"..., 1024) =
1024
3186  fstat64(3, {st_mode=S_IFREG|0644, st_size=182084, ...}) = 0
3186  old_mmap(NULL, 182848, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4001d000
3186  mprotect(0x40047000, 10816, PROT_NONE) = 0
3186  old_mmap(0x40047000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x2a000) = 0x40047000
3186  close(3)                          = 0
3186  open("/usr/lib/libcrypto.so.0.9.6", O_RDONLY) = 3
3186  read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\36"..., 1024) =
1024
3186  fstat64(3, {st_mode=S_IFREG|0644, st_size=771908, ...}) = 0
3186  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4004a000
3186  old_mmap(NULL, 783840, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4004b000
3186  mprotect(0x400fd000, 54752, PROT_NONE) = 0
3186  old_mmap(0x400fd000, 45056, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0xb2000) = 0x400fd000
3186  old_mmap(0x40108000, 9696, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40108000
3186  close(3)                          = 0
3186  open("/lib/libc.so.6", O_RDONLY)  = 3
3186  read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"..., 1024) =
1024
3186  fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0
3186  old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4010b000
3186  mprotect(0x4021e000, 40160, PROT_NONE) = 0
3186  old_mmap(0x4021e000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x113000) = 0x4021e000
3186  old_mmap(0x40224000, 15584, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40224000
3186  close(3)                          = 0
3186  open("/lib/libdl.so.2", O_RDONLY) = 3
3186  read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0T\27\0\000"..., 1024) =
1024
3186  fstat64(3, {st_mode=S_IFREG|0644, st_size=8008, ...}) = 0
3186  old_mmap(NULL, 11004, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x40228000
3186  mprotect(0x4022a000, 2812, PROT_NONE) = 0
3186  old_mmap(0x4022a000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x4022a000
3186  close(3)                          = 0
3186  munmap(0x40014000, 9603)          = 0
3186  brk(0)                            = 0x806c23c
3186  brk(0x806c3e4)                    = 0x806c3e4
3186  brk(0x806d000)                    = 0x806d000
3186  brk(0x8070000)                    = 0x8070000
3186  time([1102438446])                = 1102438446
3186  open("/etc/localtime", O_RDONLY)  = 3
3186  fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0
3186  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
3186  read(3,
"TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) =
1267
3186  close(3)                          = 0
3186  munmap(0x40014000, 4096)          = 0
3186  rt_sigaction(SIGPIPE, {0x401d7f48, [], 0x4000000}, {SIG_DFL}, 8) =
0
3186  socket(PF_UNIX, SOCK_DGRAM, 0)    = 3
3186  fcntl64(3, F_SETFD, FD_CLOEXEC)   = 0
3186  connect(3, {sin_family=AF_UNIX, path="/dev/log"}, 16) = 0
3186  send(3, "<30>Dec  7 11:54:06 Keepalived: "..., 72, 0) = 72
3186  rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
3186  open("/var/run/keepalived.pid", O_RDONLY) = 4
3186  fstat64(4, {st_mode=S_IFREG|0666, st_size=5, ...}) = 0
3186  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
3186  read(4, "3151\n", 4096)           = 5
3186  close(4)                          = 0
3186  munmap(0x40014000, 4096)          = 0
3186  kill(3151, SIG_0)                 = -1 ESRCH (No such process)
3186  time([1102438446])                = 1102438446
3186  rt_sigaction(SIGPIPE, {0x401d7f48, [], 0x4000000}, {SIG_DFL}, 8) =
0
3186  send(3, "<30>Dec  7 11:54:06 Keepalived: "..., 80, 0) = 80
3186  rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
3186  unlink("/var/run/keepalived.pid") = 0
3186  open("/var/run/keepalived_vrrp.pid", O_RDONLY) = -1 ENOENT (No
such file or directory)
3186  open("/var/run/keepalived_checkers.pid", O_RDONLY) = -1 ENOENT (No
such file or directory)
3186  fork()                            = 3187
3187  setsid()                          = 3187
3187  chdir("/" <unfinished ...>
3186  _exit(0)                          = ?
3187  <... chdir resumed> )             = 0
3187  open("/dev/null", O_RDWR)         = 4
3187  dup2(4, 0)                        = 0
3187  dup2(4, 1)                        = 1
3187  dup2(4, 2)                        = 2
3187  close(4)                          = 0
3187  umask(0)                          = 022
3187  getpid()                          = 3187
3187  open("/var/run/keepalived.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666) =
4
3187  fstat64(4, {st_mode=S_IFREG|0666, st_size=0, ...}) = 0
3187  old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
3187  write(4, "3187\n", 5)             = 5
3187  close(4)                          = 0
3187  munmap(0x40014000, 4096)          = 0
3187  rt_sigaction(SIGHUP, {0x8049e28, [], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
3187  rt_sigaction(SIGINT, {0x8049e68, [], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
3187  rt_sigaction(SIGTERM, {0x8049e68, [], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
3187  rt_sigaction(SIGKILL, {0x8049e68, [], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = -1 EINVAL (Invalid argument)
3187  rt_sigaction(SIGCHLD, {0x804a678, [], 0x4000000}, NULL, 8) = 0
3187  rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
3187  write(2, "keepalived: memory.c:141: keepal"..., 90) = 90
3187  rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
3187  getpid()                          = 3187
3187  kill(3187, SIGABRT)               = 0
3187  --- SIGABRT (Aborted) ---

When I try to run keepalived with the -n option:

idun:~# /usr/local/sbin/keepalived -D -f/etc/keepalived/keepalived.conf
-n
keepalived: memory.c:141: keepalived_malloc: Assertion
`number_alloc_list > 1024' failed.
Aborted

It looks like it is a memory allocation problem?

Thanks again for your help.


On Tue, 2004-12-07 at 11:50, Kees Bos wrote:
> What are the options to strace? It looks like the strace didn't follow
> the forks.
> 
> Should probably be something like:
> strace -f -o strace.out /usr/local/sbin/keepalived -D -f
> /etc/keepalived/keepalived.conf
> 
> you might also try:
> # No forking
> strace -f -o strace.out /usr/local/sbin/keepalived -n -D -f
> /etc/keepalived/keepalived.conf
> # No forking and only vrrp
> strace -f -o strace.out /usr/local/sbin/keepalived -n -P -D -f
> /etc/keepalived/keepalived.conf
> # No forking and only checker
> strace -f -o strace.out /usr/local/sbin/keepalived -n -C -D -f
> /etc/keepalived/keepalived.conf
> 



<Prev in Thread] Current Thread [Next in Thread>