[Zope3-dev] MinimalMemoryStorage test failure in Zope 3

Marius Gedminas mgedmin@codeworks.lt
Mon, 30 Jun 2003 18:29:21 +0300


--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jun 25, 2003 at 04:48:52PM -0400, Tim Peters wrote:
> > BTW I occasionaly see other errors in the ZODB code as well, for
> > example:
>=20
> The actual failures you see are helpful; "for example" doesn't do anything
> to help resolve the ones you don't specifically list, of course.

They're not as easily reproducible, and I've never seen them before the
sprint.  Initially I even suspected my hardware, and did not save the
tracebacks.

> > testPackUndoLog (<class
> > 'zodb.storage.tests.test_demo.BasicDemoStorageTests'>) ...
> >
> > Failure in test testPackUndoLog (<class
> > 'zodb.storage.tests.test_demo.BasicDemoStorageTests'>) Traceback
> >   (most recent call last): File
> >     "/home/mg/Zope3/src/zodb/storage/tests/undo.py", line 810, in
> >   testPackUndoLog self.assertEqual(1, len(self._storage.undoLog()))
> >     File "/usr/lib/python2.2/unittest.py", line 286, in
> > failUnlessEqual raise self.failureException,
> > AssertionError: 1 !=3D 0
>=20
> That's a bad failure, and should never happen.  It used to fail on Windows
> because of the coarse granularity of time.time() on Windows, but that got
> fixed some time ago.  I never see this one fail anymore.

So is it limited granularity, or time going backwards that causes the
problem?

> With your HW under your OS and BIOS, after
>=20
>     x =3D time.time()
>     y =3D time.time()
>=20
> is it ever the case that
>=20
>     x > y
>=20
> is true?

I'm now running a script that does

    import time
    while 1:
        x =3D time.time()
        y =3D time.time()
        assert x <=3D y

So far no assertions have occurred.

> For example, some early laptops with "SpeedStep" chips had bugs in
> the BIOS that could cause time to appear to "run backwards" when the chip
> switched cycle rates.  That, or any other, cause for time running backwar=
ds
> could also cause any number of sporadic failures in ZODB tests.

On Wed, Jun 25, 2003 at 05:16:41PM -0400, Tres Seaver wrote:
> NTP, anyone?

NTP is running here, but AFAIU it doesn't actually cause the clock to
go backwards.  It uses adjtimex to slow down or speed up the clock
instead.

I'll write again when I have more information.  So far I've only managed
to reproduce a couple of TransactionErrors in a couple of threads (that
don't actually cause the test itself to fail) with the CVS HEAD today.

Marius Gedminas
--=20
Codeworks is available for Zope consulting -- http://www.codeworks.lt/

--HcAYCG3uE/tztfnV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/AFdRkVdEXeem148RAlM0AJ9oCtd4S+XSRzNq/q567CE3rAsXeACfUn8H
6Z8KVJlJDHV73JGLpFHZHoU=
=ixGV
-----END PGP SIGNATURE-----

--HcAYCG3uE/tztfnV--