Debian Bug report logs - #844233
python-passlib: FTBFS with probability of 0.46% due to non-deterministic testsuite

version graph

Package: src:python-passlib; Maintainer for src:python-passlib is Debian Python Team <team+python@tracker.debian.org>;

Reported by: Chris Lamb <lamby@debian.org>

Date: Sun, 13 Nov 2016 16:27:07 UTC

Severity: serious

Tags: fixed-upstream

Found in version python-passlib/1.6.5-4

Fixed in version python-passlib/1.7.0-1

Done: Barry Warsaw <barry@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://bitbucket.org/ecollins/passlib/issues/82/non-deterministic-test-failure

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-builds@lists.alioth.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#844233; Package src:python-passlib. (Sun, 13 Nov 2016 16:27:09 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <lamby@debian.org>:
New Bug report received and forwarded. Copy sent to reproducible-builds@lists.alioth.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Sun, 13 Nov 2016 16:27:09 GMT) (full text, mbox, link).


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

From: Chris Lamb <lamby@debian.org>
To: submit@bugs.debian.org
Subject: python-passlib: FTBFS with probability of 0.22% due to non-deterministic testsuite
Date: Sun, 13 Nov 2016 16:25:30 +0000
Source: python-passlib
Version: 1.6.5-4
Severity: serious
Tags: ftbfs
User: reproducible-builds@lists.alioth.debian.org
Usertags: randomess
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that python-passlib's testsuite will non-determinstically FTBFS:

======================================================================
FAIL: test_getrandstr (passlib.tests.test_utils.MiscTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-passlib-1.6.5/2nd/passlib/tests/test_utils.py", line 129, in test_getrandstr
    self.assertEqual(sorted(set(x)), [u('a'),u('b'),u('c')])
AssertionError: Lists differ: [u'a', u'b'] != [u'a', u'b', u'c']

Second list contains 1 additional elements.
First extra element 2:
u'c'

- [u'a', u'b']
+ [u'a', u'b', u'c']
?            ++++++

This is because of:

125         x = f(u('abc'), 16)
126         y = f(u('abc'), 16)
127         self.assertIsInstance(x, unicode)
128         self.assertNotEqual(x,y)
129         self.assertEqual(sorted(set(x)), [u('a'),u('b'),u('c')])

If the random string ``x`` doesn't contain a certain character, the
assertion will fail. By my quick calculation this will happen with a
probability of (2/3)^(16-1).

It will also FTBFS if it generates the exact same random string, but
that seems a little more unlikely.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#844233; Package src:python-passlib. (Sun, 13 Nov 2016 16:57:03 GMT) (full text, mbox, link).


Acknowledgement sent to James Clarke <jrtc27@jrtc27.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Sun, 13 Nov 2016 16:57:03 GMT) (full text, mbox, link).


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

From: James Clarke <jrtc27@jrtc27.com>
To: Chris Lamb <lamby@debian.org>, 844233@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Re: Bug#844233: python-passlib: FTBFS with probability of 0.22% due to non-deterministic testsuite
Date: Sun, 13 Nov 2016 16:56:13 +0000
Control: retitle -1 python-passlib: FTBFS with probability of 0.46% due to non-deterministic testsuite

On Sun, Nov 13, 2016 at 04:25:30PM +0000, Chris Lamb wrote:
> Whilst working on the Reproducible Builds effort [0], we noticed
> that python-passlib's testsuite will non-determinstically FTBFS:
>
> ======================================================================
> FAIL: test_getrandstr (passlib.tests.test_utils.MiscTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/build/python-passlib-1.6.5/2nd/passlib/tests/test_utils.py", line 129, in test_getrandstr
>     self.assertEqual(sorted(set(x)), [u('a'),u('b'),u('c')])
> AssertionError: Lists differ: [u'a', u'b'] != [u'a', u'b', u'c']
>
> Second list contains 1 additional elements.
> First extra element 2:
> u'c'
>
> - [u'a', u'b']
> + [u'a', u'b', u'c']
> ?            ++++++
>
> This is because of:
>
> 125         x = f(u('abc'), 16)
> 126         y = f(u('abc'), 16)
> 127         self.assertIsInstance(x, unicode)
> 128         self.assertNotEqual(x,y)
> 129         self.assertEqual(sorted(set(x)), [u('a'),u('b'),u('c')])
>
> If the random string ``x`` doesn't contain a certain character, the
> assertion will fail. By my quick calculation this will happen with a
> probability of (2/3)^(16-1).

I believe it's actually (3C2)*(2/3)^16 - (3C1)*(1/3)^16 ~= 0.46% (the
subtracted value is negligible).

> It will also FTBFS if it generates the exact same random string, but
> that seems a little more unlikely.

P = (1/3)^16 = 2.3e-8 or 0.0000023%, which isn't quite as absurdly small
as you might think.

Regards,
James



Changed Bug title to 'python-passlib: FTBFS with probability of 0.46% due to non-deterministic testsuite' from 'python-passlib: FTBFS with probability of 0.22% due to non-deterministic testsuite'. Request was from James Clarke <jrtc27@jrtc27.com> to submit@bugs.debian.org. (Sun, 13 Nov 2016 16:57:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#844233; Package src:python-passlib. (Sun, 13 Nov 2016 16:57:09 GMT) (full text, mbox, link).


Acknowledgement sent to James Clarke <jrtc27@jrtc27.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Sun, 13 Nov 2016 16:57:09 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#844233; Package src:python-passlib. (Mon, 14 Nov 2016 14:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Mon, 14 Nov 2016 14:33:04 GMT) (full text, mbox, link).


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

From: Chris Lamb <lamby@debian.org>
To: James Clarke <jrtc27@jrtc27.com>, 844233@bugs.debian.org
Subject: Re: Bug#844233: python-passlib: FTBFS with probability of 0.22% due to non-deterministic testsuite
Date: Mon, 14 Nov 2016 14:30:19 +0000
James Clarke wrote:

> I believe it's actually (3C2)*(2/3)^16 - (3C1)*(1/3)^16 ~= 0.46% (the
> subtracted value is negligible).

Thanks :)

> > It will also FTBFS if it generates the exact same random string, but
> > that seems a little more unlikely.
> 
> P = (1/3)^16 = 2.3e-8 or 0.0000023%, which isn't quite as absurdly small
> as you might think.

Ah, but a little more unlikely than 0.46%… :)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-



Set Bug forwarded-to-address to 'https://bitbucket.org/ecollins/passlib/issues/82/non-deterministic-test-failure'. Request was from Harlan Lieberman-Berg <hlieberman@debian.org> to control@bugs.debian.org. (Mon, 21 Nov 2016 07:21:07 GMT) (full text, mbox, link).


Added tag(s) upstream. Request was from Harlan Lieberman-Berg <hlieberman@debian.org> to control@bugs.debian.org. (Mon, 21 Nov 2016 07:21:07 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#844233; Package src:python-passlib. (Wed, 23 Nov 2016 21:36:07 GMT) (full text, mbox, link).


Acknowledgement sent to Harlan Lieberman-Berg <hlieberman@setec.io>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Wed, 23 Nov 2016 21:36:07 GMT) (full text, mbox, link).


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

From: Harlan Lieberman-Berg <hlieberman@setec.io>
To: 844233@bugs.debian.org, control@bugs.debian.org
Subject: Fixed upstream
Date: Wed, 23 Nov 2016 16:24:35 -0500
tag 844233 -upstream, +fixed-upstream
thanks

According to the maintainer, this has been fixed in the 1.7.0 release.

Sincerely,
-- 
Harlan Lieberman-Berg
~hlieberman



Removed tag(s) upstream. Request was from Harlan Lieberman-Berg <hlieberman@setec.io> to control@bugs.debian.org. (Wed, 23 Nov 2016 21:36:09 GMT) (full text, mbox, link).


Added tag(s) fixed-upstream. Request was from Harlan Lieberman-Berg <hlieberman@setec.io> to control@bugs.debian.org. (Wed, 23 Nov 2016 21:36:09 GMT) (full text, mbox, link).


Reply sent to Barry Warsaw <barry@debian.org>:
You have taken responsibility. (Mon, 28 Nov 2016 17:24:06 GMT) (full text, mbox, link).


Notification sent to Chris Lamb <lamby@debian.org>:
Bug acknowledged by developer. (Mon, 28 Nov 2016 17:24:06 GMT) (full text, mbox, link).


Message #40 received at 844233-close@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
To: 844233-close@bugs.debian.org
Subject: Bug#844233: fixed in python-passlib 1.7.0-1
Date: Mon, 28 Nov 2016 17:20:28 +0000
Source: python-passlib
Source-Version: 1.7.0-1

We believe that the bug you reported is fixed in the latest version of
python-passlib, which is due to be installed in the Debian FTP archive.

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 844233@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Barry Warsaw <barry@debian.org> (supplier of updated python-passlib 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@ftp-master.debian.org)


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

Format: 1.8
Date: Mon, 28 Nov 2016 11:31:28 -0500
Source: python-passlib
Binary: python-passlib python3-passlib
Architecture: source all
Version: 1.7.0-1
Distribution: unstable
Urgency: medium
Maintainer: Barry Warsaw <barry@debian.org>
Changed-By: Barry Warsaw <barry@debian.org>
Description:
 python-passlib - comprehensive password hashing framework
 python3-passlib - comprehensive password hashing framework
