Skip to content

Don't keep the journal of a PersistentMap open#28108

Closed
fmeum wants to merge 3 commits intobazelbuild:masterfrom
fmeum:patch-42
Closed

Don't keep the journal of a PersistentMap open#28108
fmeum wants to merge 3 commits intobazelbuild:masterfrom
fmeum:patch-42

Conversation

@fmeum
Copy link
Copy Markdown
Collaborator

@fmeum fmeum commented Dec 26, 2025

This ensures that the journal file is not kept open after a build, which has been observed to cause RewindingTest to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the PersistentMap class, the overhead of the additional open is negligible.

Also include small tweaks to RewindingTest so that it can be enabled on Windows. In particular, the order of SymlinkAction and SourceManifestAction being rewound doesn't seem to be fixed and can differ on Windows.

@fmeum fmeum force-pushed the patch-42 branch 2 times, most recently from 8f2d9c3 to 1c15b83 Compare December 27, 2025 10:05
@fmeum fmeum requested a review from Copilot December 27, 2025 10:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enables the RewindingTest to run on Windows by removing the "no_windows" tag. However, it also includes extensive debugging code that appears to have been used for troubleshooting but should not be merged into production.

  • Removes the Windows restriction from RewindingTest in the BUILD file
  • Adds multiple debug statements (printStackTrace() and System.err.println()) throughout production code
  • Includes a minor whitespace fix in ExecutionTool.java

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
src/test/java/com/google/devtools/build/lib/skyframe/rewinding/BUILD Removes "no_windows" tag to enable test on Windows
src/main/java/com/google/devtools/build/lib/util/PersistentMap.java Adds debug printStackTrace() and System.err.println() statements that should be removed
src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java Adds debug output for interrupt handling and action cache operations, plus minor formatting fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java Outdated
Comment thread src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java Outdated
Comment thread src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java Outdated
Comment thread src/main/java/com/google/devtools/build/lib/util/PersistentMap.java Outdated
Comment thread src/main/java/com/google/devtools/build/lib/util/PersistentMap.java Outdated
Comment thread src/main/java/com/google/devtools/build/lib/util/PersistentMap.java Outdated
Comment thread src/main/java/com/google/devtools/build/lib/util/PersistentMap.java Outdated
@fmeum fmeum changed the title Enable RewindingTest on Windows Don't keep the journal of a PersistentMap open Dec 27, 2025
@fmeum fmeum force-pushed the patch-42 branch 3 times, most recently from e657af4 to ce681c4 Compare December 28, 2025 22:31
@fmeum fmeum marked this pull request as ready for review December 29, 2025 13:57
@fmeum fmeum requested a review from justinhorvitz December 29, 2025 13:57
@github-actions github-actions Bot added the awaiting-review PR is awaiting review from an assigned reviewer label Dec 29, 2025
@iancha1992 iancha1992 added the team-Performance Issues for Performance teams label Dec 30, 2025
@meisterT meisterT requested a review from tjgq January 5, 2026 08:51
@tjgq tjgq added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jan 7, 2026
@tjgq
Copy link
Copy Markdown
Contributor

tjgq commented Jan 8, 2026

@fmeum I'm not sure why, but the rewinding tests are failing after import (see https://buildkite.com/bazel/google-bazel-presubmit/builds/98779).

Can you commit a no-op change here to force them to run again?

@github-actions github-actions Bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jan 12, 2026
@fmeum fmeum deleted the patch-42 branch January 12, 2026 16:44
@fmeum
Copy link
Copy Markdown
Collaborator Author

fmeum commented Jan 12, 2026

@bazel-io fork 9.0.0

bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jan 12, 2026
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.

Closes bazelbuild#28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
github-merge-queue Bot pushed a commit that referenced this pull request Jan 12, 2026
This ensures that the journal file is not kept open after a build, which
has been observed to cause `RewindingTest` to fail on Windows, which
disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current
usages of the `PersistentMap` class, the overhead of the additional
`open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled
on Windows. In particular, the order of `SymlinkAction` and
`SourceManifestAction` being rewound doesn't seem to be fixed and can
differ on Windows.

Closes #28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6

Commit
2be693e

Co-authored-by: Fabian Meumertzheim <[email protected]>
fmeum added a commit to fmeum/bazel that referenced this pull request Mar 12, 2026
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.

Closes bazelbuild#28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
(cherry picked from commit 2be693e)
fmeum added a commit to fmeum/bazel that referenced this pull request Mar 13, 2026
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.

Closes bazelbuild#28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
(cherry picked from commit 2be693e)
fmeum added a commit to fmeum/bazel that referenced this pull request Mar 13, 2026
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.

Closes bazelbuild#28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
(cherry picked from commit 2be693e)
fmeum added a commit to fmeum/bazel that referenced this pull request Mar 13, 2026
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.

Closes bazelbuild#28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
(cherry picked from commit 2be693e)
fmeum added a commit to fmeum/bazel that referenced this pull request Mar 13, 2026
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.

Closes bazelbuild#28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
(cherry picked from commit 2be693e)
fmeum added a commit to fmeum/bazel that referenced this pull request Mar 13, 2026
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).

Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.

Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.

Closes bazelbuild#28108.

PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
(cherry picked from commit 2be693e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Performance Issues for Performance teams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants