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

IllegalArgumentException: value already present #22417

Open
shinypb opened this issue May 16, 2024 · 5 comments
Open

IllegalArgumentException: value already present #22417

shinypb opened this issue May 16, 2024 · 5 comments
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug untriaged

Comments

@shinypb
Copy link

shinypb commented May 16, 2024

Description of the bug:

Random crashes ~1x/hour during a normal day of development. Definitely post-dates our upgrade to Bazel 7.1.2, but I don't have enough data to be confident in blaming 7.1.2 for the problem.

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Unable to reproduce on demand; it happens at random.

Which operating system are you running Bazel on?

Ubuntu

What is the output of bazel info release?

release 7.1.2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

Thread on Bazel Slack:
https://bazelbuild.slack.com/archives/CD4MDG09Z/p1715878298272369

Any other information, logs, or outputs that you want to share?

FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.IllegalArgumentException: value already present: /cloud/services/fleet_state_app
	at com.google.common.collect.HashBiMap.put(HashBiMap.java:316)
	at com.google.common.collect.HashBiMap.put(HashBiMap.java:296)
	at com.google.devtools.build.lib.skyframe.WatchServiceDiffAwareness$WatcherFileVisitor.preVisitDirectory(WatchServiceDiffAwareness.java:329)
	at com.google.devtools.build.lib.skyframe.WatchServiceDiffAwareness$WatcherFileVisitor.preVisitDirectory(WatchServiceDiffAwareness.java:283)
	at java.base/java.nio.file.Files.walkFileTree(Unknown Source)
	at java.base/java.nio.file.Files.walkFileTree(Unknown Source)
	at com.google.devtools.build.lib.skyframe.WatchServiceDiffAwareness.registerSubDirectoriesAndReturnContents(WatchServiceDiffAwareness.java:278)
	at com.google.devtools.build.lib.skyframe.WatchServiceDiffAwareness.collectChanges(WatchServiceDiffAwareness.java:253)
	at com.google.devtools.build.lib.skyframe.WatchServiceDiffAwareness.getCurrentView(WatchServiceDiffAwareness.java:135)
	at com.google.devtools.build.lib.skyframe.DiffAwarenessManager.getDiff(DiffAwarenessManager.java:115)
	at com.google.devtools.build.lib.skyframe.SkyframeExecutor.handleDiffs(SkyframeExecutor.java:3141)
	at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutor.sync(SequencedSkyframeExecutor.java:285)
	at com.google.devtools.build.lib.runtime.CommandEnvironment.syncPackageLoading(CommandEnvironment.java:737)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:567)
	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:244)
	at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:573)
	at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$1(GrpcServerImpl.java:644)
	at io.grpc.Context$1.run(Context.java:566)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
@fmeum
Copy link
Collaborator

fmeum commented May 16, 2024

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label May 16, 2024
@keertk
Copy link
Member

keertk commented May 16, 2024

@bazel-io fork 7.2.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label May 16, 2024
@iancha1992 iancha1992 added the team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. label May 16, 2024
@fmeum
Copy link
Collaborator

fmeum commented May 17, 2024

@iancha1992 This is probably Team-Core

@iancha1992 iancha1992 added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc and removed team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. labels May 17, 2024
@Wyverald
Copy link
Member

Definitely post-dates our upgrade to Bazel 7.1.2, but I don't have enough data to be confident in blaming 7.1.2 for the problem.

Which version did you upgrade from? I had a brief look and none of the classes in the stack trace had any interesting changes in the past few months.

@haxorz
Copy link
Contributor

haxorz commented May 30, 2024

WatchServiceDiffAwareness hasn't been maintained for a while. It was originally implemented by folks outside team-Core, and they stopped working on Bazel a while ago.

Mentioning this to say: If someone wants to take a look, go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: bug untriaged
Projects
None yet
Development

No branches or pull requests

9 participants