Repository navigation
Conversation
JULBackend and JULInterfaceSlf4jToLogbackBackend wrote their java.util.logging.config.file contents in setupSpec. Spock runs the superclass setupSpec first, and ProcessManager.setupSpec starts the child process there and waits for scope diagnostics to be ready. The child's LogManager could read the still-empty temp file, install no handler, and drop every log line, which failed "check raw file injection" with an empty raw log. Write the properties file from additionalArguments(), which runs while the process command is built and before the process starts.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The JUL configuration writes complete after log-file initialization and before child-process startup, removing the empty-config race while preserving logging settings and cleanup behavior.
🤖 Bits Code Review · Commit b6c2a63
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
AlexeyKuznetsov-DD
left a comment
There was a problem hiding this comment.
Optional cleanup, not a blocker; the current fix looks correct.
Could we extract a common JULConfiguredSmokeTest extends LogInjectionSmokeTest base class for JULBackend and JULInterfaceSlf4jToLogbackBackend. It could own the temporary config file, writing it before process startup, and cleanup, leaving only the handler-specific settings in each subclass.?
Add JULConfiguredSmokeTest, which owns the temporary java.util.logging.config.file, writes it from additionalArguments() before the process starts, and deletes it in cleanupSpec. JULBackend and JULInterfaceSlf4jToLogbackBackend now only write their handler-specific properties.
@AlexeyKuznetsov-DD I made the suggested updates and have added to the MQ. If you have any feedback on how it was done, feel free to remove it from the MQ or post a follow-up here and I'm happy to apply it |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in Use ⏳ Building merge commit 9b69a4e20d in pipeline 8918205831335818202... |
What Does This Do
Writes the
java.util.logging.config.fileproperties file for the JUL-backed log-injection smoke tests before the test app starts. A newJULConfiguredSmokeTestbase class owns the temp file: it writes it fromadditionalArguments(), which runs while the process command is built, and deletes it incleanupSpec(). Before,JULBackendandJULInterfaceSlf4jToLogbackBackendeach wrote it insetupSpec(). They now extend the base and only supply their handler settings throughwriteJulProperties(PrintWriter).Motivation
Since #12609,
ProcessManager.setupSpecstarts the child process and waits onscopeDiagnostics.awaitReady(p)before the subclasssetupSpecruns. So the child'sLogManagercould read the temp config file while it was still empty. It then installed noFileHandler, the raw log stayed empty, and "check raw file injection" failed withlogLines.size() == 7against an empty list.On master over the last 90 days, 99 of 102 failures of this test have that signature, all on HotSpot 17/21/25/tip:
FloggerInterfaceJULBackend: 92JULInterfaceSlf4jToLogbackBackend: 5JBossInterfaceJULBackend: 2Weekly counts went from 13 to 36 to 46.
Additional Notes
outputLogFileis created earlier increateProcessBuilder, so theFileHandler.patternwritten into the config still points at the right file.JULConfiguredSmokeTestoverridesadditionalArguments(), so they all get the new ordering.FloggerInterfaceJULBackend,JBossInterfaceJULBackend,JCLInterfaceJULBackend,JULInterfaceJULBackend,Slf4jInterfaceJULBackend, andJULInterfaceSlf4jToLogbackBackendwith its NoTags, 128bTid and Latest variants). I reproduced the race on the old code by delaying the config write, and it failed with the same assertion as CI. With the same delay, the fix passes.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: N/A