Open csitarichie opened 1 year ago
Hi @csitarichie,
While syncing C++ project I am not seeing any issue. Could you please share exact steps to reproduce the issue so we can dive deep into the issue?
@Pavank1992
I start Clion with the import BAZEL project and I have .bazelpoject which excludes some directories and I only build a specific sub-target set.
The project uses remote execution and it is huge.
@csitarichie what do you mean by remote execution? JetBrains Gateway or Bazel's Remote Execution? It will be hard to investigate without a repro scenario we can run ourselves
@csitarichie what do you mean by remote execution? JetBrains Gateway or Bazel's Remote Execution? It will be hard to investigate without a repro scenario we can run ourselves I was suspecting this.
I mean BAZEL remote execution. CLion runs local as well as the repo is local. but the BAZEL build is a remote build.
Unfortunately I can not share the project or even tell details about it. One way could be to write a log by the plugin. And I can run it and see where it is crashes. And try to understand what's is needed to reproduce the problem with an example. I'm not sure what causes the crash and the bazel project is complicated enough to not able to guess what it would be and reproduce it with an example.
so what happens if you try to run bazel info
from CLI?
so what happens if you try to run
bazel info
from CLI?
WARNING: bazel is now forced to x86_64 as BAZEL_FORCE_X86_64=true
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 45515efb-3ddc-40d3-95d8-34d3f4f616bf
bazel-bin: /private/var/tmp/<repo_cache>/bazel-out/darwin_x86_64-opt/bin
bazel-genfiles: /private/var/tmp/<repo_cache>/bazel-out/darwin_x86_64-opt/bin
bazel-testlogs: /private/var/tmp/<repo_cache>/bazel-out/darwin_x86_64-opt/testlogs
character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1
command_log: /private/var/tmp/<bazel_cache>/command.log
committed-heap-size: 1073MB
execution_root: /private/var/tmp/<repo_cache>
gc-count: 5
gc-time: 17ms
install_base: /var/tmp/<bazel_cache>
java-home: /private/var/tmp/<bazel_cache>/embedded_tools/jdk
java-runtime: OpenJDK Runtime Environment (build 11.0.10+9-LTS) by Azul Systems, Inc.
java-vm: OpenJDK 64-Bit Server VM (build 11.0.10+9-LTS, mixed mode) by Azul Systems, Inc.
max-heap-size: 12884MB
output_base: /private/var/tmp/<bazel_cache>
output_path: /private/var/tmp/<repo_cache>/bazel-out
package_path: %workspace%
release: release 6.1.0-9-g40097e1ba2
repository_cache: /var/tmp/<bazel_tmp>/cache/repos/v1
server_log: /private/var/tmp/<tmp_cache>.java.20230428-125908.2812
server_pid: 2812
used-heap-size: 95MB
workspace: /Users/<repo_root>
Interesting. IMO, due to exit code 2, I think it is likely that for some reason bazel info
just can't be executed (not in PATH?) by IntelliJ
Interesting. IMO, due to exit code 2, I think it is likely that for some reason
bazel info
just can't be executed (not in PATH?) by IntelliJ
the Bazel sync calls first:
Running Bazel info...
Command: <user_home>/.bazel/bin/bazel info --tool_tag=ijwb:CLion --curses=no --color=yes --progress_in_terminal_title=no --test_output=all --
WARNING: bazel is now forced to x86_64 as BAZEL_FORCE_X86_64=true
INFO: Invocation ID: afbfcb4b-76cc-463c-a739-e6c87a49da89
Building <NNN> Bazel targets...
Build invocation result: success
Parsing build outputs...
Total rules: <NNNN>, new/changed: <NNNN>, removed: 0
Reading IDE info result...
Reading IDE info result...
Updating target map...
Sync failed
Timing summary:
BlazeInvocation: 315.1s, Prefetching: 86.5s, Other: 10.4s
Sync failed
which then starts Bazel build
like this:
Command: <user_home>/.bazel/bin/bazel build --tool_tag=ijwb:CLion --keep_going --build_event_binary_file=/var/folders/d2/z4_3dzgx79b1k62rmkt2gqrw0000gn/T/intellij-bep-63399741-e52a-4bd7-92e1-17bb0dce9079 --nobuild_event_binary_file_path_conversion --curses=no --color=yes --progress_in_terminal_title=no --test_output=all --noexperimental_run_validations --aspects=@@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect "--override_repository=intellij_aspect=<user_home>/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-1/231.8109.222/CLion 2023.1 EAP.app.plugins/clwb/aspect" --output_groups=intellij-resolve-cpp,intellij-resolve-py,intellij-info-cpp,intellij-info-generic,intellij-info-py -- //<incuded_dir>/... -<excluded_dir>/...
the build finishes like this:
INFO: Build completed successfully, <NNN> total actions
INFO: Build Event Protocol files produced successfully.
INFO: Build completed successfully, <NNN> total actions
Build command finished. Retrieving BEP outputs...
and there is an exception:
Got more than one input Future failure. Logging failures after the first
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.base/java.util.Objects.checkIndex(Objects.java:359)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at com.google.idea.blaze.base.ideinfo.PyIdeInfo.lambda$parseArgs$0(PyIdeInfo.java:69)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at com.google.idea.blaze.base.ideinfo.PyIdeInfo.parseArgs(PyIdeInfo.java:70)
at com.google.idea.blaze.base.ideinfo.PyIdeInfo.fromProto(PyIdeInfo.java:63)
at com.google.idea.blaze.base.ideinfo.TargetIdeInfo.fromProto(TargetIdeInfo.java:135)
at com.google.idea.blaze.base.sync.aspects.BlazeIdeInterfaceAspectsImpl.protoToTarget(BlazeIdeInterfaceAspectsImpl.java:482)
at com.google.idea.blaze.base.sync.aspects.BlazeIdeInterfaceAspectsImpl.lambda$updateState$6(BlazeIdeInterfaceAspectsImpl.java:358)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:248)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:28)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:221)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:227)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
So to me it seems that the failure is during Retrieving BEP outputs...
It seems that the crash is gone if I'm disabling python as additional languages:
additional_languages:
# python
So it seems that there's something specific in the one of the args
in py_binary
. If you can't share it, you can try by yourself by running:
com.intellij.util.execution.ParametersListUtil.parse(arg, false, false)
for each entry in args separately
Description of the bug:
Got more than one input Future failure. Logging failures after the first
There are 2 exceptions after each other all the time:
and
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
After starting CLion and running bazel sync when the bazel build finished. And starts:
Build command finished. Retrieving BEP outputs...
The crash happens and sync fails.
the project files for c and c++ remain in unsynced state.
Which Intellij IDE are you using? Please provide the specific version.
2023.1
What programming languages and tools are you using? Please provide specific versions.
c, c++, python, swift
What Bazel plugin version are you using?
2023.03.10.0.1-api-version-231
Have you found anything relevant by searching the web?
there is no information about this crash on the net.
Any other information, logs, or outputs that you want to share?
No response