# Unreachable reached, v1.11.5: file github issue, or discuss here first?

**URL:** <https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668>\
**Category:** General Usage\
**Tags:** potential-bug\
**Created:** [July 12, 2025, 3:24pm UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668 "2025-07-12T15:24:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielSussman](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@DanielSussman](https://discourse.julialang.org/u/DanielSussman)\
**Post date:** [July 12, 2025, 3:24pm UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668/1 "2025-07-12T15:24:31Z")

</div>

Hi all,

Despite (or, in this case, almost certainly _because_ of) being fairly new to using Julia I seemed to have stumbled upon an “unreachable reached” crash. On the one hand, I understand this is cause for [celebration, etc](https://discourse.julialang.org/t/unreachable-reached-at-0x13929e935/38528/6), and that I would typically file an issue. On the other hand, the way I triggered it was a bit unusual, and I wasn’t sure if [this caveat applies](https://discourse.julialang.org/t/unreachable-reached-with-namedtuple-of-staticvector/16507/2).

The basic ingredients involve using Revise.jl to track a file where I define a struct, extend some of Base’s arithmetic operators for that struct, and then later remove one of those method definitions. Given that this involves an interaction with another package and isn’t a typical workflow, I wanted to ask here first if this is a known issue or if I should file a bug report on GitHub.

* * *

It took me some time to figure out exactly what steps got me to the crash, but after some tinkering I have the following pretty minimal working example. Four basic steps:

1. I create and save the following file in my text editor:

```julia
#test.jl --- I'm sure we can all guess what this originally looked like
import Base: *, ^ 

struct D<: Number #<: Number needed to trigger an ambiguity later 
    val::Float64
    deriv::Float64
end

*(x::D,y::D) = D(x.val*y.val,
                          x.val*y.deriv+x.deriv*y.val)

^(x::D,y::D) = D(x.val^y.val,
                        x.val^(y.val-1)*
                        (y.val*x.deriv + x.val*y.deriv*log(x.val))
                        )
^(x::D,n::Real) = D(x.val^n,n*x.val^(n-1)*x.deriv) # Problem line

function test()
    D(1.0,1.0)^2
end

```

1. I start a new Julia session, use Revise to includet this file, and run the test function:  
`$ julia --startup-file=no`  
`julia> using Revise`  
`julia> includet("test.jl")`  
`julia> test()`

This, of course, leads to a method error due to ambiguity.

> **REPL output of method error... we subtyped D, so ^(D, Real) and ^(Number,Integer) both fit**
>
> ERROR: MethodError: ^(::D, ::Int64) is ambiguous.
> 
> Candidates:  
> ^(x::D, n::Real)  
> @ Main ~/test/bug/test.jl:15  
> ^(x::Number, p::Integer)  
> @ Base intfuncs.jl:349
> 
> Possible fix, define  
> ^(::D, ::Integer)
> 
> Stacktrace:  
> [1] literal\_pow  
> @ ./intfuncs.jl:389 [inlined]  
> [2] test()  
> @ Main ~/test/bug/test.jl:18  
> [3] top-level scope  
> @ REPL[7]:1

1. I switch back to the test.jl file and comment out the second of the two exponentiation methods (the `^(x::D,n::Real) = D(x.val^n,n*x.val^(n-1)*x.deriv)` one, that is), and save the file.

2. I go back to the running REPL. `julia> test()` reaches the unreachable:

> **Unreachable reached at 0x79faeaa82458**
>
> [1683] signal 4 (2): Illegal instruction  
> in expression starting at REPL[2]:1  
> literal\_pow at ./intfuncs.jl:389 [inlined]  
> test at /home/daniel/test/bug/test.jl:18  
> unknown function (ip: 0x79faeaa8247f)  
> jl\_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]  
> do\_call at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:126  
> eval\_value at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:223  
> eval\_stmt\_value at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:174 [inlined]  
> eval\_body at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:666  
> jl\_interpret\_toplevel\_thunk at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/interpreter.c:824  
> jl\_toplevel\_eval\_flex at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:943  
> jl\_toplevel\_eval\_flex at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:886  
> jl\_toplevel\_eval\_flex at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:886  
> jl\_toplevel\_eval\_flex at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:886  
> ijl\_toplevel\_eval\_in at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/toplevel.c:994  
> eval at ./boot.jl:430 [inlined]  
> eval\_user\_input at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:261  
> repl\_backend\_loop at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:368  
> #start\_repl\_backend#59 at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:343  
> start\_repl\_backend at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:340  
> #run\_repl#76 at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:500  
> run\_repl at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:486  
> jfptr\_run\_repl\_10123.1 at /home/daniel/.julia/juliaup/julia-1.11.5+0.x64.linux.gnu/share/julia/compiled/v1.11/REPL/u0gqU\_4x0TT.so (unknown line)  
> #1150 at ./client.jl:446  
> jfptr\_YY.1150\_14797.1 at /home/daniel/.julia/juliaup/julia-1.11.5+0.x64.linux.gnu/share/julia/compiled/v1.11/REPL/u0gqU\_4x0TT.so (unknown line)  
> jl\_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]  
> jl\_f\_\_call\_latest at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/builtins.c:875  
> #invokelatest#2 at ./essentials.jl:1055 [inlined]  
> invokelatest at ./essentials.jl:1052 [inlined]  
> run\_main\_repl at ./client.jl:430  
> repl\_main at ./client.jl:567 [inlined]  
> \_start at ./client.jl:541  
> jfptr\_\_start\_73430.1 at /home/daniel/.julia/juliaup/julia-1.11.5+0.x64.linux.gnu/lib/julia/sys.so (unknown line)  
> jl\_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]  
> true\_main at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/jlapi.c:900  
> jl\_repl\_entrypoint at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/jlapi.c:1059  
> main at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/cli/loader\_exe.c:58  
> unknown function (ip: 0x79faf722a1c9)  
> \_\_libc\_start\_main at /lib/x86\_64-linux-gnu/libc.so.6 (unknown line)  
> unknown function (ip: 0x4010b8)  
> Allocations: 1309353 (Pool: 1309266; Big: 87); GC: 2  
> Illegal instruction (core dumped)

