Package: krb5-kdc
Version: 1.14.3+dfsg-1
Severity: critical

Hello,

I try create a database with the command

kdb5_util create -s -P foo

That seems to hang forever. Relevant part of a trace:


open("/var/lib/krb5kdc/principal.ok", O_RDWR|O_CREAT|O_TRUNC, 0600) = 3
fcntl64(3, F_OFD_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, 
l_len=6950411022381350912}) = -1 EINVAL (Invalid argument)
fcntl64(3, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
open("/var/lib/krb5kdc/principal", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fstat64(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
lseek(4, 4096, SEEK_SET)                = 4096
read(4, "", 4096)                       = 0
open("/var/lib/krb5kdc/principal.kadm5", O_RDWR|O_CREAT|O_EXCL, 0600) = 5
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
fstat64(5, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fstat64(5, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
lseek(5, 4096, SEEK_SET)                = 4096
read(5, "", 4096)                       = 0
lseek(5, 4096, SEEK_SET)                = 4096
write(5, 
"\1\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\24\0\0\20\377\377\377\377\377\377\377\377\377\377\377\377"...,
 4096) = 4096
lseek(5, 0, SEEK_SET)                   = 0
write(5, "b1\5\0\3\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0"..., 
4096) = 4096
fsync(5)                                = 0
close(5)                                = 0
open("/var/lib/krb5kdc/principal.kadm5.lock", O_RDWR|O_CREAT|O_EXCL, 0600) = 5
close(5)                                = 0
access("/etc/krb5kdc/kdc.conf", R_OK)   = 0
stat64("/etc/krb5kdc/kdc.conf", {st_mode=S_IFREG|0644, st_size=738, ...}) = 0
access("/etc/krb5.conf", R_OK)          = 0
stat64("/etc/krb5.conf", {st_mode=S_IFREG|0644, st_size=729, ...}) = 0
open("/dev/urandom", O_RDONLY)          = 5
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
fstat64(5, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
read(5, 
"\344\nx\207\216\231\370u\16cRW\251c*\240\37\20\310\236\304\211\322\242\275\26\271#\351I\26\321"...,
 64) = 64
close(5)                                = 0
gettimeofday({1470921186, 154266}, NULL) = 0
open("/var/lib/krb5kdc/principal.kadm5.lock", O_RDWR) = 5
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
fcntl64(5, F_OFD_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, 
l_len=6950411022381350912}) = -1 EINVAL (Invalid argument)
fcntl64(5, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
access("/var/lib/krb5kdc/principal.kadm5.lock", F_OK) = 0
fcntl64(5, F_OFD_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, 
l_len=6950411022381350912}) = -1 EINVAL (Invalid argument)
fcntl64(5, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
lseek(4, 4096, SEEK_SET)                = 4096
write(4, 
"\1\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\24\0\0\20\377\377\377\377\377\377\377\377\377\377\377\377"...,
 4096) = 4096
lseek(4, 0, SEEK_SET)                   = 0
write(4, "b1\5\0\3\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0"..., 
4096) = 4096
fsync(4)                                = 0
close(4)                                = 0
fcntl64(3, F_OFD_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, 
l_len=6950411022381350912}) = 0
fcntl64(3, F_OFD_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, 
l_len=6950411022381350912}


In the first few lines kdb5_util opens a file and acquires a lock.
Fast forward to the end of the trace, there the lock is released. Next
the process tries to re-acquire the lock and blocks. Sometimes, very
rarely, the process comes to a successful end without blocking.

Regards
hmw

Reply via email to