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

Intermittent failure in math test #18598

Closed
martinholters opened this issue Sep 20, 2016 · 8 comments
Closed

Intermittent failure in math test #18598

martinholters opened this issue Sep 20, 2016 · 8 comments
Labels
test This change adds or pertains to unit tests

Comments

@martinholters
Copy link
Member

I just had a make test (against 0.6.0-dev.711) spitting out

    From worker 7:       * math                 Test Failed
    From worker 7:    Expression: lgamma(-300im) ≅ -473.1718507425924 - 1410.3490664555823im
    From worker 7:     Evaluated: -473.1718507425924 - 1410.349066455582im isequal -473.1718507425924 - 1410.3490664555823im
error in running finalizer: Base.MethodError(f=Base.#real(), args=(Base.RemoteChannel{Base.Channel{Int64}}(where=1, whence=1, id=2),))
error in running finalizer: Base.MethodError(f=Base.#real(), args=(Base.RemoteChannel{Base.Channel{Int64}}(where=1, whence=1, id=2),))
jl_uv_writecb() ERROR: bad file descriptor EBADF
jl_uv_writecb() ERROR: bad file descriptor EBADF
jl_uv_writecb() ERROR: bad file descriptor EBADF
jl_uv_writecb() ERROR: bad file descriptor EBADF
jl_uv_writecb() ERROR: bad file descriptor EBADF

some more pages of that line repeating, ending in

Exception running test math :
On worker 7:
LoadError: There was an error during testing
 in record at ./test.jl:397
 in do_test at ./test.jl:281
 in include_string at ./loading.jl:478
 in include_from_node1 at ./loading.jl:544
 in macro expansion at ./util.jl:232 [inlined]
 in runtests at /home/hol/Projects/julia/test/testdefs.jl:7
 in #619 at ./multi.jl:1425
 in run_work_thunk at ./multi.jl:1005
 in macro expansion at ./multi.jl:1425 [inlined]
 in #618 at ./event.jl:68
while loading /home/hol/Projects/julia/test/math.jl, in expression starting on line 658
ERROR: LoadError: Some tests exited with errors.
 in (::##11#18)() at /home/hol/Projects/julia/test/runtests.jl:72
 in cd(::##11#18, ::String) at ./file.jl:69
 in include_from_node1(::String) at ./loading.jl:541
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:326
while loading /home/hol/Projects/julia/test/runtests.jl, in expression starting on line 26
Makefile:12: recipe for target 'all' failed
make[1]: *** [all] Error 1
Makefile:569: recipe for target 'test' failed
make: *** [test] Error 2

(All other tests completed successfully, output omitted.)

Re-running the tests, everything looks fine. Can anyone make sense of that?

@tkelman
Copy link
Contributor

tkelman commented Sep 20, 2016

I've seen this too. It depends which tests you run in the same worker, and it started when #12563 was merged (cc @stevengj). It's reproducible 100% of the time if you do make testall1 and I'm currently running a little reducer loop to narrow that down to a specific subset.

edit: yeah, numbers and math in the same worker is enough

@tkelman tkelman added the test This change adds or pertains to unit tests label Sep 20, 2016
@martinholters
Copy link
Member Author

If that is any help, I had

    From worker 7:       * linalg/special        in  44.59 seconds, maxrss  240.78 MB
    From worker 7:       * linalg/lapack         in  57.78 seconds, maxrss  295.49 MB
    From worker 7:       * linalg/symmetric      in  26.01 seconds, maxrss  327.53 MB
    From worker 7:       * linalg/uniformscaling in  38.01 seconds, maxrss  363.84 MB
    From worker 7:       * inference             in   1.06 seconds, maxrss  364.09 MB
    From worker 7:       * keywordargs           in   1.88 seconds, maxrss  364.71 MB
    From worker 7:       * numbers               in  99.19 seconds, maxrss  475.17 MB
    From worker 7:       * copy                  in   1.98 seconds, maxrss  479.64 MB

on the same worker before the failure happened.

@pabloferz
Copy link
Contributor

pabloferz commented Sep 20, 2016

Shouldn't lgamma(-300im) ≅ -473.1718507425924 - 1410.3490664555823im be lgamma(-300im) ≈ -473.1718507425924 - 1410.3490664555823im?

Note the symbol for isapprox vs. the used, defined as isequal for the tests.

@pabloferz
Copy link
Contributor

pabloferz commented Sep 20, 2016

After #12563, is redefined in test/numbers.jl, whereas for test/math.jl it is ≅(a,b) = relerrc(a,b) ≤ 1e-13. So I'd guess when numbers is tested before math on the same worker it does not changes definition.

@pabloferz
Copy link
Contributor

Putting a big let block around those test files or making them modules should be two ways of fixing this.

@tkelman
Copy link
Contributor

tkelman commented Sep 20, 2016

@pabloferz yep that looks about right. I grepped for other uses of but must've missed that it was defined in both those test files. We could switch one of them to a different symbol, or not use const, or use a let block for one or both.

@tkelman
Copy link
Contributor

tkelman commented Sep 20, 2016

also x-ref #17435

@stevengj
Copy link
Member

stevengj commented Sep 20, 2016

Yeah, I probably should have used in numbers.jl anyway.

(The reason I don't use in math.jl is that the relerrc test is stronger: not only is the tolerance lower, but it checks that the relative error in both the real and imaginary parts is small independently.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This change adds or pertains to unit tests
Projects
None yet
Development

No branches or pull requests

4 participants