[Numpy-discussion] Non-deterministic test failure in master

Ondřej Čertík ondrej.certik@gmail....
Thu Jun 28 06:53:19 CDT 2012


Hi Nathaniel,

On Wed, Jun 27, 2012 at 11:22 AM, Nathaniel Smith <njs@pobox.com> wrote:
> According to the Travis-CI build logs, this code produces
> non-deterministic behaviour in master:
>
>  a = np.arange(5)
>  a[:3] = a[2:]
>  assert_equal(a, [2, 3, 4, 3, 4])
>
> Sometimes 'a' is [2, 3, 4, 3, 4], and sometimes it is [4, 3, 4, 3, 4].
> The latter is what you get if the assignment is done 'backwards',
> like:
>  a[2] = a[4]
>  a[1] = a[3]
>  a[0] = a[2]
>
> For example, in this build the above test failed on Python 3.2 (but
> passed on all other versions):
>  http://travis-ci.org/#!/numpy/numpy/jobs/1676766
> while in this build, it failed on Python 2.5 (but passed on all other versions):
>  http://travis-ci.org/#!/numpy/numpy/jobs/1722121
>
> Looks like we have a memcpy somewhere that should be a memmove?

I also noticed this failure a few days ago. What do you think is the
best way to debug this? I don't know how to reproduce it. Any ideas?

Ondrej


More information about the NumPy-Discussion mailing list