Date: | Fri, 07 Feb 2014 14:10:49 +0100 |
From: | Pierre Labastie <pierre.labastie@neuf.fr> |
To: | krb5-bugs@mit.edu |
Subject: | libdb2 tests hang |
Hi,
While updating the MIT Kerberos page for BLFS (www.linuxfromscratch.org/blfs), I found that "make check" generated a
few errors.
The first (and most important) one is:
----------
make: Entering directory
`/sources/mitkrb/krb5-1.11.4/src/plugins/kdb/db2/libdb2/test'
gcc -L.. -L../../../../../lib -Wl,--enable-new-dtags -Wl,-rpath
-Wl,/usr/lib -g -O2 -o dbtest dbtest.o -ldb
LD_LIBRARY_PATH=`echo -L.. -L../../../../../lib | sed -e "s/-L//g" -e
"s/ /:/g"`; export LD_LIBRARY_PATH; srcdir=. TMPDIR=. /bin/sh ./run.test
Test 1: btree, hash: small key, small data pairs
test1: type btree: failed
make: Leaving directory
`/sources/mitkrb/krb5-1.11.4/src/plugins/kdb/db2/libdb2/test'
----------
I found the reason for that: the dictionary used is the one installed
for cracklib, which contains shell meta character and spaces. Those are
interpreted by the "for i in `cat $TMP1`" in run.test, so that what is
sent to the database is not what was originally in the file. Changing
the line:
"sed -e '/^$/d' < $DICT | cat -v | sed -e ${1}q"
to:
"sed -e '/[[:space:]*?/d' -e '/^$/d' < $DICT | cat -v | sed -e ${1}q"
allows the first test to pass.
But then, the second test hangs and has to be interrupted:
-------------
make: Entering directory
`/sources/mitkrb/krb5-1.11.4/src/plugins/kdb/db2/libdb2/test'
LD_LIBRARY_PATH=`echo -L.. -L../../../../../lib | sed -e "s/-L//g" -e
"s/ /:/g"`; export LD_LIBRARY_PATH; srcdir=. TMPDIR=. /bin/sh ./run.test
Test 1: btree, hash: small key, small data pairs
Test 1: recno: small key, small data pairs
Test 2: btree, hash: small key, medium data pairs
Test 2: recno: small key, medium data pairs^C
------------
I tried to debug this by putting some printf at various places in the
code, I found that:
- the call to dbp->close(dbp) does not return (in dbtest)
- in rec_close.c, the instructions:
while (status == RET_SUCCESS) {
iov[0].iov_base = data.data;
iov[0].iov_len = data.size;
if (writev(t->bt_rfd, iov, 2) != data.size + 1)
return (RET_ERROR);
status = (dbp->seq)(dbp, &key, &data, R_NEXT);
}
enter an infinite loop, but the file __dbtest keeps the same size.
Going farther without assistance is too hard... I would need at least some pointers to docs about the structure of the database.
System information. The box is a virtual machine under qemu:
Linux virtuallfs 3.10.10-lfs-1 #1 SMP Tue Feb 4 17:16:25 CET 2014
x86_64
GNU/Linux
gcc (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The build is as follows:
cd src &&
sed -e "s@python2.5/Python.h@& python2.7/Python.h@g" \
-e "s@-lpython2.5]@&,\n
AC_CHECK_LIB(python2.7,main,[PYTHON_LIB=-lpython2.7])@g" \
-i configure.in &&
sed -e "s@interp->result@Tcl_GetStringResult(interp)@g" \
-i kadmin/testing/util/tcl_kadm5.c &&
autoconf &&
./configure CPPFLAGS="-I/usr/include/et -I/usr/include/ss" \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var/lib \
--with-system-et \
--with-system-ss \
--enable-dns-for-realm &&
make
There are no krb5 libraries on the system (first install). The same
behavior is observed for both versions 1.11.4 et 1.12.1 (1.12.1 is built
without the CPPFLAGS).
Regards
Pierre
NB : the other error is a minor defect in the krb testsuite of
"tests/dejagnu". I can send another report on request.
While updating the MIT Kerberos page for BLFS (www.linuxfromscratch.org/blfs), I found that "make check" generated a
few errors.
The first (and most important) one is:
----------
make: Entering directory
`/sources/mitkrb/krb5-1.11.4/src/plugins/kdb/db2/libdb2/test'
gcc -L.. -L../../../../../lib -Wl,--enable-new-dtags -Wl,-rpath
-Wl,/usr/lib -g -O2 -o dbtest dbtest.o -ldb
LD_LIBRARY_PATH=`echo -L.. -L../../../../../lib | sed -e "s/-L//g" -e
"s/ /:/g"`; export LD_LIBRARY_PATH; srcdir=. TMPDIR=. /bin/sh ./run.test
Test 1: btree, hash: small key, small data pairs
test1: type btree: failed
make: Leaving directory
`/sources/mitkrb/krb5-1.11.4/src/plugins/kdb/db2/libdb2/test'
----------
I found the reason for that: the dictionary used is the one installed
for cracklib, which contains shell meta character and spaces. Those are
interpreted by the "for i in `cat $TMP1`" in run.test, so that what is
sent to the database is not what was originally in the file. Changing
the line:
"sed -e '/^$/d' < $DICT | cat -v | sed -e ${1}q"
to:
"sed -e '/[[:space:]*?/d' -e '/^$/d' < $DICT | cat -v | sed -e ${1}q"
allows the first test to pass.
But then, the second test hangs and has to be interrupted:
-------------
make: Entering directory
`/sources/mitkrb/krb5-1.11.4/src/plugins/kdb/db2/libdb2/test'
LD_LIBRARY_PATH=`echo -L.. -L../../../../../lib | sed -e "s/-L//g" -e
"s/ /:/g"`; export LD_LIBRARY_PATH; srcdir=. TMPDIR=. /bin/sh ./run.test
Test 1: btree, hash: small key, small data pairs
Test 1: recno: small key, small data pairs
Test 2: btree, hash: small key, medium data pairs
Test 2: recno: small key, medium data pairs^C
------------
I tried to debug this by putting some printf at various places in the
code, I found that:
- the call to dbp->close(dbp) does not return (in dbtest)
- in rec_close.c, the instructions:
while (status == RET_SUCCESS) {
iov[0].iov_base = data.data;
iov[0].iov_len = data.size;
if (writev(t->bt_rfd, iov, 2) != data.size + 1)
return (RET_ERROR);
status = (dbp->seq)(dbp, &key, &data, R_NEXT);
}
enter an infinite loop, but the file __dbtest keeps the same size.
Going farther without assistance is too hard... I would need at least some pointers to docs about the structure of the database.
System information. The box is a virtual machine under qemu:
Show quoted text
uname -a
GNU/Linux
Show quoted text
gcc --version
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The build is as follows:
cd src &&
sed -e "s@python2.5/Python.h@& python2.7/Python.h@g" \
-e "s@-lpython2.5]@&,\n
AC_CHECK_LIB(python2.7,main,[PYTHON_LIB=-lpython2.7])@g" \
-i configure.in &&
sed -e "s@interp->result@Tcl_GetStringResult(interp)@g" \
-i kadmin/testing/util/tcl_kadm5.c &&
autoconf &&
./configure CPPFLAGS="-I/usr/include/et -I/usr/include/ss" \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var/lib \
--with-system-et \
--with-system-ss \
--enable-dns-for-realm &&
make
There are no krb5 libraries on the system (first install). The same
behavior is observed for both versions 1.11.4 et 1.12.1 (1.12.1 is built
without the CPPFLAGS).
Regards
Pierre
NB : the other error is a minor defect in the krb testsuite of
"tests/dejagnu". I can send another report on request.