[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: openldap on alpha



dan@mid-hudson.com wrote:
> 
> I've installed openldap 1.2.10 on my alpha ds-10s and it
> seems to run, but every time I query it, it logs a few messages:
> 
> slapd(5341): unaligned trap at 0000000120038d6c: 000003ffffbffc04 2d 2
> slapd(5341): unaligned trap at 0000000120038d6c: 000003ffffbffc0c 2d 2

The Compaq (DEC) Alpha processor is a 64 bit processor.

It accesses data only on word boundaries.

You are accessing data on an unaligned boundary.

This can mean one of several things:

1)	You have specified "#pragma pack(x)" with x < 8 in
	one of your hearder files.  This may be because you
	are reading wire data directly into a structure.

2)	You have cast a character or other buffer into a
	structure pointer, and then dereferenced one of
	the structure elements, and the original buffer
	was not aligned on an 8 byte boundary.  This can
	happen with auto (stack) buffer declarations that
	are used instead of allocated buffers (malloc will
	guarantee to return a correctly aligned buffer,
	unless you are running on Linux, in which case it
	depends on your C library and the phase of the
	moon).

3)	A pointer to an object of type X is being cast to
	a pointer of type Y, and dereferenced, for sizeof(Y)
	larger than sizeof(X).

The warnings you are getting are your kernel telling you that
it caught the trap and fixed it up, at terrible expense, and
turned the access into one or more EMB (Extract Memeory Byte)
or similar instructions, combined with a copyout() operation.

What it's basically saying then is "hey, your code makes some
invalid assumptions about my architecture, so I will whine at
you, but I'll do what you probably meant to ask me to do".

The alternative (which is probably a kernel tunable) is to
core dump the program making the unaligned accesses.  If you
enable this option, then you will be able to do a backtrace
of the stack on the core dump using your debugger.  This will
tell you the exact line of the program where it's doing the
bogus access.


-- Terry Lambert
-- Whistle Communications, Inc., an I.B.M. Company
-- terry@whistle.com
-------------------------------------------------------------------
This is formal notice under California Assembly Bill 1629, enacted
9/26/98 that any UCE sent to my email address will be billed $50
per incident to the legally allowed maximum of $25,000.