Closes: 844233
Changes:
 python-passlib (1.7.0-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream release.  (Closes: #844233)
   * d/control:
     - Bump Standards-Version with no other changes necessary.
     - Bump debhelper version dependency to >= 9.
   * d/compat: Bump to version 9.
Checksums-Sha1:
 6e2302aff66f6710ca7616388f7d32e41944e4f3 2200 python-passlib_1.7.0-1.dsc
 a773592d9675c41465bd47c12f447e1100611703 637909 python-passlib_1.7.0.orig.tar.gz
 e88600745e5fad61fd7c22bfc941d1061d3432c4 14132 python-passlib_1.7.0-1.debian.tar.xz
 ef723d12c8edacd52031df79f07dca72e664db20 344072 python-passlib_1.7.0-1_all.deb
 140b4dab98780ce56774226fe41e00ccc6ac86a0 5558 python-passlib_1.7.0-1_amd64.buildinfo
 ebc4dea9b73ccd7162ecabbe2ee045bef93de0b7 343436 python3-passlib_1.7.0-1_all.deb
Checksums-Sha256:
 6b7cb14ec81c3afad61053a75f80801aaf974b935cf1eba45921a21f9b127d7b 2200 python-passlib_1.7.0-1.dsc
 0be4f6053357c4ebba5578a065fbdad75a844501d4c6d91d4a3a0c1594c6abed 637909 python-passlib_1.7.0.orig.tar.gz
 743c30d1d62e011f363474be1b721ca05e79abef4aa1f73c79a2db99343e19d0 14132 python-passlib_1.7.0-1.debian.tar.xz
 447021ec6e506ae49b5eb2b21b8007d4e0e16185fe046bdc83a473a3267f83ee 344072 python-passlib_1.7.0-1_all.deb
 6835f7a317283ce6784be0ce35ed5197311b053bfbd293be0a30c60711939e8f 5558 python-passlib_1.7.0-1_amd64.buildinfo
 772c5735a0a9133ad6fda4024a1ff4f2825ff5cd262db4b0e00591370c7c1178 343436 python3-passlib_1.7.0-1_all.deb
Files:
 f1a5d4655b594da594c7a640e49deac2 2200 python extra python-passlib_1.7.0-1.dsc
 3c3c5733f2ada427060c33b5ece0560f 637909 python extra python-passlib_1.7.0.orig.tar.gz
 9b43b70a54b87a420c89fe7351a0722b 14132 python extra python-passlib_1.7.0-1.debian.tar.xz
 ad7c6341f5f6e38f45ef4d6824cc2a87 344072 python extra python-passlib_1.7.0-1_all.deb
 7fe0ad8b505a220d41eb3e6416f34a00 5558 python extra python-passlib_1.7.0-1_amd64.buildinfo
 85b4c3a68af4d6666210299e37076d91 343436 python extra python3-passlib_1.7.0-1_all.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEhBcVftvnPZ6sHlObEm61Y6dLBr8FAlg8YYoACgkQEm61Y6dL
Br9KdhAAk4Y0gVi/lcwUhwdcqMH3LwSo/snVJ/kgtoZfDYedrZq8LCWpTypaoCzo
+EtRTxONvgldhUBaZv/8j1a0riiRLLeTw25I2OjKopEvsx9EpQI01E4ouyDRGai/
OOLP7XK8o4Ya6OZlSk+L6Tgc8/O4a6xlagj3vuwN/dMx2qZJ18njjn/KZLjamKr+
UCgN7grU3zebdhux1Z4/9eN4uzIFtY766LJWTUHbU6rS4k2i7pBoiHTrJYcYcMlH
qnO/UA9CTBTHxKVK3gOpFIE/aZDq6KTdyo9GYePdF47IOruR8Xm2QZjGfgZLkkH6
ENQLVOBzHgGedXQrobwmRhI5SfS79F6+2xeQg2eiHbgcgJqjEZu3mFDBMBHrvbxC
DvmellgyvHA/C6KxKAuDrDpeKfGQyTKSUIeuN43jBxKKPZJ6+CpCoLgqmvxWemdV
C83aqgq192MZElPeZOxu6rwQVm3dMLe10dxZTRCAY+4t9zkdnTxTz3N76vru/xEM
nEbCZUGQ9m2JswGr6VUqQqKxGbYCl4YREGYxsvSv1ADCGFxnJogtgl/QEUQEbw5O
1wVlUatuCijpNOVFPdOoO5eNcqs9uVyqD7zkEYk2AmHcjXAnATBP2cPYM7bgximW
KIT2ax2gz4ePNRZUYjvgiev1/NZmQR5xKd6w4FQYnbF8XfJz1PM=
=fSXq
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 29 Dec 2016 08:14:56 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Aug 19 15:11:31 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.