[Biopython-dev] curious error from HMM unit test
eric.talevich at gmail.com
Mon Jan 17 16:17:14 UTC 2011
On Mon, Jan 17, 2011 at 8:54 AM, Peter <biopython at maubp.freeserve.co.uk>wrote:
> Hi all,
> There was a curious failure under one of the buildslaves running
> Jython 2.5.2rc3 on 64bit Linux:
> The error message is rather odd, since k is defined as the outer loop
> variable, see:
> This is in the HMM code, so due to the stochastic nature we expect
> each run of test may take slightly different branches through the
> code. We haven't altered this code for a while, so this is either a
> long standing issue, or perhaps indicative of a problem in Jython
> 2.5.2rc3 instead (although I don't see any open bugs relevant). I've
> logged into the buildslave and re-run test_HMMCasino.py under Jython
> about 30 times - all fine. Rerunning the build also came up clear.
> Has anyone got any insight into what might be going on? Unless it
> happens again maybe it was a fluke (cosmic ray, bad ram, etc).
It could have been an exotic bug in Jython (or its interactions with the
JVM) where the JIT or garbage collector is removing local variables too
early. I don't see how you could provide a "fix" for it in Biopython, since
k definitely exists at that point in the loop in any valid Python and Jython
almost always handles it correctly.
Maybe you could seed the RNG at the start of the unit test to ensure the
same paths are always taken?
More information about the Biopython-dev