# Crash with circular reference

**URL:** <https://discourse.julialang.org/t/crash-with-circular-reference/22631>\
**Category:** General Usage\
**Created:** [April 2, 2019, 8:43am UTC](https://discourse.julialang.org/t/crash-with-circular-reference/22631 "2019-04-02T08:43:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Post date:** [April 2, 2019, 8:43am UTC](https://discourse.julialang.org/t/crash-with-circular-reference/22631/1 "2019-04-02T08:43:43Z")

</div>

I occasionally (randomly) get a crash that output an error like:

```julia
Allocations: 135799378 (Pool: 135777856; Big: 21522); GC: 288
<?#0x11b44c4c0::<circular reference @-1>>
0x1268b5000: Queued root: 0x115864430 :: 0x10a764860 (bits: 3)
        of type Core.Compiler.InferenceResult
0x1268b5018: Queued root: 0x11a9f4eb0 :: 0x111a39040 (bits: 3)
        of type Array{Any, 1}
...

```

I never managed to reproduce or isolate the problem, it used to happen when using a function that was loading FASTA files but that got better when I installed v1.1. My question is, what does this circular reference means, what could cause such a crash ?

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [April 2, 2019, 11:50am UTC](https://discourse.julialang.org/t/crash-with-circular-reference/22631/2 "2019-04-02T11:50:54Z")

</div>

The circular references has nothing to do with the crash. There should have been more error messages above or below telling you this is a GC assertion, which is usually caused by incorrect use of unsafe interfaces including ccall.

---

<div class="post-metadata">

**Author:** ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Post date:** [April 2, 2019, 1:24pm UTC](https://discourse.julialang.org/t/crash-with-circular-reference/22631/3 "2019-04-02T13:24:13Z")

</div>

Ok thanks, I’m getting an Abort trap: 6 after the circular reference thing, so it looks to be some kind of C bug somewhere:

```julia
signal (6): Abort trap: 6
in expression starting at no file:0
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 131632358 (Pool: 131611586; Big: 20772); GC: 279
[1] 28470 abort /Applications/Julia-1.1.app/Contents/Resources/julia/bin/julia

```

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [April 2, 2019, 1:35pm UTC](https://discourse.julialang.org/t/crash-with-circular-reference/22631/4 "2019-04-02T13:35:09Z")

</div>

The abort is not due to c bug… The whole printing and the abort along with the message that should come immediately before the one you paste is due to Julia detecting some inconsistency, most likely due to incorrect usage of unsafe interface in your Julia code.
