# Strange test failures on Julia 1.4, possibly related to ForwardDiff.jl

**URL:** <https://discourse.julialang.org/t/strange-test-failures-on-julia-1-4-possibly-related-to-forwarddiff-jl/36398>\
**Category:** General Usage\
**Created:** [March 23, 2020, 3:37pm UTC](https://discourse.julialang.org/t/strange-test-failures-on-julia-1-4-possibly-related-to-forwarddiff-jl/36398 "2020-03-23T15:37:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![s-broda](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/s-broda/32/3946_2.png) [@s-broda](https://discourse.julialang.org/u/s-broda)\
**Post date:** [March 23, 2020, 3:37pm UTC](https://discourse.julialang.org/t/strange-test-failures-on-julia-1-4-possibly-related-to-forwarddiff-jl/36398/1 "2020-03-23T15:37:36Z")

</div>

Hi all

[ARCHModels.jl](https://github.com/s-broda/ARCHModels.jl) (registered package) has test failures on Julia 1.4, see [here](https://travis-ci.org/github/s-broda/ARCHModels.jl/builds/665878618). Tests pass on 1.3 and on nightly.

The really strange thing is that I can reproduce this locally, but _only_ within Pkg.test; when I run the offending test in the REPL, it works fine (fresh Julia installation with no other packages installed).

The error is a singular Hessian computed with ForwardDiff.jl, but it doesn’t seem to be merely a numerical problem: When I add `@show` statements and run from the REPL, I get `H[1:r, 1:r] = [-1.2294260247147748 -2.1964515660007304; -2.1964515660007313 -5.541465030396839]`, which isn’t even close to singular (`H` is the Hessian). During testing, I get `H[1:r, 1:r] = [0.0 0.0; 0.0 1.0739314068747037e-16]`.

I have no idea how to debug this further, because it happens only when testing. Any help would be greatly appreciated.

Cheers,  
Simon

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 23, 2020, 3:40pm UTC](https://discourse.julialang.org/t/strange-test-failures-on-julia-1-4-possibly-related-to-forwarddiff-jl/36398/2 "2020-03-23T15:40:04Z")

</div>

> [@s-broda](#):
>
> , but _only_ within Pkg.test; when I run the offending test in the REP

`Pkg.test` runs with `checkbounds=yes` so that can sometimes explain things like this. Does it error in the REPL if you start `julia` with that flag?

---

<div class="post-metadata">

**Author:** ![s-broda](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/s-broda/32/3946_2.png) [@s-broda](https://discourse.julialang.org/u/s-broda)\
**Post date:** [March 23, 2020, 3:55pm UTC](https://discourse.julialang.org/t/strange-test-failures-on-julia-1-4-possibly-related-to-forwarddiff-jl/36398/3 "2020-03-23T15:55:04Z")

</div>

Thank you Frederik! That does trigger the error from the REPL.

I still have no idea why it’s failing on 1.4 but not on 1.3 or nightly, but at least that gives me chance to debug it 🙂

Thanks again!
