Skip to content

Commit

Permalink
Flip the default value of `incompatible_use_new_cgroup_implementation…
Browse files Browse the repository at this point in the history
…` to true.

PiperOrigin-RevId: 715408448
Change-Id: Ie8ad99ce1b6485bb19aa471ca1e4f77f7acb3e7c
  • Loading branch information
bigelephant29 authored and copybara-github committed Jan 14, 2025
1 parent 4e89bc2 commit 67c89b3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public ImmutableMap<String, Double> getLimits() {

@Option(
name = "incompatible_use_new_cgroup_implementation",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY,
effectTags = {OptionEffectTag.EXECUTION},
converter = BooleanConverter.class,
Expand Down

2 comments on commit 67c89b3

@fmeum
Copy link
Collaborator

@fmeum fmeum commented on 67c89b3 Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bigelephant29 @AlessandroPatti This change leads to this showing up in logs on macOS since the root creation happens regardless of whether the current OS is Linux:

java.io.FileNotFoundException: /proc/self/mounts (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
	at com.google.common.io.Files$FileByteSource.openStream(Files.java:134)
	at com.google.common.io.Files$FileByteSource.openStream(Files.java:122)
	at com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:474)
	at com.google.common.io.CharSource.readLines(CharSource.java:371)
	at com.google.common.io.Files.readLines(Files.java:552)
	at com.google.devtools.build.lib.sandbox.cgroups.Mount.parse(Mount.java:67)
	at com.google.devtools.build.lib.sandbox.cgroups.VirtualCgroup.createRoot(VirtualCgroup.java:99)
	at com.google.devtools.build.lib.sandbox.cgroups.VirtualCgroup.createRoot(VirtualCgroup.java:95)
	at com.google.devtools.build.lib.sandbox.cgroups.VirtualCgroup.createInstance(VirtualCgroup.java:78)
	at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:186)
	at com.google.devtools.build.lib.sandbox.cgroups.VirtualCgroup.getInstance(VirtualCgroup.java:72)
	at com.google.devtools.build.lib.worker.WorkerModule.buildStarting(WorkerModule.java:134)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:85)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:142)
	at com.google.common.eventbus.Subscriber.lambda$dispatchEvent$0(Subscriber.java:71)
	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:68)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:111)
	at com.google.common.eventbus.EventBus.post(EventBus.java:270)
	at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:241)
	at com.google.devtools.build.lib.buildtool.util.BlazeRuntimeWrapper.executeBuild(BlazeRuntimeWrapper.java:383)
	at com.google.devtools.build.lib.buildtool.util.BuildIntegrationTestCase.buildTarget(BuildIntegrationTestCase.java:829)
	at com.google.devtools.build.lib.remote.BuildWithoutTheBytesIntegrationTestBase.downloadMinimal_runfiles(BuildWithoutTheBytesIntegrationTestBase.java:1106)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at com.google.testing.junit.runner.internal.junit4.CancellableRequestFactory$CancellableRunner.run(CancellableRequestFactory.java:108)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:111)
	at com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:153)
	at com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:83)

@zhengwei143
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bigelephant29 we should probably add a check at

sandboxOptions == null || !sandboxOptions.useNewCgroupImplementation
to only instantiate the factory for linux.

Please sign in to comment.