Debian Bug report logs - #576944
python-xapian: Perform unaligned memory access on ARM

version graph

Package: python-xapian; Maintainer for python-xapian is Olly Betts <olly@survex.com>; Source for python-xapian is src:xapian-bindings.

Reported by: Luca Niccoli <lultimouomo@gmail.com>

Date: Thu, 8 Apr 2010 12:48:05 UTC

Severity: important

Found in version xapian-bindings/1.0.18-1

Fixed in version xapian-bindings/1.0.19-1

Done: Olly Betts <olly@survex.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, lultimouomo@gmail.com, Olly Betts <olly@survex.com>:
Bug#576944; Package python-xapian. (Thu, 08 Apr 2010 12:48:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Niccoli <lultimouomo@gmail.com>:
New Bug report received and forwarded. Copy sent to lultimouomo@gmail.com, Olly Betts <olly@survex.com>. (Thu, 08 Apr 2010 12:48:08 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Luca Niccoli <lultimouomo@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python-xapian: Perform unaligned memory access on ARM
Date: Thu, 08 Apr 2010 14:45:13 +0200
Package: python-xapian
Version: 1.0.18-1
Severity: important

After setting the kernel to fix and report alignement faults, I found this warnings 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

This is the end of the backtrace i got with gdb python - 
run /usr/sbin/update-apt-xapian-index:

#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

$ 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:
0x4099c336 and 0x4099c8d3

I tried to build xapian-bindings with -Wcast-align, but I only got some
warnings in the PHP bindings, nothing on the python side.
I can't really say I grasp relocations (I don't have a clue), 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




Merged 576944 576945. Request was from Luca Niccoli <lultimouomo@gmail.com> to control@bugs.debian.org. (Thu, 08 Apr 2010 22:13:36 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Olly Betts <olly@survex.com>:
Bug#576944; Package python-xapian. (Thu, 08 Apr 2010 23:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Niccoli <lultimouomo@gmail.com>:
Extra info received and forwarded to list. Copy sent to Olly Betts <olly@survex.com>. (Thu, 08 Apr 2010 23:48:04 GMT) Full text and rfc822 format available.

Message #12 received at 576944@bugs.debian.org (full text, mbox):

From: Luca Niccoli <lultimouomo@gmail.com>
To: 576944@bugs.debian.org
Subject: Re: Bug#576945: python-xapian: performs unaligned memory access on ARM
Date: Fri, 9 Apr 2010 01:41:35 +0200
I've actually noticed that rebuilding python-xapian is enough to get
rid of the odd dynamic relocation entries in the SO and of the
alignment traps with them.
Maybe a bug on the buildd toolchain? (I rebuilt the package with an
up-to-date sid box).
Cheers,

Luca




Information forwarded to debian-bugs-dist@lists.debian.org, Olly Betts <olly@survex.com>:
Bug#576944; Package python-xapian. (Sat, 10 Apr 2010 08:33:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Niccoli <lultimouomo@gmail.com>:
Extra info received and forwarded to list. Copy sent to Olly Betts <olly@survex.com>. (Sat, 10 Apr 2010 08:33:08 GMT) Full text and rfc822 format available.

Message #17 received at 576944@bugs.debian.org (full text, mbox):

From: Luca Niccoli <lultimouomo@gmail.com>
To: 576944@bugs.debian.org
Date: Sat, 10 Apr 2010 10:28:30 +0200
> I've actually noticed that rebuilding python-xapian is enough to get
> rid of the odd dynamic relocation entries in the SO and of the
> alignment traps with them.

I was wrong.
What fixed the problem was passing CXXFLAGS="-g -O2 -Wcast-align" to debuild.
More precisely, by default debian/rules builds without -g, and this
triggers the unaligned relocation entries.




Information forwarded to debian-bugs-dist@lists.debian.org, Olly Betts <olly@survex.com>:
Bug#576944; Package python-xapian. (Sat, 10 Apr 2010 15:27:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Niccoli <lultimouomo@gmail.com>:
Extra info received and forwarded to list. Copy sent to Olly Betts <olly@survex.com>. (Sat, 10 Apr 2010 15:27:12 GMT) Full text and rfc822 format available.

Message #22 received at 576944@bugs.debian.org (full text, mbox):

From: Luca Niccoli <lultimouomo@gmail.com>
To: debian-arm@lists.debian.org, 576944@bugs.debian.org
Subject: Alignment issues
Date: Sat, 10 Apr 2010 17:22:45 +0200
Hi,
I've recently submitted bug #576944 and could use some help to trace
it down better, and understand if it's really a bug.
Some more things I've noticed:
If I set /proc/cpu/alignment to 0 (ignore) or 3 (fixup+warn) I see
three alignment traps each time _xapian.so is loaded (with
update-apt-xapian-index or axi-cache); if I set it to 1 (warn), I see
more than 50 of them.
I don't understand why this should happen.
I can either fixup or ignore the traps, both update-apt-xapian-index
and axi-cache seem to work - and the databases in
/var/lib/apt-xapian-index don't show sign of corruption.
If I add -g to g++ flags, the two unaligned relocation entries
disappear (they don't just get aligned)
Is this actually a bug?
If it is, whose bug is it?

Thanks,

Luca




Added tag(s) pending. Request was from Olly Betts <olly@survex.com> to control@bugs.debian.org. (Mon, 12 Apr 2010 01:45:09 GMT) Full text and rfc822 format available.

Disconnected #576945 from all other report(s). Request was from Olly Betts <olly@survex.com> to control@bugs.debian.org. (Mon, 12 Apr 2010 02:09:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Olly Betts <olly@survex.com>:
Bug#576944; Package python-xapian. (Mon, 12 Apr 2010 02:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Niccoli <lultimouomo@gmail.com>, 576944@bugs.debian.org, debian-arm@lists.debian.org:
Extra info received and forwarded to list. Copy sent to Olly Betts <olly@survex.com>. (Mon, 12 Apr 2010 02:18:03 GMT) Full text and rfc822 format available.

Message #31 received at 576944@bugs.debian.org (full text, mbox):

From: Olly Betts <olly@survex.com>
To: Luca Niccoli <lultimouomo@gmail.com>, 576944@bugs.debian.org
Cc: debian-arm@lists.debian.org, control@bugs.debian.org
Subject: Re: Bug#576944: Alignment issues
Date: Mon, 12 Apr 2010 02:43:35 +0100
clone 576944 -1
reassign -1 g++
tag 576944 + pending
thanks

On Sat, Apr 10, 2010 at 05:22:45PM +0200, Luca Niccoli wrote:
> I've recently submitted bug #576944 and could use some help to trace
> it down better, and understand if it's really a bug.
> Some more things I've noticed:
> If I set /proc/cpu/alignment to 0 (ignore) or 3 (fixup+warn) I see
> three alignment traps each time _xapian.so is loaded (with
> update-apt-xapian-index or axi-cache); if I set it to 1 (warn), I see
> more than 50 of them.
> I don't understand why this should happen.
> I can either fixup or ignore the traps, both update-apt-xapian-index
> and axi-cache seem to work - and the databases in
> /var/lib/apt-xapian-index don't show sign of corruption.
> If I add -g to g++ flags, the two unaligned relocation entries
> disappear (they don't just get aligned)
> Is this actually a bug?
> If it is, whose bug is it?

John Reiser says "g++" in a reply not cc:-ed to the bug:

http://thread.gmane.org/gmane.linux.debian.ports.arm/8422/focus=8424

I think he's right, so cloning the bug and assigning the copy to g++.

I'm OK with adding "-g" to xapian-bindings' debian/rules as a workaround, so
keeping 576944 to track that (have committed this change, will include in
1.0.19-1).

Cheers,
    Olly




Information forwarded to debian-bugs-dist@lists.debian.org, Olly Betts <olly@survex.com>:
Bug#576944; Package python-xapian. (Tue, 13 Apr 2010 09:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luca Niccoli <lultimouomo@gmail.com>:
Extra info received and forwarded to list. Copy sent to Olly Betts <olly@survex.com>. (Tue, 13 Apr 2010 09:21:03 GMT) Full text and rfc822 format available.

Message #36 received at 576944@bugs.debian.org (full text, mbox):

From: Luca Niccoli <lultimouomo@gmail.com>
To: control@bugs.debian.org, 576944@bugs.debian.org
Subject: Re: Bug#576944: Alignment issues
Date: Tue, 13 Apr 2010 11:17:57 +0200
unmerge 576945
reassign 576945 g++
tag 576945 - pending
thank you

Cloning failed because I had submitted two reports by mistake and
merged them; fixing.
l




Reply sent to Olly Betts <olly@survex.com>:
You have taken responsibility. (Thu, 15 Apr 2010 16:06:09 GMT) Full text and rfc822 format available.

Notification sent to Luca Niccoli <lultimouomo@gmail.com>:
Bug acknowledged by developer. (Thu, 15 Apr 2010 16:06:09 GMT) Full text and rfc822 format available.

Message #41 received at 576944-close@bugs.debian.org (full text, mbox):

From: Olly Betts <olly@survex.com>
To: 576944-close@bugs.debian.org
Subject: Bug#576944: fixed in xapian-bindings 1.0.19-1
Date: Thu, 15 Apr 2010 16:02:51 +0000
Source: xapian-bindings
Source-Version: 1.0.19-1

We believe that the bug you reported is fixed in the latest version of
xapian-bindings, which is due to be installed in the Debian FTP archive:

libxapian-ruby1.8_1.0.19-1_amd64.deb
  to main/x/xapian-bindings/libxapian-ruby1.8_1.0.19-1_amd64.deb
php5-xapian_1.0.19-1_amd64.deb
  to main/x/xapian-bindings/php5-xapian_1.0.19-1_amd64.deb
python-xapian_1.0.19-1_amd64.deb
  to main/x/xapian-bindings/python-xapian_1.0.19-1_amd64.deb
tclxapian_1.0.19-1_amd64.deb
  to main/x/xapian-bindings/tclxapian_1.0.19-1_amd64.deb
xapian-bindings_1.0.19-1.diff.gz
  to main/x/xapian-bindings/xapian-bindings_1.0.19-1.diff.gz
xapian-bindings_1.0.19-1.dsc
  to main/x/xapian-bindings/xapian-bindings_1.0.19-1.dsc
xapian-bindings_1.0.19.orig.tar.gz
  to main/x/xapian-bindings/xapian-bindings_1.0.19.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 576944@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Olly Betts <olly@survex.com> (supplier of updated xapian-bindings package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 15 Apr 2010 14:55:34 +0000
Source: xapian-bindings
Binary: tclxapian libxapian-ruby1.8 python-xapian php5-xapian
Architecture: source amd64
Version: 1.0.19-1
Distribution: unstable
Urgency: low
Maintainer: Olly Betts <olly@survex.com>
Changed-By: Olly Betts <olly@survex.com>
Description: 
 libxapian-ruby1.8 - Xapian search engine interface for Ruby 1.8
 php5-xapian - Xapian search engine interface for PHP5
 python-xapian - Xapian search engine interface for Python
 tclxapian  - Xapian search engine interface for Tcl
Closes: 576944 577094
Changes: 
 xapian-bindings (1.0.19-1) unstable; urgency=low
 .
   * New upstream release.
   * debian/rules: Fix clean target to remove python/testsuite.pyc.
     (Closes: #577094)
   * debian/rules: Compile with -g - needed for armel to workaround unaligned
     relocations. (Closes: #576944)
Checksums-Sha1: 
 03edcd46e561e32d780848a1cec4cd4da9bd5d97 2085 xapian-bindings_1.0.19-1.dsc
 6180614ba81e31c78489a3710c6298a215392da4 1069031 xapian-bindings_1.0.19.orig.tar.gz
 7a4a7db41a7ca07c13307beeaee1dc1f6de3dcfb 16792 xapian-bindings_1.0.19-1.diff.gz
 6d25969d16502c4ac6949f57dd71a802769a3c52 198558 tclxapian_1.0.19-1_amd64.deb
 b29bd5c2a36e701fc872f4b638ec23390a810c5c 222964 libxapian-ruby1.8_1.0.19-1_amd64.deb
 d598e16b5f5b1d1fd8295c1e7b41c0de73b09ed8 512186 python-xapian_1.0.19-1_amd64.deb
 e1e4d8437f37c4f5afa61f6c3e748af0e6c20bf5 202874 php5-xapian_1.0.19-1_amd64.deb
Checksums-Sha256: 
 54145ba19f9943fb27b4cc154f1a4eb2da2b822bd159c3cc481ebbe4e5c4d46a 2085 xapian-bindings_1.0.19-1.dsc
 533f95af8204ed6116fb5d58e9a05e0b8aa0d48510e7565ecdd6655ee1f5888a 1069031 xapian-bindings_1.0.19.orig.tar.gz
 2d31c3737b5fbdc4d48c134fbe7c5c769fe30b0ff4adcb020086a0d19416f914 16792 xapian-bindings_1.0.19-1.diff.gz
 c61449c94ac31d1f5981e1518e15ae0a1d04de2705c9fcd029d5e9651f334e17 198558 tclxapian_1.0.19-1_amd64.deb
 30e62f3d958fbed7768e07aa534b5015d506cdf0bede9f550542d54951623ec8 222964 libxapian-ruby1.8_1.0.19-1_amd64.deb
 a1d4d61dd9ae076ea6013b6c9d0c68bae88e34284e1b47b0085db1f5fecb6da9 512186 python-xapian_1.0.19-1_amd64.deb
 18531d6bad58b327d08df5baa70f46b5cb35ab953fe87f4f7116f9496cff3952 202874 php5-xapian_1.0.19-1_amd64.deb
Files: 
 b661e206d25cae2d9abca33397935c91 2085 libs optional xapian-bindings_1.0.19-1.dsc
 97999fecb02d26f1fe709d85fa71b9ca 1069031 libs optional xapian-bindings_1.0.19.orig.tar.gz
 bd632fc3692dae6fd6174d88b5cdcbe9 16792 libs optional xapian-bindings_1.0.19-1.diff.gz
 f07fbcf0fb4eb503dc037ad939e417b6 198558 libs optional tclxapian_1.0.19-1_amd64.deb
 8aee937476d8ab09161b4f82699b2a22 222964 ruby optional libxapian-ruby1.8_1.0.19-1_amd64.deb
 12a76776ac7e8d775266262001da5476 512186 python optional python-xapian_1.0.19-1_amd64.deb
 cb71a699ac3a41ef808fb09ff57448e4 202874 php optional php5-xapian_1.0.19-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBCAAGBQJLxza0AAoJEBgUewc7rSsHa64QAKVypaqW6yprw4wnIihcmRtH
EsFIuonrwrHEmGD3ZwFoMFw884DVW3ZZ8AX9ew0rBGJBU3gekv6fBpTVZQ0fC0+m
Qgfkp82H8KIbX9SWFo9Xvk6kStdY6PicP5KfJIy+lIc6SKgJvZRfef1vd34HHBkC
Xrg5kO8cSUdFYTLi8mTDxdIhb6L9+MkzOuwjR7toOR7pPEa3gY3OmEuMi76A7HVg
gUjtJ578uUkBRGBs3C+BEOzQ7O6nujkc4ro4xRq5z2Bc1JpwZTa8WEJDaxbCZVDA
Vs+aKc4yIHuEnd/0msOoe8Q9VsnEBqwN2KvuluQRGWM1wHQNAVwkz3gN3ggLGevs
+l412vZXPNIavpNmgNs1PIFCa/PKb4ea76ZLUh9ngULK7cOlVZveOLILEWlFw2re
CHJGTi9Gwkn47PJc3Wah7UHcZRrrp6DnzUOzdNPZaIKAB/xixz/+cSbtVAhuXdaI
W4jYg9fiuSCWbZghMzDiP6Z+JvYsePPKccObQ2A04glw6e44r8Jw24y6rEtOBv51
29bUBwic+5OdARg/OR38ehKgfSXYZt/mowG4ckZK0TUQieQaAZO35wvI8+cn6UFa
tPV0MjmVYR4ECpu3dk0N6XtIMpBxlB3C4I59PS6pWFPB3Uk+Ot1ugHk3jPEJGSSG
xtQvWi1j6X9oqtURlNLk
=4Khm
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 24 May 2010 07:34:47 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 08:10:45 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.