-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
debug repl broken with mac llvm-gcc #523
Comments
I can confirm that I'm getting this too. Very strange. |
It's not very helpful, but this is the backtrace I get in gdb:
|
Could this be cause by the same problem as #416? Also, can you try building llvm in debug mode and uncomment the following line in codegen.cpp:
|
No, complex expressions fail also, I just wanted to show it fails for even the simplest test case. That line gets included automatically on a debug build. Building llvm in debug mode with assertions gives the same result (aside from being painfully slow). |
Does gdb show a better backtrace in debug mode? |
No, it's the same. It's a known issue that gdb can't use the symbolic info for JIT code on Mac. |
Oh, I didn't know that Macs have a different object format. I personally don't use macs and just assumed it would be similar. I'll see if I can replicate it on my Linux machiene. |
@vtjnash Are you using gdb version 7.0 or newer (that's the version that added JIT support)? |
I wasn't. But just tried gdb 7.3, and it seems they haven't added support for JIT on mac yet. Also tried lldb, but it wasn't much help either (aside from finding a different potential, minor bug :). I haven't found a way of replicating it on my linux box. Addendum: this happens with just hitting enter in the repl with no input. It does not happen with "./julia -b" but does with "./julia -J sys0.ji". |
Is it possible that |
That didn't work either. I don't know how this is useful, but by some magic incantation, uncommenting #define JL_TRACE in gf.c can make it go away. |
With the latest code, I'm getting basically the same backtrace, but now I'm almost getting the prompt back too:
|
debug build is working again in the REPL. I'm not sure if this ended up getting fixed somewhere, or if is simply hidden. |
I now believe the fault lies in the restore_stack function. It was occurring with a debug build for the uv branch, so I think I tracked it down to the value (t->stackbase-t->ssize) getting written into memory just after finishing the memcpy and just before we try to longjmp. Apparently it happened to pick the eventual stack pointer to overwrite. I'm not sure how. But moving the offset in the comparison of &_x seems to work to give the system enough space to not break: |
Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: cb602d7 New commit: a09f90b Julia version: 1.12.0-DEV SparseArrays version: 1.12.0 Bump invoked by: @dkarrasch Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@cb602d7...a09f90b ``` $ git log --oneline cb602d7..a09f90b a09f90b Adjust matvec and matmatmul! to new internal LinAlg interface (#519) 3b30333 ci: run aqua test as a standalone ci job (#537) df0a154 Add versioned Manifest files to .gitignore (#534) 4606755 Extend `copytrito!` for a sparse source (#533) 33fbc75 SparseMatrixCSC constructor with a Tuple of Integers (#523) 08d6ae1 CI: don't run `threads` tests in Windows GHA CI (attempt 2) (#530) 7408e4b Revert "Don't fail CI if codecov upload fails." (#527) 287e406 Bump julia-actions/setup-julia from 1 to 2 (#524) b5de0da Don't fail CI if codecov upload fails. (#525) 78dde4c cast to Float64 directly instead of using float (#521) a5e95ec CI: Add Apple Silicon (macOS aarch64) to the CI matrix (#505) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
…aLang#54406) Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: cb602d7 New commit: a09f90b Julia version: 1.12.0-DEV SparseArrays version: 1.12.0 Bump invoked by: @dkarrasch Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@cb602d7...a09f90b ``` $ git log --oneline cb602d7..a09f90b a09f90b Adjust matvec and matmatmul! to new internal LinAlg interface (JuliaLang#519) 3b30333 ci: run aqua test as a standalone ci job (JuliaLang#537) df0a154 Add versioned Manifest files to .gitignore (JuliaLang#534) 4606755 Extend `copytrito!` for a sparse source (JuliaLang#533) 33fbc75 SparseMatrixCSC constructor with a Tuple of Integers (JuliaLang#523) 08d6ae1 CI: don't run `threads` tests in Windows GHA CI (attempt 2) (JuliaLang#530) 7408e4b Revert "Don't fail CI if codecov upload fails." (JuliaLang#527) 287e406 Bump julia-actions/setup-julia from 1 to 2 (JuliaLang#524) b5de0da Don't fail CI if codecov upload fails. (JuliaLang#525) 78dde4c cast to Float64 directly instead of using float (JuliaLang#521) a5e95ec CI: Add Apple Silicon (macOS aarch64) to the CI matrix (JuliaLang#505) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
…aLang#54406) Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: cb602d7 New commit: a09f90b Julia version: 1.12.0-DEV SparseArrays version: 1.12.0 Bump invoked by: @dkarrasch Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaSparse/SparseArrays.jl@cb602d7...a09f90b ``` $ git log --oneline cb602d7..a09f90b a09f90b Adjust matvec and matmatmul! to new internal LinAlg interface (JuliaLang#519) 3b30333 ci: run aqua test as a standalone ci job (JuliaLang#537) df0a154 Add versioned Manifest files to .gitignore (JuliaLang#534) 4606755 Extend `copytrito!` for a sparse source (JuliaLang#533) 33fbc75 SparseMatrixCSC constructor with a Tuple of Integers (JuliaLang#523) 08d6ae1 CI: don't run `threads` tests in Windows GHA CI (attempt 2) (JuliaLang#530) 7408e4b Revert "Don't fail CI if codecov upload fails." (JuliaLang#527) 287e406 Bump julia-actions/setup-julia from 1 to 2 (JuliaLang#524) b5de0da Don't fail CI if codecov upload fails. (JuliaLang#525) 78dde4c cast to Float64 directly instead of using float (JuliaLang#521) a5e95ec CI: Add Apple Silicon (macOS aarch64) to the CI matrix (JuliaLang#505) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
On Mac OS 10.7, make debug with default compiler (Apple's llvm-gcc) doesn't work with the command line REPL (readline or basic). However, it does work with scripts and pass all tests.
The text was updated successfully, but these errors were encountered: