python module lxc failed to import on ARM with: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 0: invalid start byte

Bug #1159817 reported by Jean-Baptiste Lallement
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Raring ARM
python3-lxc: 0.9.0~rc1-0ubuntu1

On ARM python3 module lxc failed to import. This breaks commands like lxc-ls

TEST CASE:
1. On an ARM device run the following command:
  $ python3 -c "import lxc"

ACTUAL RESULT:
  $ python3 -c "import lxc"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 24, in <module>
    import _lxc
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 0: invalid start byte

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: python3-lxc 0.9.0~rc1-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-13.23-generic 3.8.3
Uname: Linux 3.8.0-13-generic x86_64
ApportVersion: 2.9.2-0ubuntu3
Architecture: amd64
Date: Mon Mar 25 15:35:25 2013
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: Upgraded to raring on 2012-01-31 (418 days ago)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote :

My first guess was some utf-8 problems with the python module "lxc", but it actually looks like it's the binary module that's the problem:

root@delmak:~# python3 -c "import _lxc"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 0: invalid start byte

Revision history for this message
Stéphane Graber (stgraber) wrote :

I'm currently going on the assumption that we simply got a corrupted binary out of the armhf buildd. I'm doing a local rebuild to confirm and if that's the case, will simply push a no-change rebuild.

This assumption is based on the fact that the same python module works on other architectures and that the binding only got very slightly changed between ~alpha3 (working on armhf) and ~rc1 (not working on armhf) with those changes limited to the Container object and not to the import functions.

Robie Basak (racb)
Changed in lxc (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

BTW if you don't have a board to reproduce this issue, it is also reproducible in an armhf container created with:
$ sudo lxc-create -n raring-arm -t ubuntu -- -r raring -a armhf

then install python3-lxc into this container

Revision history for this message
Stéphane Graber (stgraber) wrote :

Reproducing was easy, understanding the problem wasn't ;)

Anyway, I figured it out and sent a patch upstream for inclusion in the final 0.9.
Once it's accepted upstream (hopefully in a few minutes), I'll push it to Ubuntu.

Changed in lxc (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.9.0~rc1-0ubuntu2

---------------
lxc (0.9.0~rc1-0ubuntu2) raring; urgency=low

  * Fix python3-lxc on armhf (LP: #1159817).
 -- Stephane Graber <email address hidden> Tue, 26 Mar 2013 11:21:46 -0400

Changed in lxc (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.