This happened on my Centos 5 KVM host on Intel and my VM machines are
Centos 5 x64/Ubuntu 9.10 i386.
On Centos 5 vm, I installed from source openldap 2.4.21 and on Ubuntu
I installed openldap from Ubuntu software repository.
I first tried my installation on Ubuntu and got stucked, then I tried
the one on Centos 5 and got stucked with exactly same strace outputs.
I experienced similar hangs on both and found data in /var/lib/ldap
but nothing else in my slapd.d directory on both vm instances.
slapadd -v -q -f slapd.conf -F slapd.d
.....
gettimeofday({1265234787, 777676}, NULL) = 0
open("/dev/urandom", O_RDONLY) = 6
fcntl(6, F_GETFD) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
getuid() = 0
getppid() = 26516
gettimeofday({1265234787, 781981}, NULL) = 0
gettimeofday({1265234787, 782533}, NULL) = 0
read(6, "g#\3\232\366\1I\255\17\202\270\274\367\230n\221", 16) = 16
gettid() = 26517
write(2, "hdb_monitor_db_open: monitoring "..., 79hdb_monitor_db_open:
monitoring disabled; configure monitor database to enable
) = 79
mmap(NULL, 8392704, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0) = 0x407c1000
mprotect(0x407c1000, 4096, PROT_NONE) = 0
clone(Process 26518 attached
child_stack=0x40fc11d0,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,
parent_tidptr=0x40fc19d0, tls=0x40fc1940, child_tidptr=0x40fc19d0) =
26518
[pid 26517] fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
[pid 26517] fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
[pid 26517] mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaaab000
[pid 26517] read(0,<unfinished ...>
[pid 26518] set_robust_list(0x40fc19e0, 0x18) = 0
[pid 26518] futex(0x2acb21450744, FUTEX_WAIT_PRIVATE, 1, NULL
I ran the same command on Ubuntu this time I got the following but in
other runs I got the same strace output with the Centos's strace
output.
gettimeofday({1265234943, 880676}, NULL) = 0
open("/etc/localtime", O_RDONLY) = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
fstat64(7, {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xa2e7e000
read(7, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"...,
4096) = 2819
_llseek(7, -24, [2795], SEEK_CUR) = 0
read(7, "\nPST8PDT,M3.2.0,M11.1.0\n", 4096) = 24
close(7) = 0
munmap(0xa2e7e000, 4096) = 0
open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 7
read(7, "\2\343", 2) = 2
close(7) = 0
gettimeofday({1265234943, 883682}, NULL) = 0
open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 7
read(7, "\235i\375\366\377~", 6) = 6
close(7) = 0
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xa2e7e000
read(0,
I am wondering if there are some problems with KVM that prevent this
operation to carry out successfully.