Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on 32-bit Fedora/RHEL nightlies #9107

Closed
nalimilan opened this issue Nov 22, 2014 · 14 comments
Closed

Failure on 32-bit Fedora/RHEL nightlies #9107

nalimilan opened this issue Nov 22, 2014 · 14 comments
Labels
domain:randomness Random number generation and the Random stdlib system:32-bit Affects only 32-bit systems

Comments

@nalimilan
Copy link
Member

The Fedora/RHEL nightlies fail on 32-bit since 2014-11-21 (last good build happened on 2014-11-19 at 18:48 UTC):

/builddir/build/BUILD/julia/build/usr/bin/julia --check-bounds=yes -f ./runtests.jl arrayops
     �[1m*�[0m �[31marrayops�[0m
exception on 1: ERROR: InexactError()
while loading arrayops.jl, in expression starting on line 298
ERROR: InexactError()
while loading arrayops.jl, in expression starting on line 298
while loading /builddir/build/BUILD/julia/test/runtests.jl, in expression starting on line 42
make: *** [arrayops] Error 1

https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/fedora-20-i386/julia-0.4.0-0.20141121.el7.centos/build.log

EDIT: the last successful build was not one, but two days before

@ivarne ivarne added the system:32-bit Affects only 32-bit systems label Nov 22, 2014
@tkelman
Copy link
Contributor

tkelman commented Nov 22, 2014

I can't reproduce this. It might be specific to the build flags you're using on Fedora, or maybe the system libraries you're using (LLVM maybe?).

@nalimilan
Copy link
Member Author

This is with system LLVM 3.4 and 3.5. All libraries are the system's, gcc is 4.8. You can see the flags in the above link, but nothing fancy.

Ah, with LLVM 3.5 the stracktrace is much better:

/builddir/build/BUILD/julia/build/usr/bin/julia --check-bounds=yes -f ./runtests.jl arrayops
     �[1m*�[0m �[31marrayops�[0m
exception on 1: ERROR: InexactError()
 in rand! at ./random.jl:252
 in anonymous at ./no file:299
 in runtests at /builddir/build/BUILD/julia/test/testdefs.jl:6
 in anonymous at ./multi.jl:632
 in run_work_thunk at ./multi.jl:593
 in remotecall_fetch at ./multi.jl:666
 in remotecall_fetch at ./multi.jl:681
 in anonymous at ./task.jl:1450
while loading arrayops.jl, in expression starting on line 298
ERROR: InexactError()
 in rand! at ./random.jl:252
 in anonymous at ./no file:299
 in runtests at /builddir/build/BUILD/julia/test/testdefs.jl:6
 in anonymous at ./multi.jl:632
 in run_work_thunk at ./multi.jl:593
 in remotecall_fetch at ./multi.jl:666
 in remotecall_fetch at ./multi.jl:681
 in anonymous at ./task.jl:1450
while loading arrayops.jl, in expression starting on line 298
while loading /builddir/build/BUILD/julia/test/runtests.jl, in expression starting on line 42
Makefile:9: recipe for target 'arrayops' failed
make: *** [arrayops] Error 1

So looks like it's related to random numbers. @rfourquet?

@tkelman
Copy link
Contributor

tkelman commented Nov 22, 2014

Ah yes, there have been a bunch of changes there recently. See the recently added RNG label https://github.com/JuliaLang/julia/issues?q=label%3ARNG+. I wonder whether any of those changes involve the way we build dsfmt? You package that library separately right?

@nalimilan
Copy link
Member Author

You package that library separately right?

Right.

@nalimilan nalimilan added the domain:randomness Random number generation and the Random stdlib label Nov 22, 2014
@nalimilan
Copy link
Member Author

random.jl:252 is this:

 rand!(mt, A) # must not segfault even if Int(pointer(A)) % 16 != 0

rand!(mt, A) # must not segfault even if Int(pointer(A)) % 16 != 0

So this may well be related to #9037

@ViralBShah
Copy link
Member

We only patch dsfmt to change a few static methods to extern so that they can be called.

Cc @rfourquet

@nalimilan
Copy link
Member Author

We only patch dsfmt to change a few static methods to extern so that they can be called.

Ah, so this means I need to export them from Fedora's dSFMT too. Will have a look.

@rfourquet
Copy link
Member

@nalimilan Could you tell for which value(s) of A (loop variable) the test fails? Also, could it be that the random tests failed before 2014-11-19, but are noticed only now because of 4125f4c ?

@nalimilan
Copy link
Member Author

@rfourquet Actually my reading of the backtrace was wrong. ./random.jl points to base/random.jl, not tests/random.jl. The random test was already run and passes, both before and after commit 4125f4c, as I needed to use a hardcoded list of tests. The only failure is in the arrayops test.

So the real failing call is unsafe_copy!(pA, pA2, n2):

unsafe_copy!(pA, pA2, n2)

@rfourquet
Copy link
Member

I also suspected unsafe_copy! for its line number, but I think it gets called only via line 252 of test/random.jl anyway... So I have no idea why InexactError() is triggered in this call. Could you run this minimal test:

 c8 = zeros(UInt8, 8001)
f1 = Ptr{Float64}(pointer(c8)) + 1
f8 = Ptr{Float64}(pointer(c8)) + 8
f16 = Ptr{Float64}(pointer(c8)) + 16
unsafe_copy!(f1, f16, 998)
unsafe_copy!(f8, f16, 998)

It reproduces the conditions of the random tests WRT unsafe_copy!.

@nalimilan
Copy link
Member Author

@rfourquet The test in your comment passes. But I don't think the problem is related to tests/random.jl:252, since that test passes too.

@nalimilan
Copy link
Member Author

Fixed by 8b63c51 (cf. #9040)

@rfourquet
Copy link
Member

@nalimilan so this can be closed?

@nalimilan
Copy link
Member Author

Right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:randomness Random number generation and the Random stdlib system:32-bit Affects only 32-bit systems
Projects
None yet
Development

No branches or pull requests

5 participants