[Bug 1063350] Re: add-apt-repository/apt-add-repository fails with "ValueError: cannot convert float NaN to integer"

Nathan Stratton Treadway ubuntu.lp at nathanst.com
Fri Mar 8 03:47:50 UTC 2013


I found a Redhat bug that seems to be related:
  https://bugzilla.redha t.com/show_bug.cgi?id=758446
(It's for a different Python program, but pycurl is used there, too, and in it NaNs are similarly showing up in unexpected places.)

In comment #9,  Zdeněk Pavlas suggests the problem might related to improper cleanup after the use of MMX instructions, as explained in:
http://en.wikipedia.org/wiki/SSE2#Differences_between_MMX_and_SSE2

"Once MMX has been used, the programmer must use the emms instruction
(C: _mm_empty()) to restore operation to the x87 register file. [...]
the corrupt floating-point state caused by failure to emit emms may go
undetected for millions of instructions before ultimately causing the
floating-point routine to fail, returning NaN."

I'm not sure how to verify that issue is actually what's triggering this
specific problem, but the Wikipedia page goes on to mention that this
cleanup is not required when SSE2 instructions are used instead of MMX,
and I can confirm that the two machines I have found that exhibit this
problem do have "mmx" but not "sse2" in the flags line of /proc/cpuinfo.

However, I have some other machine with that same combo of flags which
don't show the bug, so it seems that the libXXX versions involved do
matter.  In my case, at least, the systems that do show the the bug are
running Precise, and the ones that don't are running Lucid and Debian
Etch.

If this "missing emms instruction" is in fact the problem, I'm also not
sure exactly which library needs to be fixed (though the fact that it's
https that triggers the problem might point towards libgnutls26...).

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1063350

Title:
  add-apt-repository/apt-add-repository fails with "ValueError: cannot
  convert float NaN to integer"

Status in “software-properties” package in Ubuntu:
  Confirmed

Bug description:
  # add-apt-repository ppa:ubuntu-wine/ppa
  You are about to add the following PPA to your system:
   Welcome to the Wine Team PPA.  Here you can get the latest available Wine betas for every supported version of Ubuntu.  This PPA is managed by Scott Ritchie and Maarten Lankhorst.
   More info: https://launchpad.net/~ubuntu-wine/+archive/ppa
  Press [ENTER] to continue or ctrl-c to cancel adding it

  Exception in thread Thread-1:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
      self.run()
    File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 99, in run
      self.add_ppa_signing_key(self.ppa_path)
    File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 132, in add_ppa_signing_key
      tmp_keyring_dir = tempfile.mkdtemp()
    File "/usr/lib/python2.7/tempfile.py", line 322, in mkdtemp
      name = names.next()
    File "/usr/lib/python2.7/tempfile.py", line 141, in next
      letters = [choose(c) for dummy in "123456"]
    File "/usr/lib/python2.7/random.py", line 274, in choice
      return seq[int(self.random() * len(seq))]  # raises IndexError if seq is empty
  ValueError: cannot convert float NaN to integer

  I have tried a purge and install but it doesn't fix this.

  No idea how to work around this.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: python-software-properties 0.82.7.3
  ProcVersionSignature: Ubuntu 3.2.0-31.50-generic-pae 3.2.28
  Uname: Linux 3.2.0-31-generic-pae i686
  ApportVersion: 2.0.1-0ubuntu13
  Architecture: i386
  Date: Sun Oct  7 18:43:46 2012
  PackageArchitecture: all
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_GB.UTF-8
   SHELL=/bin/bash
  SourcePackage: software-properties
  UpgradeStatus: Upgraded to precise on 2012-10-03 (4 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1063350/+subscriptions




More information about the foundations-bugs mailing list