Debian Bug report logs - #524985
python2.5: commands.getstatusoutput fails in i386 chroot

version graph

Package: linux-2.6; Maintainer for linux-2.6 is Debian Kernel Team <debian-kernel@lists.debian.org>;

Reported by: Brice Goglin <Brice.Goglin@ens-lyon.org>

Date: Tue, 21 Apr 2009 10:27:02 UTC

Severity: important

Fixed in version 2.6.26-14

Done: Ben Hutchings <ben@decadent.org.uk>

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, Matthias Klose <doko@debian.org>:
Bug#524985; Package python2.5. (Tue, 21 Apr 2009 10:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brice Goglin <bgoglin@debian.org>:
New Bug report received and forwarded. Copy sent to Matthias Klose <doko@debian.org>. (Tue, 21 Apr 2009 10:27:04 GMT) Full text and rfc822 format available.

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

From: Brice Goglin <bgoglin@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python2.5: commands.getstatusoutput fails in i386 chroot
Date: Tue, 21 Apr 2009 12:20:01 +0200
Package: python2.5
Version: 2.5.4-1
Severity: important

Hello,

We discovered that my builds of xorg-server for i386 had strange build 
strings (see "Build Operating System: ..." in /var/log/Xorg.0.log if
you have xserver-xorg-core 1.6.1 installed).

The reason is that lsb_release -i -s fails in my i386 chroot:

morris:~# lsb_release -i -s
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 96, in <module>
    main()
  File "/usr/bin/lsb_release", line 60, in main
    distinfo = lsb_release.get_distro_information()
  File "/usr/lib/pymodules/python2.5/lsb_release.py", line 250, in get_distro_information
    distinfo = guess_debian_release()
  File "/usr/lib/pymodules/python2.5/lsb_release.py", line 209, in guess_debian_release
    rinfo = guess_release_from_apt()
  File "/usr/lib/pymodules/python2.5/lsb_release.py", line 151, in guess_release_from_apt
    releases = parse_apt_policy()
  File "/usr/lib/pymodules/python2.5/lsb_release.py", line 135, in parse_apt_policy
    policy = commands.getoutput('apt-cache policy 2>/dev/null')
  File "/usr/lib/python2.5/commands.py", line 44, in getoutput
    return getstatusoutput(cmd)[1]
  File "/usr/lib/python2.5/commands.py", line 54, in getstatusoutput
    text = pipe.read()
IOError: [Errno 9] Bad file descriptor
close failed: [Errno 9] Bad file descriptor
morris:~# Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://ftp.debian.org sid/main Packages
     release o=Debian,a=unstable,l=Debian,c=main
     origin ftp.debian.org
Pinned packages:

The machine is a amd64. lsb_release works fine in a similar amd64 chroot.

I narrowed down the problem using the following python program:
#!/usr/bin/python
import commands
commands.getstatusoutput('echo foobar')

It works outside of chroot on amd64 and i386, and in the amd64 chroot:
But it fails in the i386 chroot:
morris:~# ~bgoglin/test.py 
foobar
Traceback (most recent call last):
  File "/home/bgoglin/test.py", line 3, in <module>
    commands.getstatusoutput('echo foobar')
  File "/usr/lib/python2.5/commands.py", line 54, in getstatusoutput
    text = pipe.read()
IOError: [Errno 9] Bad file descriptor
close failed: [Errno 9] Bad file descriptor


