Skip to content

Bazel getting stuck while building #748

@mnett

Description

@mnett

I've been having trouble building things with Bazel lately. The issue manifests itself with Bazel appearing to be stuck (with no CPU load) at essentially random build steps (including the loading and analysis phase). This happens both when I attempt to build targets from my own repository, as well as in the bootstrap step in the Bazel installation; I've also tried with releases 0.1.0 and 0.1.2 with no success this far.

For example, when running ./compile.sh from HEAD just now I get stuck with the following (aborted after several minutes without any progress):

[mnett@singularity ~/Development/bazel] (master) Sat Jan 02 22:40:25 $ ./compile.sh                                                                                    
INFO: You can skip this first step by providing a path to the bazel binary as second argument:                                                                         
INFO:    ./compile.sh build /path/to/bazel                                                                                                                             
🍃  Building Bazel from scratch............                                                                                                                             
🍃  Building Bazel with Bazel.                                                                                                                                          
.Extracting Bazel installation...                                                                                                                                      
Sending SIGTERM to previous Bazel server (pid=26879)... done.                                                                                                          
.......                                                                                                                                                                
INFO: Found 1 target...                                                                                                                                                
[2 / 45] Writing file src/main/java/com/google/devtools/build/lib/libbazel-main.jar-2.params

If I interpret the output of strace (see below), this seems to be a deadlock.

[mnett@singularity ~] Sat Jan 02 22:40:58 $ sudo strace -p 26879
[sudo] password for mnett: 
Process 26879 attached
futex(0x7f059b3319d0, FUTEX_WAIT, 26880, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=30672, si_uid=1000} ---
futex(0x7f059a5028c0, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigreturn()                          = 202
futex(0x7f059b3319d0, FUTEX_WAIT, 26880, NULL <unfinished ...>
+++ exited with 143 +++
[mnett@singularity ~] Sat Jan 02 22:45:38 $ sudo strace -p 30715
Process 30715 attached
futex(0x7f50b497b9d0, FUTEX_WAIT, 30716, NULL

The step at which the deadlock happens seems arbitrary and repeatedly running a build command eventually succeeds. Anyway, I didn't find any issues that seem to be related to this, and at this point I'm unsure of how to further debug the problem.

Do you have any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions