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

Build failure with LLVM 3.4 #8532

Closed
nalimilan opened this issue Sep 30, 2014 · 13 comments
Closed

Build failure with LLVM 3.4 #8532

nalimilan opened this issue Sep 30, 2014 · 13 comments

Comments

@nalimilan
Copy link
Member

I've made some progress in building an RPM package on RHEL6, but I'm getting a segfault at the end of the construction of the system image. Does that sound familiar to anybody? I've installed devtoolset-2, so it's using GCC 4.8, and LLVM is 3.4.2.

precompile.jl
signal (11): Segmentation fault
jl_gen_llvm_gv_array at /builddir/build/BUILD/julia/src/cgutils.cpp:235
_ZNKSs7_M_dataEv at /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/bits/basic_string.h:293
julia_trampoline at /builddir/build/BUILD/julia/src/init.c:1034
unknown function (ip: 4199629)
__libc_start_main at /lib64/libc.so.6 (unknown line)
unknown function (ip: 4199685)
/bin/sh: line 3: 17626 Segmentation fault      /builddir/build/BUILD/julia/build/usr/bin/julia --build /builddir/build/BUILD/julia/build/usr/lib64/julia/sys -J/builddir/build/BUILD/julia/build/usr/lib64/julia/$([ -e /builddir/build/BUILD/julia/build/usr/lib64/julia/sys.ji ] && echo sys.ji || echo sys0.ji) -f sysimg.jl
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***
make[1]: Leaving directory `/builddir/build/BUILD/julia'
make[1]: *** [/builddir/build/BUILD/julia/build/usr/lib64/julia/sys.o] Error 1
make: *** [release] Error 2

http:https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/epel-6-x86_64/julia-0.4.0dev-0.20140930.fc20/build.log

Cc: @crayxt

@crayxt
Copy link
Contributor

crayxt commented Sep 30, 2014

Same issue with LLVM_SVN. You see there was rather big merge #8420

@crayxt
Copy link
Contributor

crayxt commented Sep 30, 2014

On centos7, and cento6 with stock compiler and LLVM 3.3 compilation succeeds.

@JeffBezanson
Copy link
Sponsor Member

LLVM 3.4 could certainly be the issue here, or more accurately, our level of compatibility with it.

@crayxt
Copy link
Contributor

crayxt commented Oct 1, 2014

Here's what git bisect says

c67837ca8e69505bf684cd71ac11d69a178c86c9 is the first bad commit
commit c67837ca8e69505bf684cd71ac11d69a178c86c9
Author: Jeff Bezanson <[email protected]>
Date:   Fri Sep 19 10:16:28 2014 -0400

    get dates tests passing with checked signed<->unsigned conversion

:040000 040000 e82473eb2a61e8d2c4b940699b97d309211efc15 510ecb2cf580a67c61ceaf63d06db4bc7045c0f8 M      base
:040000 040000 19c3a64cf2deb31286fd6c50ffeefb83221cfeb3 0d1121276be3750f7923b94ca851986ba3199a1d M      src
:040000 040000 9e0b3d75b77f5acdf4894ba495463132fdf81b39 de9ad7a6c3332d0c5ae89e355ced99fe48143a39 M      test

@staticfloat
Copy link
Sponsor Member

I see segfaults like this intermittently. If you build this over and over again, does the segfault reliably happen?

@Keno
Copy link
Member

Keno commented Oct 1, 2014

I have seen this too on LLVM 3.6.

@nalimilan
Copy link
Member Author

@staticfloat I've run it three times, and it failed every time.

@nalimilan
Copy link
Member Author

I also see this on Fedora 20 (again with LLVM 3.4):

precompile.jl
fatal: error thrown and no exception handler available.
MemoryError()
*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***
make[1]: Leaving directory `/builddir/build/BUILD/julia'
make[1]: *** [/builddir/build/BUILD/julia/build/usr/lib64/julia/sys.o] Error 1
make: *** [release] Error 2

http:https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/fedora-20-x86_64/julia-0.4.0dev-0.20141002.fc20/build.log

The error is different but it seems to appear at the same step.

@nalimilan nalimilan changed the title Build failure on RHEL6 Build failure with LLVM 3.4 Oct 2, 2014
@Keno
Copy link
Member

Keno commented Oct 3, 2014

Something is really broken with MCJIT versions of julia at the moment. This really needs to be fixed.

@nalimilan
Copy link
Member Author

Today some of the builds passed, and only failed in the first test:

/builddir/build/BUILD/julia/build/usr/bin/julia --check-bounds=yes -f ./runtests.jl core
symbol could not be found jl_sysimg_gvars (-1): /builddir/build/BUILD/julia/build/usr/bin/../lib64/julia/sys.so: undefined symbol: jl_sysimg_gvars
symbol could not be found jl_globalUnique (-1): /builddir/build/BUILD/julia/build/usr/bin/../lib64/julia/sys.so: undefined symbol: jl_globalUnique
/bin/sh: line 1: 10184 Segmentation fault      /builddir/build/BUILD/julia/build/usr/bin/julia --check-bounds=yes -f ./runtests.jl core
make: *** [core] Error 139

http:https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/fedora-20-x86_64/julia-0.4.0dev-0.20141003.fc20/build.log

But another one is still the same, so maybe there's indeed a random component:
http:https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/fedora-rawhide-x86_64/julia-0.4.0dev-0.20141003.fc20/build.log

@Keno
Copy link
Member

Keno commented Oct 3, 2014

Yep, seen that too. For what it's worth, building with assertions gives:

julia: /home/kfischer/julia-master/deps/llvm-svn/include/llvm/ADT/StringMap.h:320: bool llvm::StringMap<llvm::Value *, llvm::MallocAllocator>::insert(MapEntryTy *) [ValueTy = llvm::Value *, AllocatorTy = llvm::MallocAllocator]: Assertion `NumItems + NumTombstones <= NumBuckets' failed.

though I think memory corruption may be more likely.

@Keno
Copy link
Member

Keno commented Oct 3, 2014

Actually, I think I may know what the issue is. Hold on.

@Keno Keno closed this as completed in 24d990c Oct 3, 2014
@nalimilan
Copy link
Member Author

@Keno Looks good now, thanks! Now I need to find out why tests fail on 32-bit only.

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

5 participants