Brice

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-rc2=topinambour (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages python2.5 depends on:
ii  libbz2-1.0                1.0.5-1        high-quality block-sorting file co
ii  libc6                     2.9-4          GNU C Library: Shared libraries
ii  libdb4.5                  4.5.20-13      Berkeley v4.5 Database Libraries [
ii  libncursesw5              5.7+20090404-1 shared libraries for terminal hand
ii  libreadline5              5.2-4          GNU readline and history libraries
ii  libsqlite3-0              3.6.12-1       SQLite 3 shared library
ii  libssl0.9.8               0.9.8g-16      SSL shared libraries
ii  mime-support              3.44-1         MIME files 'mime.types' & 'mailcap
ii  python2.5-minimal         2.5.4-1        A minimal subset of the Python lan

python2.5 recommends no packages.

Versions of packages python2.5 suggests:
pn  python-profiler               <none>     (no description available)
pn  python2.5-doc                 <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#524985; Package python2.5. (Fri, 19 Jun 2009 09:39:57 GMT) Full text and rfc822 format available.

Acknowledgement sent to Loic Dachary <loic@dachary.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. (Fri, 19 Jun 2009 09:40:20 GMT) Full text and rfc822 format available.

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

From: Loic Dachary <loic@dachary.org>
To: 524985@bugs.debian.org
Subject: pbuilder-satisfydepends fails in chroot
Date: Fri, 19 Jun 2009 11:37:40 +0200
[Message part 1 (text/plain, inline)]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I believe the following can be traced back to the same bug.

/usr/lib/pbuilder/pbuilder-satisfydepends --force-version --chroot
/usr/src/jpoker/build/debian/unstable --control
gnulinux/debian/unstable/src/jpoker*.dsc


close failed: [Errno 9] Bad file descriptor
Traceback (most recent call last):
  File "/usr/sbin/gconf-schemas", line 82, in <module>
    pids=os.popen('pidof gconfd-2').readlines()[0].split()
IOError: [Errno 9] Bad file descriptor
dpkg: error processing libgnomevfs2-common (--configure):
 subprocess installed post-installation script returned error exit
status 1
dpkg: dependency problems prevent configuration of libgnomevfs2-0:
 libgnomevfs2-0 depends on libgnomevfs2-common (>= 1:2.24); however:
  Package libgnomevfs2-common is not configured yet.
 libgnomevfs2-0 depends on libgnomevfs2-common (<< 1:2.25); however:
  Package libgnomevfs2-common is not configured yet.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko7XGMACgkQ8dLMyEl6F21CugCcDZ0Qqc2Z0mdjhR2r27AOwsuF
aSQAnA4z51zM0d2DdXU9kpcfbyWYE2Pq
=1x6x
-----END PGP SIGNATURE-----

[loic.vcf (text/x-vcard, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#524985; Package python2.5. (Tue, 23 Jun 2009 11:54:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ansgar Burchardt <ansgar@2008.43-1.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. (Tue, 23 Jun 2009 11:54:09 GMT) Full text and rfc822 format available.

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

From: Ansgar Burchardt <ansgar@2008.43-1.org>
To: 524985@bugs.debian.org
Subject: same problem, also with applications not written in Python
Date: Tue, 23 Jun 2009 13:46:30 +0200
Hi,

I have the same problem with reportbug in a i386 sid chroot on a
xen-amd64 host:

  $ reportbug --smtphost=localhost cmake
  41 118
  close failed: [Errno 9] Bad file descriptor
  Warning: no reportbug configuration found.  Proceeding in novice mode.
  Detected character set: us-ascii
  Please change your locale if this is incorrect.

  Using 'Ansgar Burchardt <ansgar@43-1.org>' as your from address.
  Getting status for cmake...
  Traceback (most recent call last):
    File "/usr/bin/reportbug", line 1877, in <module>
      main()
    File "/usr/bin/reportbug", line 895, in main
      return iface.user_interface()
    File "/usr/bin/reportbug", line 1138, in user_interface
      status = utils.get_package_status(package)
    File "/usr/lib/pymodules/python2.5/reportbug/utils.py", line 303, in get_package_status
      "COLUMNS=79 dpkg --status %s 2>/dev/null" % packarg)
    File "/usr/lib/python2.5/commands.py", line 44, in getoutput
      return getstatusoutput(cmd)[1]
    File "/usr/lib/python2.5/commands.py", line 54, in getstatusoutput
      text = pipe.read()
  IOError: [Errno 9] Bad file descriptor
  close failed: [Errno 9] Bad file descriptor
  (sid-i386)ansgar@daikoku:/etc$ Package: cmake
  Status: install ok installed
  Priority: optional
  Section: devel
  Installed-Size: 9180
  Maintainer: A. Maitland Bottoms <bottoms@debian.org>
  Architecture: i386
  Version: 2.6.4-1
  Depends: libc6 (>= 2.3.6-6~), libcurl3-gnutls (>= 7.16.2-1), libexpat1 (>= 1.95.8), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.2.1), libxmlrpc-c3, zlib1g (>= 1:1.2.3.3.dfsg), cmake-data (= 2.6.4-1)
  Description: A cross-platform, open-source make system
   CMake is used to control the software compilation process using
   simple platform and compiler independent configuration files. CMake
   generates native makefiles and workspaces that can be used in the
   compiler environment of your choice. CMake is quite sophisticated: it
   is possible to support complex environments requiring system
   configuration, pre-processor generation, code generation, and template
   instantiation.
   .
   CMake was developed by Kitware as part of the NLM Insight
   Segmentation and Registration Toolkit project. The ASCI VIEWS project
   also provided support in the context of their parallel computation
   environment. Other sponsors include the Insight, VTK, and VXL open
   source software communities.
   
The output below the second shell prompt comes from reportbug as well.

The problem isn't limited to Python here.  cmake dies as well while
trying to read from file, but "strace cmake" works.

Regards,
Ansgar




Reply sent to Brice Goglin <Brice.Goglin@ens-lyon.org>:
You have taken responsibility. (Wed, 24 Jun 2009 11:42:13 GMT) Full text and rfc822 format available.

Notification sent to Brice Goglin <bgoglin@debian.org>:
Bug acknowledged by developer. (Wed, 24 Jun 2009 11:42:16 GMT) Full text and rfc822 format available.

Message #20 received at 524985-done@bugs.debian.org (full text, mbox):

From: Brice Goglin <Brice.Goglin@ens-lyon.org>
To: 524985-done@bugs.debian.org
Subject: Re: Bug#524985: python2.5: commands.getstatusoutput fails in i386 chroot
Date: Wed, 24 Jun 2009 13:39:16 +0200
On Tue, Apr 21, 2009 at 12:20:01PM +0200, Brice Goglin wrote:
> Package: python2.5
> Version: 2.5.4-1
> Severity: important
> 
> Hello,
> 
> We discovered that my builds of xorg-server for i386 had strange build 
> strings (see "Build Operating System: ..." in /var/log/Xorg.0.log if
> you have xserver-xorg-core 1.6.1 installed).
> 
> The reason is that lsb_release -i -s fails in my i386 chroot:
[...]

It seems to work fine now, no idea what fixed this...

Brice





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 23 Jul 2009 07:48:48 GMT) Full text and rfc822 format available.

Bug unarchived. Request was from Loic Dachary <loic@dachary.org> to control@bugs.debian.org. (Tue, 11 Aug 2009 14:54:02 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 11 Aug 2009 15:12:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#524985; Package python2.5. (Tue, 11 Aug 2009 15:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Loic Dachary <loic@dachary.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. (Tue, 11 Aug 2009 15:18:02 GMT) Full text and rfc822 format available.

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

From: Loic Dachary <loic@dachary.org>
To: 524985@bugs.debian.org
Subject: Bug#524985: python2.5: commands.getstatusoutput fails in i386,chroot
Date: Tue, 11 Aug 2009 17:17:14 +0200
[Message part 1 (text/plain, inline)]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Although the bug is gone for kernels 2.6.29 and above (
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521863 ), it remains
very much alive for kernels 2.6.26. The easiest way to reproduce it is
to atempt a run of pbuilder on the jpoker package on a amd64 2.6.26
kernel sid.

Cheers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqBi3oACgkQ8dLMyEl6F2053QCfY8pnPRkDZGF1VobCc8W6DOmm
bAEAn3lbv8gMbg5ZBtp3imYmMrcIFd2N
=v1hD
-----END PGP SIGNATURE-----

[loic.vcf (text/x-vcard, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#524985; Package python2.5. (Thu, 19 Nov 2009 15:42:16 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@debian.org>:
Extra info received and forwarded to list. (Thu, 19 Nov 2009 15:42:16 GMT) Full text and rfc822 format available.

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

From: Matthias Klose <doko@debian.org>
To: Ansgar Burchardt <ansgar@2008.43-1.org>, 524985@bugs.debian.org
Subject: Re: Bug#524985: same problem, also with applications not written in Python
Date: Thu, 19 Nov 2009 09:39:46 -0600
reassign 524985 linux
thanks

On 23.06.2009 06:46, Ansgar Burchardt wrote:
> Hi,
>
> I have the same problem with reportbug in a i386 sid chroot on a
> xen-amd64 host:
>
>    $ reportbug --smtphost=localhost cmake
>    41 118
>    close failed: [Errno 9] Bad file descriptor
>    Warning: no reportbug configuration found.  Proceeding in novice mode.
>    Detected character set: us-ascii
>    Please change your locale if this is incorrect.
>
>    Using 'Ansgar Burchardt<ansgar@43-1.org>' as your from address.
>    Getting status for cmake...
>    Traceback (most recent call last):
>      File "/usr/bin/reportbug", line 1877, in<module>
>        main()
>      File "/usr/bin/reportbug", line 895, in main
>        return iface.user_interface()
>      File "/usr/bin/reportbug", line 1138, in user_interface
>        status = utils.get_package_status(package)
>      File "/usr/lib/pymodules/python2.5/reportbug/utils.py", line 303, in get_package_status
>        "COLUMNS=79 dpkg --status %s 2>/dev/null" % packarg)
>      File "/usr/lib/python2.5/commands.py", line 44, in getoutput
>        return getstatusoutput(cmd)[1]
>      File "/usr/lib/python2.5/commands.py", line 54, in getstatusoutput
>        text = pipe.read()
>    IOError: [Errno 9] Bad file descriptor
>    close failed: [Errno 9] Bad file descriptor
>    (sid-i386)ansgar@daikoku:/etc$ Package: cmake
>    Status: install ok installed
>    Priority: optional
>    Section: devel
>    Installed-Size: 9180
>    Maintainer: A. Maitland Bottoms<bottoms@debian.org>
>    Architecture: i386
>    Version: 2.6.4-1
>    Depends: libc6 (>= 2.3.6-6~), libcurl3-gnutls (>= 7.16.2-1), libexpat1 (>= 1.95.8), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.2.1), libxmlrpc-c3, zlib1g (>= 1:1.2.3.3.dfsg), cmake-data (= 2.6.4-1)
>    Description: A cross-platform, open-source make system
>     CMake is used to control the software compilation process using
>     simple platform and compiler independent configuration files. CMake
>     generates native makefiles and workspaces that can be used in the
>     compiler environment of your choice. CMake is quite sophisticated: it
>     is possible to support complex environments requiring system
>     configuration, pre-processor generation, code generation, and template
>     instantiation.
>     .
>     CMake was developed by Kitware as part of the NLM Insight
>     Segmentation and Registration Toolkit project. The ASCI VIEWS project
>     also provided support in the context of their parallel computation
>     environment. Other sponsors include the Insight, VTK, and VXL open
>     source software communities.
>
> The output below the second shell prompt comes from reportbug as well.
>
> The problem isn't limited to Python here.  cmake dies as well while
> trying to read from file, but "strace cmake" works.

reassigning to the kernel package. probably can be closed as it is fixed in 
current versions.




Bug reassigned from package 'python2.5' to 'linux'. Request was from Matthias Klose <doko@debian.org> to control@bugs.debian.org. (Sun, 31 Jan 2010 16:42:10 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions python2.5/2.5.4-1. Request was from Matthias Klose <doko@debian.org> to control@bugs.debian.org. (Sun, 31 Jan 2010 16:42:11 GMT) Full text and rfc822 format available.

Bug reassigned from package 'linux' to 'linux-2.6'. Request was from Martin Michlmayr <tbm@cyrius.com> to control@bugs.debian.org. (Fri, 12 Feb 2010 00:12:04 GMT) Full text and rfc822 format available.

Changed Bug submitter to 'Brice Goglin <Brice.Goglin@ens-lyon.org>' from 'Brice Goglin <bgoglin@debian.org>' Request was from Brice Goglin <bgoglin@debian.org> to control@bugs.debian.org. (Sun, 21 Mar 2010 00:00:05 GMT) Full text and rfc822 format available.

Reply sent to Ben Hutchings <ben@decadent.org.uk>:
You have taken responsibility. (Tue, 31 May 2011 05:18:03 GMT) Full text and rfc822 format available.

Notification sent to Brice Goglin <Brice.Goglin@ens-lyon.org>:
Bug acknowledged by developer. (Tue, 31 May 2011 05:18:03 GMT) Full text and rfc822 format available.

Message #49 received at 524985-done@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: 524985-done@bugs.debian.org
Subject: Re: python2.5: commands.getstatusoutput fails in i386 chroot
Date: Tue, 31 May 2011 06:14:56 +0100
[Message part 1 (text/plain, inline)]
Version: 2.6.26-14

I believe this is a duplicate of #521863, which was fixed in the above
version.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 27 Sep 2011 07:40:33 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: Thu Apr 17 19:29:31 2014; Machine Name: buxtehude.debian.org

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