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

segfault on Julia 1.3.0-rc4 #444

Closed
goretkin opened this issue Oct 30, 2019 · 21 comments
Closed

segfault on Julia 1.3.0-rc4 #444

goretkin opened this issue Oct 30, 2019 · 21 comments

Comments

@goretkin
Copy link
Contributor

using Cxx#master, and after turning off precompilation

julia> versioninfo()
Julia Version 1.3.0-rc4.1
Commit 8c4656b97a (2019-10-15 14:08 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.6.0)
  CPU: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
Environment:
  JULIA_BASE_PATH = /Applications/Julia-1.3rc4.app/Contents/Resources/julia/share/julia/base
  JULIA_STDLIB_PATH = /Applications/Julia-1.3rc4.app/Contents/Resources/julia/share/julia/stdlib



julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]
[ Info: Skipping precompilation since __precompile__(false). Importing Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2].

signal (11): Segmentation fault: 11
in expression starting at /Users/goretkin/.julia/dev/Cxx/src/Cxx.jl:178
_ZN4llvm19SmallPtrSetImplBase14insert_imp_bigEPKv at /Applications/Julia-1.3rc4.app/Contents/Resources/julia/lib/julia/libLLVM.dylib (unknown line)
_ZN4llvm11LLVMContext9addModuleEPNS_6ModuleE at /Applications/Julia-1.3rc4.app/Contents/Resources/julia/lib/julia/libLLVM.dylib (unknown line)
_ZL17finish_clang_initP11CxxInstancebPKcml at /Users/goretkin/.julia/dev/Cxx/deps/usr/lib/libcxxffi.dylib (unknown line)
init_clang_instance at /Users/goretkin/.julia/dev/Cxx/deps/usr/lib/libcxxffi.dylib (unknown line)
#setup_instance#20 at /Users/goretkin/.julia/dev/Cxx/src/initialization.jl:39
#setup_instance at ./none:0 [inlined]
__init__ at /Users/goretkin/.julia/dev/Cxx/src/initialization.jl:430
@Gnimuc
Copy link
Member

Gnimuc commented Oct 31, 2019

did you apply this patch?

@goretkin
Copy link
Contributor Author

I think you might have linked to the wrong page (it links to this page). Happy to try any patch!

@Gnimuc
Copy link
Member

Gnimuc commented Oct 31, 2019

Oops! It's #407. It looks like Github cannot handle this format: [this patch](#407).

@goretkin
Copy link
Contributor Author

I took a guess and just tried it out, I still get a segfault. The stacktrace doesn't print reliably, and I didn't run gdb, but from some print statements I had, it looks like it's the same issue.

@oschulz
Copy link
Contributor

oschulz commented Oct 31, 2019

I get segfaults on CentOS-7, too, with Julia v1.3-RC4.

@Gnimuc
Copy link
Member

Gnimuc commented Oct 31, 2019

#434 might also be needed.

Is there a way to check whether a git commit is included in certain release branch?

@chrisvwx
Copy link
Contributor

chrisvwx commented Dec 5, 2019

I get what looks like the same segfault on Julia 1.3. Whenever I want to use Cxx, I'm switching back to 1.2

@GlenHenshaw
Copy link

Getting the same error. Also using Julia 1.3.0

@GlenHenshaw
Copy link

Oops! It's #407. It looks like Github cannot handle this format: [this patch](#407).

It's entirely possible that I'm simply dense, but I'm going to ask this anyway. How does one go about applying this patch? I can dev Cxx and get the source. I can build the source. But the link takes me to a Github page that describes the patch but nowhere can I find an actual .patch file.

@goretkin
Copy link
Contributor Author

goretkin commented Dec 5, 2019

How does one go about applying this patch?

You can try
git cherry-pick 3c081e564256d5db22d045d47cd269dac19bdb99

in the Cxx Julia package directory (probably ~/dev/Cxx)

The hash is of the one commit on that PR. You can see all the commits here: https://github.com/JuliaInterop/Cxx.jl/pull/407/commits

If you want to generate a .patch file, there's a command to do that, too. Something like git diff hash1 hash2 with some arguments, if I recall, does it. The two hashes are e.g. the hash of the commit and the hash of the parent commit. You can then apply this .patch. But I recommend cherry-pick.

@GlenHenshaw
Copy link

GlenHenshaw commented Dec 6, 2019

I applied both 407 and 434. Still getting the same error.

@Gnimuc
Copy link
Member

Gnimuc commented Dec 7, 2019

Did you build Julia from the source? I've merged 407 and 434 into master and submitted PR #450 for a fix.

@alhirzel
Copy link

alhirzel commented Dec 16, 2019

I have tested Cxx.jl#master with #450 applied (which also applies #407 and #434) and still get this error on Julia 1.3.0 (official binary downloaded from julialang.org).

@Gnimuc
Copy link
Member

Gnimuc commented Dec 17, 2019

@alhirzel you need to build Julia from source for now.

@alhirzel
Copy link

Ok, thank you for the info. Is there a place I can read more about why a Julia source build is needed?

@Gnimuc
Copy link
Member

Gnimuc commented Dec 18, 2019

#441 (comment)

No worries, I upgraded the build environment to the latest BB2 and successfully built libcxxffi for x86_linux this morning. It will take a couple of days to build&test other platforms before I submit a PR.

@MaximeBouton
Copy link

Does this mean that the building julia from source won't be needed if BB build works?

@Gnimuc
Copy link
Member

Gnimuc commented Dec 18, 2019

yes, just like Julia 1.1 and 1.2.

@Gnimuc
Copy link
Member

Gnimuc commented Dec 22, 2019

Binary-build for Julia 1.3 is ready for a test.

(v1.3) pkg> add Cxx#master

@alhirzel
Copy link

Thank you!

@goretkin
Copy link
Contributor Author

@Gnimuc, thanks for fixing this. Is it possible to summarize what changed between Julia 1.2 and Julia 1.3 that gave rise to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants