[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#569571: [armel] elf_machine_rel(): misaligned memory access



Package: libc6
Version: 2.10.2-2
Severity: important


I don't understand ELF / linker stuff well enough to be sure who is to blame here, so filing against libc6 as the misaligned access is happening in ports/sysdeps/arm/dl-machine.h and a comment in elf/dynamic-link.h (line 49ff) suggests that _not_ having this occur has been an explicit goal of the code.

When trying to load the xapian python module, a misaligned memory access happens in elf_machine_rel():

(sugar-jhbuild)sascha.silbe@flatty:/media/tmp1/sugar-jhbuild/source/sugar-datastore$ gdb $(which python)
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...Reading symbols from /usr/lib/debug/usr/bin/python2.5...done.
(no debugging symbols found)...done.
(gdb) directory /home/sascha.silbe/src/deb/eglibc-2.10.2/elf 
Source directories searched: /home/sascha.silbe/src/deb/eglibc-2.10.2/elf:$cdir:$cwd
(gdb) run -c 'import xapian'
Starting program: /usr/bin/python -c 'import xapian'
[Thread debugging using libthread_db enabled]

Program received signal SIGBUS, Bus error.
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
429                 *reloc_addr += value;
(gdb) where
#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  0x40012580 in dl_open_worker (a=<value optimized out>) at dl-open.c:402
#4  0x4000ddd0 in _dl_catch_error (objname=<value optimized out>, errstring=<value optimized out>, mallocedp=<value optimized out>, operate=<value optimized out>, args=0xbec41b78) at dl-error.c:178
#5  0x40011d80 in _dl_open (file=0xbec420cc "/usr/lib/python2.5/site-packages/_xapian.so", mode=-2147483646, caller_dlopen=0xb763c, nsid=-2, argc=3, argv=0xbec47814, env=0xbec47824) at dl-open.c:615
#6  0x40051ae0 in dlopen_doit (a=<value optimized out>) at dlopen.c:67
#7  0x4000ddd0 in _dl_catch_error (objname=<value optimized out>, errstring=<value optimized out>, mallocedp=<value optimized out>, operate=<value optimized out>, args=0xbec41dd8) at dl-error.c:178
#8  0x40051fa8 in _dlerror_run (operate=0x40051a68 <dlopen_doit>, args=0xbec41dd8) at dlerror.c:164
#9  0x40051a30 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=0xbec420cc "/usr/lib/python2.5/site-packages/_xapian.so", fp=0x170298) at ../Python/dynload_shlib.c:134
#11 0x000a8bb4 in _PyImport_LoadDynamicModule (name=0xbec43140 "_xapian", pathname=0xbec420cc "/usr/lib/python2.5/site-packages/_xapian.so", fp=0x170298) at ../Python/importdl.c:42
#12 0x000a6ae4 in load_module (name=0xbec43140 "_xapian", fp=0x170298, buf=<value optimized out>, type=3, loader=0x0) at ../Python/import.c:1758
#13 0x000a7350 in import_submodule (mod=0x111e00, subname=0xbec43140 "_xapian", fullname=0xbec43140 "_xapian") at ../Python/import.c:2400
#14 0x000a75f8 in load_next (mod=0x111e00, altmod=0x111e00, p_name=<value optimized out>, buf=0xbec43140 "_xapian", p_buflen=0x111e00) 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=0x111e00, level=-1) at ../Python/import.c:2001
#16 0x000a7fd8 in PyImport_ImportModuleLevel (name=0x4029a574 "_xapian", globals=0x40295810, locals=0x40295810, fromlist=0x111e00, 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
#18 0x000d9da4 in PyCFunction_Call (func=0x402494b8, arg=0x4030c150, kw=0x1) at ../Objects/methodobject.c:77
#19 0x0001ceec in PyObject_Call (func=0x1a4030, arg=0x400242c0, kw=0x1) at ../Objects/abstract.c:1861
#20 0x0008b4d8 in PyEval_CallObjectWithKeywords (func=0x402494b8, arg=0x4030c150, kw=<value optimized out>) at ../Python/ceval.c:3481
#21 0x0008e050 in PyEval_EvalFrameEx (f=0x1a1fa0, throwflag=<value optimized out>) at ../Python/ceval.c:2093
#22 0x00092720 in PyEval_EvalCodeEx (co=0x40309bf0, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=1121792, kws=0x92880, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2875
#23 0x00092880 in PyEval_EvalCode (co=0x1a4030, globals=0x400242c0, locals=0x1) at ../Python/ceval.c:514
#24 0x000a4c74 in PyImport_ExecCodeModuleEx (name=0xbec463f0 "xapian", co=0x40309bf0, pathname=0xbec4433c "/usr/lib/python2.5/site-packages/xapian.pyc") at ../Python/import.c:675
#25 0x000a675c in load_source_module (name=0xbec463f0 "xapian", pathname=0xbec4433c "/usr/lib/python2.5/site-packages/xapian.pyc", fp=<value optimized out>) at ../Python/import.c:959
#26 0x000a7350 in import_submodule (mod=0x111e00, subname=0xbec463f0 "xapian", fullname=0xbec463f0 "xapian") at ../Python/import.c:2400
#27 0x000a75f8 in load_next (mod=0x111e00, altmod=0x111e00, p_name=<value optimized out>, buf=0xbec463f0 "xapian", p_buflen=0x111e00) at ../Python/import.c:2220
#28 0x000a7c18 in import_module_level (name=0x34400000 <Address 0x34400000 out of bounds>, globals=<value optimized out>, locals=<value optimized out>, fromlist=0x111e00, level=-1) at ../Python/import.c:2001
#29 0x000a7fd8 in PyImport_ImportModuleLevel (name=0x402889b4 "xapian", globals=0x40258d20, locals=0x40258d20, fromlist=0x111e00, level=-1) at ../Python/import.c:2072
#30 0x0008a860 in builtin___import__ (self=<value optimized out>, args=<value optimized out>, kwds=<value optimized out>) at ../Python/bltinmodule.c:47
#31 0x000d9da4 in PyCFunction_Call (func=0x402494b8, arg=0x402844e0, kw=0x1) at ../Objects/methodobject.c:77
#32 0x0001ceec in PyObject_Call (func=0x1a4030, arg=0x400242c0, kw=0x1) at ../Objects/abstract.c:1861
#33 0x0008b4d8 in PyEval_CallObjectWithKeywords (func=0x402494b8, arg=0x402844e0, kw=<value optimized out>) at ../Python/ceval.c:3481
#34 0x0008e050 in PyEval_EvalFrameEx (f=0x141918, throwflag=<value optimized out>) at ../Python/ceval.c:2093
#35 0x00092720 in PyEval_EvalCodeEx (co=0x4027ff98, globals=<value optimized out>, locals=<value optimized out>, args=0x0, argcount=1, kws=0x92880, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2875
#36 0x00092880 in PyEval_EvalCode (co=0x1a4030, globals=0x400242c0, locals=0x1) at ../Python/ceval.c:514
#37 0x000b0ca4 in run_mod (command=<value optimized out>, flags=<value optimized out>) at ../Python/pythonrun.c:1273
#38 PyRun_StringFlags (command=<value optimized out>, flags=<value optimized out>) at ../Python/pythonrun.c:1236
#39 PyRun_SimpleStringFlags (command=<value optimized out>, flags=<value optimized out>) at ../Python/pythonrun.c:900
#40 0x00018e74 in Py_Main (argc=3, argv=0xbec47814) at ../Modules/main.c:521
#41 0x0001879c in main (argc=1720368, argv=0x400242c0) at ../Modules/python.c:23


This renders python-xapian unusable on armel, thus severity important.
Upgrading to the version in sid (2.10.2-6) doesn't help.


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (600, 'testing')
Architecture: armel (armv5tel)

Kernel: Linux 2.6.33-rc5-flatty-ocf-1-00255-g5b8834f
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6 depends on:
ii  libc-bin                      2.10.2-2   GNU C Library: Binaries
ii  libgcc1                       1:4.4.2-9  GCC support library

libc6 recommends no packages.

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]         1.5.28     Debian configuration management sy
pn  glibc-doc                     <none>     (no description available)
ii  locales                       2.10.2-2   GNU C Library: National Language (

-- debconf information:
  glibc/upgrade: true
* glibc/restart-services: rsync exim4 cron atd
  glibc/disable-screensaver:
  glibc/restart-failed:



Reply to: