Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion Order == AtomicOrdering::NotAtomic && !isboxed && rhs.typ == jltype fails on some packages #47247

Closed
KristofferC opened this issue Oct 20, 2022 · 1 comment · Fixed by #47480
Labels
regression Regression in behavior compared to a previous version
Milestone

Comments

@KristofferC
Copy link
Sponsor Member

Example PkgEval run: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/c6440b9_vs_d0156b5/MarkdownAST.primary.log

Repro locally:

(jl_KaV2L5) pkg> test MarkdownAST
     Testing MarkdownAST
      Status `/tmp/jl_ojFOCg/Project.toml`
...
     Testing Running tests...
julia: /home/kc/julia/src/cgutils.cpp:1892: jl_cgval_t typed_store(jl_codectx_t&, llvm::Value*, llvm::Value*, jl_cgval_t, jl_cgval_t, jl_value_t*, llvm::MDNode*, llvm::MDNode*, llvm::Value*, bool, llvm::AtomicOrdering, llvm::AtomicOrdering, unsigned int, bool, bool, bool, bool, bool, bool, const jl_cgval_t*, const string&): Assertion `Order == AtomicOrdering::NotAtomic && !isboxed && rhs.typ == jltype' failed.

[189132] signal (6): Aborted
in expression starting at /home/kc/.julia/packages/MarkdownAST/EC78A/test/fromstdlib.jl:10
pthread_kill at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
raise at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7ff43862871a)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
typed_store at /home/kc/julia/src/cgutils.cpp:1892
emit_setfield at /home/kc/julia/src/cgutils.cpp:3628
emit_f_opfield at /home/kc/julia/src/codegen.cpp:3010
emit_call at /home/kc/julia/src/codegen.cpp:4133
emit_expr at /home/kc/julia/src/codegen.cpp:4995
emit_ssaval_assign at /home/kc/julia/src/codegen.cpp:4592
emit_stmtpos at /home/kc/julia/src/codegen.cpp:4827 [inlined]
emit_function at /home/kc/julia/src/codegen.cpp:7790
jl_emit_code at /home/kc/julia/src/codegen.cpp:8124
jl_emit_codeinst at /home/kc/julia/src/codegen.cpp:8172
jl_compile_workqueue at /home/kc/julia/src/codegen.cpp:8293
_jl_compile_codeinst at /home/kc/julia/src/jitlayers.cpp:203
jl_generate_fptr_impl at /home/kc/julia/src/jitlayers.cpp:432
jl_compile_method_internal at /home/kc/julia/src/gf.c:2158 [inlined]
jl_compile_method_internal at /home/kc/julia/src/gf.c:2099
_jl_invoke at /home/kc/julia/src/gf.c:2442 [inlined]
ijl_apply_generic at /home/kc/julia/src/gf.c:2632
jl_apply at /home/kc/julia/src/julia.h:1869 [inlined]

The packages that error with this are:

"StructTypes"
"MarkdownAST"
@KristofferC KristofferC added the regression Regression in behavior compared to a previous version label Oct 20, 2022
@KristofferC KristofferC added this to the 1.10 milestone Oct 20, 2022
@KristofferC KristofferC changed the title Assertion `Order == AtomicOrdering::NotAtomic && !isboxed && rhs.typ == jltype' fails on some packages Assertion Order == AtomicOrdering::NotAtomic && !isboxed && rhs.typ == jltype fails on some packages Oct 20, 2022
@KristofferC KristofferC modified the milestones: 1.10, 1.9 Oct 20, 2022
@apaz-cli
Copy link
Member

apaz-cli commented Nov 3, 2022

This error is very odd. For one, in rr when I continue without any breakpoints hoping to start from the end, I am unable to reverse-continue past syscall_traced(). I don't really know what to make of this, hoping that @Keno could shed some light on it. I saw that he submitted an issue to rr with a similar error.

To work around this, in rr I put a breakpoint at typed_store at /home/apaz-cli/julia/src/cgutils.cpp:1898. then proceeded to

define srch
>c
>p Order == AtomicOrdering::NotAtomic && !isboxed && rhs.typ == jltype
>end

and srch thought the entire replay. It hits 20 or so breakpoints, the error is printed, but the assertion is literally never false. This works the same in gdb, it's just normal forward debugging, but you have to deal with the repl.

In summary, we get an error about an assertion failure, but according to rr it never happens. I am using the latestd debug version of julia/master (If I don't use a debug version all the tests pass), and it behaves this same way across multiple machines.

I am unsure about what to do about an assertion error that rr cannot catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants