I set my ARM box to fix and warn on unaligned memory access, and found this
in my dmesg:
[1032087.934414] Alignment trap: update-apt-xapi (16364) PC=0x4000b1c0
Instr=0xe59a3000 Address=0x4099c336 FSR 0x001
[1032087.947502] Alignment trap: update-apt-xapi (16364) PC=0x4000b1cc
Instr=0xe58a3000 Address=0x4099c336 FSR 0x801
[1032087.959623] Alignment trap: update-apt-xapi (16364) PC=0x4000b1c0
Instr=0xe59a3000 Address=0x4099c8d3 FSR 0x001
[1032087.970278] Alignment trap: update-apt-xapi (16364) PC=0x4000b1cc
Instr=0xe58a3000 Address=0x4099c8d3 FSR 0x801
I got this backtrace with gdb python -
run /usr/sbin/update-apt-xapian-index
after setting the kernel to send a SIGBUS on unaligned access.
#0 elf_machine_rel (scope=<value optimized out>, reloc_mode=<value
optimized out>, consider_profiling=<value optimized out>)
at ../ports/sysdeps/arm/dl-machine.h:429
#1 elf_dynamic_do_rel (scope=<value optimized out>, reloc_mode=<value
optimized out>, consider_profiling=<value optimized out>)
at do-rel.h:120
#2 _dl_relocate_object (scope=<value optimized out>, reloc_mode=<value
optimized out>, consider_profiling=<value optimized out>)
at dl-reloc.c:268
#3 0x400125dc in dl_open_worker (a=<value optimized out>) at dl-open.c:402
#4 0x4000de2c in _dl_catch_error (objname=<value optimized out>,
errstring=<value optimized out>, mallocedp=<value optimized out>,
operate=<value optimized out>, args=0xbe924b68) at dl-error.c:178
#5 0x40011ddc in _dl_open (file=0xbe9250bc
"/usr/lib/python2.5/site-packages/_xapian.so", mode=-2147483646,
caller_dlopen=0xb763c, nsid=-2,
argc=2, argv=0xbe92a854, env=0xbe92a860) at dl-open.c:615
#6 0x4004dae0 in dlopen_doit (a=<value optimized out>) at dlopen.c:67
#7 0x4000de2c in _dl_catch_error (objname=<value optimized out>,
errstring=<value optimized out>, mallocedp=<value optimized out>,
operate=<value optimized out>, args=0xbe924dc8) at dl-error.c:178
#8 0x4004dfa8 in _dlerror_run (operate=0x4004da68 <dlopen_doit>,
args=0xbe924dc8) at dlerror.c:164
#9 0x4004da30 in __dlopen (file=0x40024000 "H?\002", mode=1) at dlopen.c:88
#10 0x000b763c in _PyImport_GetDynLoadFunc (fqname=<value optimized out>,
shortname=<value optimized out>,
pathname=0xbe9250bc "/usr/lib/python2.5/site-packages/_xapian.so",
fp=0x260238) at ../Python/dynload_shlib.c:134
#11 0x000a8bb4 in _PyImport_LoadDynamicModule (name=0xbe926130 "_xapian",
pathname=0xbe9250bc "/usr/lib/python2.5/site-packages/_xapian.so",
fp=0x260238) at ../Python/importdl.c:42
#12 0x000a6ae4 in load_module (name=0xbe926130 "_xapian", fp=0x260238,
buf=<value optimized out>, type=3, loader=0x0)
at ../Python/import.c:1758
#13 0x000a7350 in import_submodule (mod=0x111e10, subname=0xbe926130
"_xapian", fullname=0xbe926130 "_xapian") at ../Python/import.c:2400
#14 0x000a75f8 in load_next (mod=0x111e10, altmod=0x111e10, p_name=<value
optimized out>, buf=0xbe926130 "_xapian", p_buflen=0x111e10)
at ../Python/import.c:2220
#15 0x000a7c18 in import_module_level (name=0x34400000 <Address 0x34400000
out of bounds>, globals=<value optimized out>,
locals=<value optimized out>, fromlist=0x111e10, level=-1) at
.../Python/import.c:2001
#16 0x000a7fd8 in PyImport_ImportModuleLevel (name=0x2cd094 "_xapian",
globals=0x2dbc00, locals=0x2dbc00, fromlist=0x111e10, level=-1)
at ../Python/import.c:2072
#17 0x0008a860 in builtin___import__ (self=<value optimized out>,
args=<value optimized out>, kwds=<value optimized out>)
at ../Python/bltinmodule.c:47
$ objdump -R /usr/lib/python2.5/site-packages/_xapian.so |egrep '^[0-9a-f]{7}[1235679abdef]'
000a1336 R_ARM_ABS32 __gxx_personality_v0
000a18d3 R_ARM_ABS32 __gxx_personality_v0
which fits well with the unaligned addresses accessed.
I don't have a clue about dynamic libraries and relocations, so this is
where I stopped.
Cheers,
Luca
- -- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: armel (armv5tel)
Kernel: Linux 2.6.32-2-kirkwood
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-xapian depends on:
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.4.3-3 GCC support library
ii libstdc++6 4.4.3-3 The GNU Standard C++ Library v3
ii libxapian15 1.0.18-1 Search engine library
ii python 2.5.4-9 An interactive high-level object-o
ii python-central 0.6.14+nmu2 register and build utility for Pyt
python-xapian recommends no packages.
Versions of packages python-xapian suggests:
pn xapian-doc <none> (no description available)
- -- no debconf information
iEYEARECAAYFAku90gQACgkQ+AQB36CPPlpwuQCfXtYZMSutXZOo9MuF1x/SwoGV
FIUAnAkFiigWk+JuJHR9MEavsPmHUVYX
=ogrl
-----END PGP SIGNATURE-----