odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.38k stars 561 forks source link

src/checker.cpp(795): Assertion Failure: `e != nullptr` default_hasher #3123

Closed stu closed 1 month ago

stu commented 6 months ago

Expected Behavior

I'd expect its own demos to actually build out of the box....

download the ubuntu release 2024-01

cd examples
../odin build demo

/opt/odin-ubuntu-amd64-dev-2024-01/core/thread/thread.odin(56:16) Error: Undeclared name: Maybe
        init_context: Maybe(runtime.Context),
                      ^~~~^
/opt/odin-ubuntu-amd64-dev-2024-01/core/runtime/core.odin(151:13) Error: Undeclared name: Map_Info
        map_info: ^Map_Info,
                   ^~~~~~~^
/opt/odin-ubuntu-amd64-dev-2024-01/core/runtime/core.odin(315:13) Error: Undeclared name: Maybe
        size:      Maybe(int),
                   ^~~~^
/opt/odin-ubuntu-amd64-dev-2024-01/core/runtime/core.odin(316:13) Error: Undeclared name: Maybe
        alignment: Maybe(int),
                   ^~~~^
/opt/odin-ubuntu-amd64-dev-2024-01/core/fmt/fmt.odin(38:16) Error: Undeclared name: Maybe
        optional_len: Maybe(int),
                      ^~~~^
src/checker.cpp(795): Assertion Failure: `e != nullptr` default_hasher
Illegal instruction (core dumped)

this is gdb's backtracek

Thread 1 "odin" received signal SIGILL, Illegal instruction.
0x00005555555f863e in add_package_dependency(CheckerContext*, char const*, char const*) ()
(gdb) bt
#0  0x00005555555f863e in add_package_dependency(CheckerContext*, char const*, char const*) ()
#1  0x000055555564b375 in check_type_internal(CheckerContext*, Ast*, Type**, Type*) ()
#2  0x000055555564917a in check_type_expr(CheckerContext*, Ast*, Type*) ()
#3  0x0000555555616d17 in check_type(CheckerContext*, Ast*) ()
#4  0x00005555555fdd44 in check_expr_base(CheckerContext*, Operand*, Ast*, Type*) ()
#5  0x0000555555649794 in check_type_internal(CheckerContext*, Ast*, Type**, Type*) ()
#6  0x000055555564917a in check_type_expr(CheckerContext*, Ast*, Type*) ()
#7  0x00005555556177c1 in check_global_variable_decl(CheckerContext*, Entity*&, Ast*, Ast*) ()
#8  0x00005555556173f5 in check_entity_decl(CheckerContext*, Entity*, DeclInfo*, Type*) ()
#9  0x000055555558e557 in check_parsed_files(Checker*) ()
#10 0x000055555557b73c in main ()
JesseRMeyer commented 6 months ago

We can't reproduce this on ubuntu-latest, so we suspect poor interaction with the lowlatency kernel configuration.

stu commented 6 months ago

I found the problem, but dont understand why its a problem...

I did the initial post, off a directory mounted via NFS.

if I do it on a directory from the local fs, NOT mounted over the network, no error.

so I dont know WHY this specific error when on an NFS mount....

I also get the same error if I checkout the source and run build_odin.sh. i can 100% reproduce it every single time, just not sure how to narrow it down to help find the cause.

stu commented 1 month ago

this is no longer an issue and has at some point been resolved, so I'm closing it.