Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#73407 - Bazel crash likely Arch environment related

Attached to Project: Arch Linux
Opened by Reimundo Heluani (heluani) - Tuesday, 18 January 2022, 12:10 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 11 February 2022, 20:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

After updating bazel to 4.2.2-1 I get the following stack trace when building my project

```
[1,041 / 1,042] [Prepa] GoLink cmd/validator/validator_/validator
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.ExceptionInInitializerError
at com.google.devtools.build.lib.actions.ParameterFile.writeContent(ParameterFile.java:120)
at com.google.devtools.build.lib.actions.ParameterFile.writeParameterFile(ParameterFile.java:105)
at com.google.devtools.build.lib.actions.CommandLines$ParamFileActionInput.writeTo(CommandLines.java:275)
at com.google.devtools.build.lib.sandbox.SandboxHelpers.writeVirtualInputTo(SandboxHelpers.java:238)
at com.google.devtools.build.lib.sandbox.SandboxHelpers.atomicallyWriteVirtualInput(SandboxHelpers.java:94)
at com.google.devtools.build.lib.sandbox.SandboxHelpers$SandboxInputs.materializeVirtualInput(SandboxHelpers.java:202)
at com.google.devtools.build.lib.sandbox.SandboxHelpers$SandboxInputs.access$100(SandboxHelpers.java:154)
at com.google.devtools.build.lib.sandbox.SandboxHelpers.processInputFiles(SandboxHelpers.java:308)
at com.google.devtools.build.lib.sandbox.LinuxSandboxedSpawnRunner.prepareSpawn(LinuxSandboxedSpawnRunner.java:179)
at com.google.devtools.build.lib.sandbox.AbstractSandboxSpawnRunner.exec(AbstractSandboxSpawnRunner.java:89)
at com.google.devtools.build.lib.sandbox.SandboxModule$SandboxFallbackSpawnRunner.exec(SandboxModule.java:489)
at com.google.devtools.build.lib.exec.SpawnRunner.execAsync(SpawnRunner.java:238)
at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:144)
at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:106)
at com.google.devtools.build.lib.actions.SpawnStrategy.beginExecution(SpawnStrategy.java:47)
at com.google.devtools.build.lib.exec.SpawnStrategyResolver.beginExecution(SpawnStrategyResolver.java:65)
at com.google.devtools.build.lib.analysis.actions.SpawnAction.beginExecution(SpawnAction.java:331)
at com.google.devtools.build.lib.actions.Action.execute(Action.java:127)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$5.execute(SkyframeActionExecutor.java:855)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1016)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:975)
at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:129)
at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:81)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:472)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:834)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:307)
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:477)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:398)
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.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(byte[],byte) accessible: module java.base does not "opens java.lang" to unnamed module @7e0b85f9
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188)
at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181)
at com.google.devtools.build.lib.unsafe.StringUnsafe.<init>(StringUnsafe.java:75)
at com.google.devtools.build.lib.unsafe.StringUnsafe.initInstance(StringUnsafe.java:56)
at com.google.devtools.build.lib.unsafe.StringUnsafe.<clinit>(StringUnsafe.java:37)
... 31 more
```
This is the same as the upstream report https://github.com/bazelbuild/bazel/issues/14548 but since that one is also in an updated Arch and the reporter checked that a different container runs fine, it seems like this may be due to some default in Arch


Steps to reproduce:

git clone https://www.github.com/prysmaticlabs/prysm.git
cd prysm
bazel build //cmd/validator
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 11 February 2022, 20:27 GMT
Reason for closing:  Not a bug
Additional comments about closing:  use upstream recommended java version
Comment by loqs (loqs) - Wednesday, 19 January 2022, 00:30 GMT
The attached PKGBUILD src archive builds the minimal producer from the linked upstream report. It builds without issue for me using extra-x86_64-build from devtools.
Is the default java set to java-11-openjdk on the system with the issue?
Comment by Reimundo Heluani (heluani) - Wednesday, 19 January 2022, 00:46 GMT
Thanks indeed I confirm I had java-17-openjdk instead and moving to java-11 solved this issue.

Loading...