I can, of course, give extra context from versioninfo, etc, if that’s relevant – for reference I was able to reproduce this from the above steps on both windows 11 and also WSL2 running Ubuntu 24.01. This is obviously not a bug that affects my normal workflow or what I actually want to do with the language, I just stumbled into it while fumbling around. Thanks for your time!

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [July 12, 2025, 3:58pm UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668/2 "2025-07-12T15:58:51Z")

</div>

Looks like a bug to me; commenting out a method and having Revise reload the functions should not cause an unreachable.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [July 12, 2025, 8:38pm UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668/3 "2025-07-12T20:38:09Z")

</div>

I also hit an unreachable by pasting the step 1 code into the REPL, not using Revise at all, and manually deleting that method, though the printout is slightly different (v1.11.6, v1.10.10, v1.9.4, Windows 11). This issue thus belongs with base Julia, not Revise. Same result if I omitted `--startup-file=no` of the `julia` command.

```julia
julia> methods(^)[40] # omitted prior, long methods(^) printout where I read this, important to verify
^(x::D, n::Real)
     @ Main REPL[5]:1

julia> Base.delete_method(methods(^)[40]) # internal, usually use Revise

julia> test()
Unreachable reached at 0000029d5f495c1c

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ILLEGAL_INSTRUCTION at 0x29d5f495c1c -- literal_pow at .\intfuncs.jl:389 [inlined]
test at .\REPL[6]:2
...

```

Didn’t try this as thoroughly, but this variant of `test` doesn’t go through `literal_pow`, and I still ran into an unreachable:

```julia
function test(x=2)
    D(1.0,1.0)^x
end

```

and it complains about `test` instead of an inlined `literal_pow`:

```julia
...
Exception: EXCEPTION_ILLEGAL_INSTRUCTION at 0x255251768ee -- test at .\REPL[9]:2
in expression starting at REPL[13]:1
test at .\REPL[9]:2
...

```

---

<div class="post-metadata">

**Author:** ![DanielSussman](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@DanielSussman](https://discourse.julialang.org/u/DanielSussman)\
**Post date:** [July 12, 2025, 10:41pm UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668/4 "2025-07-12T22:41:33Z")

</div>

Thanks for confirming! I hadn’t even thought to try skipping the Revise part and manually deleting the method.

Anyway, I guess that makes this pretty definitively part of Base, so I’ll post an issue.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [July 12, 2025, 11:17pm UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668/5 "2025-07-12T23:17:44Z")

</div>

Just for fun, this even happens with totally new annotated types and no number-crunching. The `Revise.includet` equivalent as stated in the post has the same outcome.

```julia
julia> begin
       abstract type AbstractBlah end
       struct Blah<:AbstractBlah end
       foo(::Blah, ::AbstractBlah) = 1
       foo(::AbstractBlah, ::Blah) = -1
       test() = foo(Blah(), Blah())
       end
test (generic function with 1 method)

julia> foo(Blah(), Blah())
ERROR: MethodError: foo(::Blah, ::Blah) is ambiguous.

Candidates:
  foo(::AbstractBlah, ::Blah)
    @ Main REPL[1]:5
  foo(::Blah, ::AbstractBlah)
    @ Main REPL[1]:4

Possible fix, define
  foo(::Blah, ::Blah)

Stacktrace:
 [1] top-level scope
   @ REPL[2]:1

julia> test() # same outcome as expected from forwarding to same call
ERROR: MethodError: foo(::Blah, ::Blah) is ambiguous.

Candidates:
  foo(::AbstractBlah, ::Blah)
    @ Main REPL[1]:5
  foo(::Blah, ::AbstractBlah)
    @ Main REPL[1]:4

Possible fix, define
  foo(::Blah, ::Blah)

Stacktrace:
 [1] test()
   @ Main .\REPL[1]:6
 [2] top-level scope
   @ REPL[3]:1

julia> Base.delete_method(methods(foo)[2]) # no Base methods to avoid deleting

julia> foo(Blah(), Blah()) # properly invalidated previous MethodError call
-1

julia> test()

Unreachable reached at 00000204af55136f

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ILLEGAL_INSTRUCTION at 0x204af55136f -- test at .\REPL[1]:6
in expression starting at REPL[6]:1
test at .\REPL[1]:6
unknown function (ip: 00000204af5513a4)
jl_apply at C:/workdir/src\julia.h:2157 [inlined]
...

```

---

<div class="post-metadata">

**Author:** ![DanielSussman](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@DanielSussman](https://discourse.julialang.org/u/DanielSussman)\
**Post date:** [July 13, 2025, 12:14am UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668/6 "2025-07-13T00:14:23Z")

</div>

Ha — gets right to the root! Very slick

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [July 14, 2025, 11:30pm UTC](https://discourse.julialang.org/t/unreachable-reached-v1-11-5-file-github-issue-or-discuss-here-first/130668/7 "2025-07-14T23:30:17Z")

</div>

Linking the open issue back here for reader convenience, has both `Revise.includet` and `Base.delete_method` MWEs from this thread:  
[Unreachable reached by deleting an extended method (v1.11.5) · Issue #58986 · JuliaLang/julia](https://github.com/julialang/julia/issues/58986)  
Looking forward to even more Revise improvements
