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 bazel init #68

Closed
markchadwick opened this issue Mar 27, 2015 · 5 comments
Closed

Segfault on bazel init #68

markchadwick opened this issue Mar 27, 2015 · 5 comments
Assignees

Comments

@markchadwick
Copy link

Compiled bazel from source using ./compile.sh -- resulting binary segfaults moments after starting.

Ubuntu 12.04.5 LTS
java-8-oracle (from the PPA suggested here: http://bazel.io/docs/install.html)
libc6 2.15-0ubuntu10.11

To reproduce:

$ git clone https://github.com/google/bazel
$ cd bazel
$ ./compile.sh
Compiling Java stubs for protocol buffers...
Compiling Bazel Java code...
Extracting helper classes for Bazel Java...
Creating libblaze.jar...
Compiling SingleJar tool code...
Extracting helper classes for SingleJar tool...
Creating SingleJar_deploy.jar...
Compiling JavaBuilder tool code...
Extracting helper classes for JavaBuilder tool...
Creating JavaBuilder_deploy.jar...
Compiling client .cc files...
Linking client...
Compiling ijar .cc files...
Linking ijar...
Compiling JNI libraries...
Linking libunix.so...
Compiling build-runfiles...
Compiling process-wrapper...
Compiling sandbox...
Creating Bazel self-extracting archive...
Creating objc helper tools...
Compiling actoolzip code...
Extracting helper classes for actoolzip...
Creating precomp_actoolzip_deploy.jar...
Compiling ibtoolzip code...
Extracting helper classes for ibtoolzip...
Creating precomp_ibtoolzip_deploy.jar...
Compiling momczip code...
Extracting helper classes for momczip...
Creating precomp_momczip_deploy.jar...
Compiling bundlemerge code...
Extracting helper classes for bundlemerge...
Creating precomp_bundlemerge_deploy.jar...
Compiling plmerge code...
Extracting helper classes for plmerge...
Creating precomp_plmerge_deploy.jar...
Compiling xcodegen code...
Extracting helper classes for xcodegen...
Creating precomp_xcodegen_deploy.jar...
Build successful! Binary is here: (...)/bazel/output/bazel
$ ./output/bazel 
Extracting Bazel installation...
Segmentation fault (core dumped)

Inspecting the core:

$gdb ./output/bazel core 
...
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fffe23fe000
Core was generated by `./output/bazel'.
Program terminated with signal 11, Segmentation fault.

(gdb) thread apply all where
Thread 1 (Thread 0x7f51dc60f740 (LWP 26482)):
#0  0x00007f51db7f7ec5 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f51dc1bb842 in std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned long) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007f51dc1bbf5c in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x0000000000404d86 in blaze::BlazeStartupOptions::GetJvm (this=0x1383100)
    at src/main/cpp/blaze_startup_options.cc:136
#4  0x000000000040f017 in blaze::VerifyJavaVersionAndGetJvm () at src/main/cpp/blaze.cc:443
#5  0x000000000040f434 in blaze::StartServer (socket=6) at src/main/cpp/blaze.cc:489
#6  0x000000000040fd47 in blaze::ConnectToServer (start=true) at src/main/cpp/blaze.cc:637
#7  0x0000000000411f87 in blaze::SendServerRequest () at src/main/cpp/blaze.cc:1150
#8  0x00000000004140be in blaze::main (argc=1, argv=0x7fffe22c7298) at src/main/cpp/blaze.cc:1687
#9  0x000000000041416b in main (argc=1, argv=0x7fffe22c7298) at src/main/cpp/blaze.cc:1694
@ulfjack
Copy link
Contributor

ulfjack commented Mar 27, 2015

The last LTS has a broken gcc. I have a fix for that in the circleci branch.

On Friday, March 27, 2015, markchadwick [email protected] wrote:

Compiled bazel from source using ./compile.sh -- resulting binary
segfaults moments after starting.

Ubuntu 12.04.5 LTS
java-8-oracle (from the PPA suggested here:
http://bazel.io/docs/install.html)
libc6 2.15-0ubuntu10.11

To reproduce:

$ git clone https://github.com/google/bazel
$ cd bazel
$ ./compile.sh
Compiling Java stubs for protocol buffers...
Compiling Bazel Java code...
Extracting helper classes for Bazel Java...
Creating libblaze.jar...
Compiling SingleJar tool code...
Extracting helper classes for SingleJar tool...
Creating SingleJar_deploy.jar...
Compiling JavaBuilder tool code...
Extracting helper classes for JavaBuilder tool...
Creating JavaBuilder_deploy.jar...
Compiling client .cc files...
Linking client...
Compiling ijar .cc files...
Linking ijar...
Compiling JNI libraries...
Linking libunix.so...
Compiling build-runfiles...
Compiling process-wrapper...
Compiling sandbox...
Creating Bazel self-extracting archive...
Creating objc helper tools...
Compiling actoolzip code...
Extracting helper classes for actoolzip...
Creating precomp_actoolzip_deploy.jar...
Compiling ibtoolzip code...
Extracting helper classes for ibtoolzip...
Creating precomp_ibtoolzip_deploy.jar...
Compiling momczip code...
Extracting helper classes for momczip...
Creating precomp_momczip_deploy.jar...
Compiling bundlemerge code...
Extracting helper classes for bundlemerge...
Creating precomp_bundlemerge_deploy.jar...
Compiling plmerge code...
Extracting helper classes for plmerge...
Creating precomp_plmerge_deploy.jar...
Compiling xcodegen code...
Extracting helper classes for xcodegen...
Creating precomp_xcodegen_deploy.jar...
Build successful! Binary is here: (...)/bazel/output/bazel
$ ./output/bazel
Extracting Bazel installation...
Segmentation fault (core dumped)

Inspecting the core:

$gdb ./output/bazel core
...
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fffe23fe000
Core was generated by `./output/bazel'.
Program terminated with signal 11, Segmentation fault.

(gdb) thread apply all where
Thread 1 (Thread 0x7f51dc60f740 (LWP 26482)):
#0 0x00007f51db7f7ec5 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f51dc1bb842 in std::string::_Rep::_M_clone(std::allocator const&, unsigned long) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2 0x00007f51dc1bbf5c in std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x0000000000404d86 in blaze::BlazeStartupOptions::GetJvm (this=0x1383100)
at src/main/cpp/blaze_startup_options.cc:136
#4 0x000000000040f017 in blaze::VerifyJavaVersionAndGetJvm () at src/main/cpp/blaze.cc:443
#5 0x000000000040f434 in blaze::StartServer (socket=6) at src/main/cpp/blaze.cc:489
#6 0x000000000040fd47 in blaze::ConnectToServer (start=true) at src/main/cpp/blaze.cc:637
#7 0x0000000000411f87 in blaze::SendServerRequest () at src/main/cpp/blaze.cc:1150
#8 0x00000000004140be in blaze::main (argc=1, argv=0x7fffe22c7298) at src/main/cpp/blaze.cc:1687
#9 0x000000000041416b in main (argc=1, argv=0x7fffe22c7298) at src/main/cpp/blaze.cc:1694


Reply to this email directly or view it on GitHub
#68.

@damienmg
Copy link
Contributor

Kristina got into the same problem with our builds on TravisCI.

@lberki
Copy link
Contributor

lberki commented Mar 27, 2015

Assigning to ulfjack since he already has a fix.

@ulfjack
Copy link
Contributor

ulfjack commented Mar 29, 2015

I won't get to this before the middle of next week.

On Fri, Mar 27, 2015 at 11:36 AM lberki [email protected] wrote:

Assigning to ulfjack since he already has a fix.


Reply to this email directly or view it on GitHub
#68 (comment).

@hanwen
Copy link
Contributor

hanwen commented Apr 9, 2015

Ulf, ping?

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

Successfully merging a pull request may close this issue.

6 participants
@markchadwick @hanwen @lberki @damienmg @ulfjack and others