# Tips/guidance for identifying the source of a deadlock when multithreading?

**URL:** <https://discourse.julialang.org/t/tips-guidance-for-identifying-the-source-of-a-deadlock-when-multithreading/32358>\
**Category:** General Usage\
**Tags:** question, parallel, multithreading, debugging\
**Created:** [December 16, 2019, 10:34pm UTC](https://discourse.julialang.org/t/tips-guidance-for-identifying-the-source-of-a-deadlock-when-multithreading/32358 "2019-12-16T22:34:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlandau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vlandau/32/8986_2.png) [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Post date:** [December 16, 2019, 10:34pm UTC](https://discourse.julialang.org/t/tips-guidance-for-identifying-the-source-of-a-deadlock-when-multithreading/32358/1 "2019-12-16T22:34:27Z")

</div>

I suspect that my Julia package, [Omniscape.jl](https://github.com/Circuitscape/Omniscape.jl), is running into a deadlock when testing on Windows in Julia 1.3 (everything passes in 1.2) in Travis and Appveyor. Basically, it just hangs a few dozen iterations into a @threads for loop. This never happens when parallel processing is not enabled.

Tests pass locally, so I think it has to do with the architecture of the VMs, and debugging has therefore been tricky for me.

I’m wondering if anyone might have some advice for me as I try to identify what might be going on.

The threaded for loop is [here](https://github.com/Circuitscape/Omniscape.jl/blob/master/src/run_omniscape.jl#L204-L234), and the function it calls is [here](https://github.com/Circuitscape/Omniscape.jl/blob/master/src/functions.jl#L370-L510), fwiw.

Thanks for any help!

- Vincent
