[Date Prev][Date Next]
Re: Bind failure on OSF4.0 alpha
> Randy Kunkee wrote:
> > > At 02:25 PM 11/24/99 -0600, Randy Kunkee wrote:
> > > >Perhaps somebody can give a quick insight into why the initial bind
> > > >fails?
> > >
> > > Appears that the client sent version=0. Which client were
> > > you using?
> > >
> > > >ber_dump: buf 0x14007e300, ptr 0x14007e300, end 0x14007e30c
> > > > 02 01 00 ` 07 02 01 00 04 00 80 00
> > >
> > >
> > > ----
> > > Kurt D. Zeilenga <email@example.com>
> > > Net Boolean Incorporated <http://www.boolean.net/>
> > >
> > Interesting as well is that on the client side, it's waiting for a response
> > to msgid 1, and receives a response for msgid 0, tosses it because it is not
> > waiting for a msgid 0, and so it just hangs, waiting for a message. It never
> > gets the "version not supported" message. Something must be messed in in the
> > BER encoding/decoding, and I'd guess it has to do with a machine-dependent
> > thing.
> > Is there a way to test just the BER-encoding/decoding to make sure that it
> > works correctly?
> You can toy with etest and dtest in libraries/liblber.
Okay, I found the problem, though I'm pretty sure this is not the right
way to patch it (see below). The problem stems from the alpha being
a 64-bit machine. Lber-int.h assumes AC_HTONL/AC_NTOHL will work for
LBER_INT_T, LBER_LEN_T, and LBER_TAG_T. But, ../../include/ac/socket.h
actually defines the AC_* macros to operate on longs, and LBER_INT_T
is actually an int (32 bits). This should be a problem on any machine
where sizeof(LBER_INT_T) != sizeof(LBER_TAG_T).
(There is another problem with the autoconf on OSF 4.0e which I'll
mention for completeness regarding this platform: GETHOSTBYNAME_R
and GETHOSTBYADDR_R are detected, but must be disabled, as the
arguments supported by OSF are the same as they are with the "non re-entrant"
routines (which are in fact re-entrant)).
With this patch in place, all tests succeed, using the current development
branch, on OSF 4.0e, for ldbm (using Berkeley DB 2.7.7).
"make bdb2" tests fail, unfortunately, during test002-populate. Slapd
core-dumps. Will build --without-threads and see what happens. Thats
all for now.
cvs diff -c lber-int.h
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/liblber/lber-int.h,v
retrieving revision 1.29
diff -c -r1.29 lber-int.h
*** lber-int.h 1999/11/08 14:39:01 1.29
--- lber-int.h 1999/11/25 09:00:15
*** 28,35 ****
--- 28,40 ----
/* these have to match lber types settings */
+ #if defined(__alpha)
+ #define LBER_INT_HTON(i) htonl(i)
+ #define LBER_INT_NTOH(i) ntohl(i)
#define LBER_INT_HTON(i) AC_HTONL(i)
#define LBER_INT_NTOH(i) AC_NTOHL(i)
#define LBER_LEN_HTON(l) AC_HTONL(l)
#define LBER_LEN_NTOH(l) AC_NTOHL(l)
#define LBER_TAG_HTON(t) AC_HTONL(t)