hunting "Unaligned Access" errors

Bjoern Jacke bjoern at
Tue May 15 15:50:38 GMT 2007

Hi all,

while I was cleaning up and bringing my Tru64 build machine in a proper
state I saw several warnings on the console about Unaligned memory accesses:

Unaligned access pid=260838 <smbd> va=0x141b04d6c pc=0x120264c7c
ra=0x120518f04 inst=0xa6940000

Unaligned access is something RISC machines' memory controllers usually
can't handle. CISC machines usually *can* handle it but it slows things
down. In the case of Tru64/AXP this is automatically fixed by the
operating system but the behaviour can be customized. I changed the
settings on that machine for the build user so that not just a warning
is printed on the console but that also a SIGBUS is produced (by putting
the "uac p sigbus" command into build_test.settings.local). In the
buildfarm you then see a PANIC for the SerNet-Tru64 machine:;host=SerNet-Tru64;tree=samba4;compiler=cc

As metze wrote a customized error handling script using the ladebug
debugger on Tru64 there is also a nice traceback which points to the
place where is Unaligned Access is being done:

#5  0x120264e80 in pvfs_wait_dispatch() "ntvfs/posix/pvfs_wait.c":69

Here are a few links to documents describing how to prevent Unaligned
Accesses and how to debug this:

I hope you find this usefull. Any feedback about this welcome.


More information about the samba-technical mailing list