Coder Social home page Coder Social logo

Comments (16)

gbaraldi avatar gbaraldi commented on September 23, 2024

Can you reproduce on the backports-release-1.11 branch?
Locally I can't

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

I made a comment about git clean -f -x fixing it, but it turns out a script that I thought was supposed to add a symlink to my Make.user doesn't, so the rebuild wasn't using LLVM assertions.

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

FWIW, my Make.user is

> cat Make.user
JULIA_CPU_TARGET=native
MARCH=native
USECCACHE=1
# FORCE_ASSERTIONS=1
LLVM_ASSERTIONS=1

I reproduce on both the backports-release-1.11 branch on both AArch64-linux and x86-64-linux.

from julia.

gbaraldi avatar gbaraldi commented on September 23, 2024

Still can't repro with

julia> versioninfo()
Julia Version 1.11.0-beta1.25
Commit 6792cb45d7* (2024-04-25 12:40 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 Γ— 12th Gen Intel(R) Core(TM) i5-12600K
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)

from julia.

KristofferC avatar KristofferC commented on September 23, 2024

Cannot repro either, neither on mac M1 nor :x86_64.

from julia.

gbaraldi avatar gbaraldi commented on September 23, 2024

Can you remove your LD_LIBRARY_PATH? It might be a libstdc++ issue

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

I did make cleanall followed by

> LD_LIBRARY_PATH="" time make -j(nproc)

Same assertion failure.

> LD_LIBRARY_PATH="" $HOME/Documents/languages/juliamaster/usr/bin/julia -O3 -Cnative,-prefer-256-bit -q --startup=no
Precompiling InteractiveUtils...
  3 dependencies successfully precompiled in 5 seconds
Precompiling REPL...
Info Given REPL was explicitly requested, output will be shown live 
Unhandled Task ERROR: IOError: stream is closed or unusable
Stacktrace:
 [1] check_open
   @ ./stream.jl:388 [inlined]
 [2] uv_write_async(s::Base.TTY, p::Ptr{UInt8}, n::UInt64)
   @ Base ./stream.jl:1099
 [3] uv_write(s::Base.TTY, p::Ptr{UInt8}, n::UInt64)
   @ Base ./stream.jl:1060
 [4] unsafe_write(s::Base.TTY, p::Ptr{UInt8}, n::UInt64)
   @ Base ./stream.jl:1145
 [5] write
   @ ./strings/io.jl:248 [inlined]
 [6] write
   @ ./io.jl:794 [inlined]
 [7] (::REPL.Precompile.var"#4#10"{Task, Base.BufferStream, Base.Process, Base.TTY})()
   @ REPL.Precompile ~/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/precompile.jl:138
  3 dependencies successfully precompiled in 49 seconds. 3 already precompiled.
  1 dependency had output during precompilation:
β”Œ REPL
β”‚  [Output was shown above]
β””  
julia> versioninfo()
Julia Version 1.11.0-beta1.25
Commit 6792cb45d7 (2024-04-25 12:40 UTC)
Platform Info:
  OS: Linux (x86_64-redhat-linux)
  CPU: 28 Γ— Intel(R) Core(TM) i9-9940X CPU @ 3.30GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake-avx512)
Threads: 28 default, 0 interactive, 14 GC (on 28 virtual cores)
Environment:
  JULIA_PATH = @.
  LD_LIBRARY_PATH = 
  JULIA_NUM_THREADS = 28
  LD_UN_PATH = /usr/local/lib/x86_64-unknown-linux-gnu/:/usr/local/lib/

julia> [1, 2][3]
Expected<T> must be checked before access or destruction.
Unchecked Expected<T> contained error:
No such file or directory
[63058] signal 6 (-6): Aborted
in expression starting at none:0
unknown function (ip: 0x7f5884679144)
gsignal at /lib64/libc.so.6 (unknown line)
abort at /lib64/libc.so.6 (unknown line)
fatalUncheckedExpected at /home/chriselrod/Documents/languages/juliamaster/usr/include/llvm/Support/Error.h:707
assertIsChecked at /home/chriselrod/Documents/languages/juliamaster/usr/include/llvm/Support/Error.h:714 [inlined]
moveAssign<llvm::object::OwningBinary<llvm::object::ObjectFile> > at /home/chriselrod/Documents/languages/juliamaster/usr/include/llvm/Support/Error.h:653 [inlined]
operator= at /home/chriselrod/Documents/languages/juliamaster/usr/include/llvm/Support/Error.h:545 [inlined]
find_object_file at /home/chriselrod/Documents/languages/juliamaster/src/debuginfo.cpp:955 [inlined]
jl_dylib_DI_for_fptr at /home/chriselrod/Documents/languages/juliamaster/src/debuginfo.cpp:1134
jl_getDylibFunctionInfo at /home/chriselrod/Documents/languages/juliamaster/src/debuginfo.cpp:1174 [inlined]
jl_getFunctionInfo_impl at /home/chriselrod/Documents/languages/juliamaster/src/debuginfo.cpp:1247
ijl_lookup_code_address at /home/chriselrod/Documents/languages/juliamaster/src/stackwalk.c:589
lookup at ./stacktraces.jl:108
stacktrace at ./stacktraces.jl:164
stacktrace at ./stacktraces.jl:162 [inlined]
scrub_repl_backtrace at ./client.jl:96
jfptr_scrub_repl_backtrace_11771 at /home/chriselrod/.julia/compiled/v1.11/REPL/u0gqU_lYOjD.so (unknown line)
scrub_repl_backtrace at ./client.jl:103
jfptr_scrub_repl_backtrace_71006 at /home/chriselrod/Documents/languages/juliamaster/usr/lib/julia/sys.so (unknown line)
print_response at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:379
#70 at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:355
jfptr_YY.70_11171 at /home/chriselrod/.julia/compiled/v1.11/REPL/u0gqU_lYOjD.so (unknown line)
with_repl_linfo at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:640
jfptr_with_repl_linfo_11242 at /home/chriselrod/.julia/compiled/v1.11/REPL/u0gqU_lYOjD.so (unknown line)
print_response at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:353
do_respond at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:982
jfptr_do_respond_11305 at /home/chriselrod/.julia/compiled/v1.11/REPL/u0gqU_lYOjD.so (unknown line)
jl_apply at /home/chriselrod/Documents/languages/juliamaster/src/julia.h:2155 [inlined]
jl_f__call_latest at /home/chriselrod/Documents/languages/juliamaster/src/builtins.c:875
#invokelatest#2 at ./essentials.jl:1030 [inlined]
invokelatest at ./essentials.jl:1027 [inlined]
run_interface at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2748
jfptr_run_interface_9838 at /home/chriselrod/.julia/compiled/v1.11/REPL/u0gqU_lYOjD.so (unknown line)
run_frontend at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1407
#75 at /home/chriselrod/Documents/languages/juliamaster/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:457
jfptr_YY.75_11212 at /home/chriselrod/.julia/compiled/v1.11/REPL/u0gqU_lYOjD.so (unknown line)
jl_apply at /home/chriselrod/Documents/languages/juliamaster/src/julia.h:2155 [inlined]
start_task at /home/chriselrod/Documents/languages/juliamaster/src/task.c:1202
Allocations: 2755189 (Pool: 2755119; Big: 70); GC: 4
fish: Job 1, 'LD_LIBRARY_PATH="" $HOME/Docume…' terminated by signal SIGABRT (Abort)
chriselrod@fedora ~/D/l/juliamaster (backports-release-1.11) [SIGABRT]> 

from julia.

gbaraldi avatar gbaraldi commented on September 23, 2024

Any weird LD_PRELOAD ?

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

No.
But is there a reason to think LD_PRLOAD (or previously, LD_LIBRARY_PATH) would be a problem?

The issue is that Unchecked == true in llvm::Expected, so

  void assertIsChecked() const {
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
    if (LLVM_UNLIKELY(Unchecked))
      fatalUncheckedExpected();
#endif
  }

fires.

Within this Error.h, I can see that it is initialized to true.
It can be set to false via takeError() or possibly on bool conversion if HasError is false.

from julia.

gbaraldi avatar gbaraldi commented on September 23, 2024

But why is this only reproing for you πŸ€”

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

One possibility is

#if !defined(NDEBUG) // Needed only with LLVM assertion build
    consumeError(err.takeError());
#endif

from Julia's src/debuginfo.cpp +712.
I've not looked closely at control flow, however, this pattern looks problematic.
That is, takeError() will only get called with we are building Julia with asserts (which I didn't do, because Julia got compilation errors with asserts for me).

That is, without an asserts build of Julia, takeError() will not be called.
With an asserts build of LLVM, takeError() must be called to set Unchecked=false.

So, to clarify, did you:

  1. Not enable Julia asserts
  2. Enable LLVM asserts

as I said here:
#54310 (comment)

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

If that configuration isn't supported, I'll look at the compilation failure (which looked like a "most vexing parse" bug, i.e. there was an assert that was being parsed as a function declaration).

from julia.

gbaraldi avatar gbaraldi commented on September 23, 2024

I tried that yeah

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

I can't buidl the backports-release-1.11 branch or release-1.11 anymore:

/home/chriselrod/Documents/languages/juliamaster/src/stackwalk.c: In function 'jl_rec_backtrace':
/home/chriselrod/Documents/languages/juliamaster/src/stackwalk.c:922:26: error: initialization of 'mcontext_t *' from incompatible pointer type 'struct unw_sigcontext *' [-Wincompatible-pointer-types]
  922 |         mcontext_t *mc = &c.uc_mcontext;
      |                          ^

Can't build Julia with asserts:

In file included from /home/chriselrod/Documents/languages/juliamaster/src/julia_assert.h:17,
                 from /home/chriselrod/Documents/languages/juliamaster/src/jltypes.c:16:
/home/chriselrod/Documents/languages/juliamaster/src/jltypes.c: In function 'jl_cache_type_':
/home/chriselrod/Documents/languages/juliamaster/src/jltypes.c:1209:12: error: implicit declaration of function 'is_cacheable' [-Wimplicit-function-declaration]
 1209 |     assert(is_cacheable(type));
      |            ^~~~~~~~~~~~

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

I tried that yeah

Did you make cleanall before rebuilding?

from julia.

chriselrod avatar chriselrod commented on September 23, 2024

I got it building locally with Julia asserts and no crashes.

from julia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.