JDK_JAVA_OPTIONS in the environment breaks Mill's daemon RPC, reported as 'Worker wire broken' #494
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#494
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found triaging IW-436 (LESSONS.md entry 5). Blocked the whole of IW-436 Phase 2.
Every
./milland./iwinvocation failed with:out/mill-daemon/server.logshows the real cause on the server side:Root cause
The daemon reads non-JSON on the RPC wire. The environment has
JDK_JAVA_OPTIONS=-XX:MaxRAMPercentage=10set, which makes every JVM Mill spawns printNOTE: Picked up JDK_JAVA_OPTIONS: ...on start-up. That line lands on the pipe the daemon parses as JSON.Confirmed by bisection, both directions:
env -u JDK_JAVA_OPTIONS ./mill show core.jar— succeeds../mill --no-daemon show core.jar— succeeds, and prints theNOTE:line in its own output where it is harmless../mill show core.jarwith the variable set — fails every time, on a freshout/mill-daemonas well as an existing one.Why it matters
This is an environment fault, not an iw-cli defect, but it is invisible in the launcher's own error text — the launcher reports a crashed worker and says nothing about the wire content. A developer who hits this has no path from the message to the cause without reading
out/mill-daemon/server.log.Workaround used for the whole of IW-436 Phase 2: prefix every build command with
env -u JDK_JAVA_OPTIONS.Wanted
./milland./iwsurvive a setJDK_JAVA_OPTIONS— the wrapper can unset it for the daemon launch.out/mill-daemon/server.log.Related
#443 records the same family — a long-lived build daemon failing as something other than what it reports — and names "the first was Mill's worker:
Worker wire broken, worker likely crashed" without finding the cause. This issue is that cause.Intake: agent-ready
Workflow: diagnostic
Reason: all gates passed
Analysis: project-management/issues/IW-494/analysis.md on branch IW-494
Implement: needs-human
Reason: batch-implement exit 1 — the kanon plugin did not compile against the core of this branch, so no phase ran
mainchanged the tracker port to returnEither[TrackerError, …](#778, #780). The installed kanon plugin still expectsEither[String, …]atlib/batch/ForgeCatchUp.scala:143. This failure is not specific to this issue: every iw-cli issue stops at the same point until the plugin agrees with the core again. Nobatch-implement.logwas written. The output of the command:Release: the implement loop failed this issue for a reason outside it. The kanon plugin did not compile against iw-cli main, because the tracker port now returns TrackerError (iw-cli #778). The plugin fix is dev-docs #484, and iw-cli 0.22.1 carries the core change. The issue goes back to the implement loop.