Skip to content

fix(nix): run dockerd from / so crashes can't leave core files in the checkout - #426

Open
jcogilvie wants to merge 1 commit into
crossplane:mainfrom
jcogilvie:jco/nix-sh-dockerd-cwd
Open

jcogilvie wants to merge 1 commit into
crossplane:mainfrom
jcogilvie:jco/nix-sh-dockerd-cwd

Conversation

@jcogilvie

Copy link
Copy Markdown
Collaborator

Description of your changes

nix.sh started dockerd from the bind-mounted checkout, so a crashing child process with a relative core_pattern dumped core into the user's repo. On macOS with Rancher Desktop (Rosetta), BuildKit's emulator probe crashes at every dockerd start, leaving an empty core file in the repo root.

This starts dockerd from / instead. All of its paths are absolute, and nix still runs from the checkout.

Verified: ./nix.sh flake check passes, and no core file appears.

I have:

Need help with this checklist? See the cheat sheet.

🤖 Generated with Claude Code

… checkout

nix.sh started dockerd from the bind-mounted checkout, so dockerd and its
children used it as their working directory. If one of them dumps core
and the kernel's core_pattern is relative, the dump lands in the user's
repo. On macOS with Rancher Desktop (Rosetta), BuildKit's emulator probe
crashes at every dockerd start, leaving an empty `core` file in the repo
root.

Start dockerd from / instead. Its paths are all absolute, and nix still
runs from the checkout.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
@jcogilvie
jcogilvie marked this pull request as ready for review October 13, 2026 23:57
@jcogilvie
jcogilvie requested review from a team and tampakrap as code owners October 13, 2026 23:57
@jcogilvie
jcogilvie requested review from bobh66 and removed request for a team October 13, 2026 23:57
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: crossplane/cli/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 83e3898f-8ec5-46f9-8009-e55a3dea1fd8
📥 Commits

Reviewing files that changed from the base of the PR and between 833d6e0 and 3a46549.

📒 Files selected for processing: 1
  • nix.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The dockerd launch now runs from / in a subshell that replaces itself with the daemon. The log path and /nix/docker data root remain unchanged.

Changes: Docker daemon launch

Layer / File(s) Summary
Launch daemon from root
nix.sh
The launch command changes to / before executing dockerd. The log path and data root remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3a465

The daemon now starts from / while nix continues to use the checkout. No concrete merge-blocking risk is evident.

Pre-merge checks: Passed 5 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Title check Warning The title accurately describes the change, but it is 78 characters and exceeds the 72-character limit. Shorten the title to 72 characters or fewer while preserving the main change, such as "fix(nix): run dockerd from / to avoid checkout core files".
Passed Passed checks: 5 passed
Check name Status Explanation
Description check Passed The description clearly explains why dockerd starts from /, the affected environment, verification performed, and checklist status.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Breaking Changes Passed The pull request changes only nix.sh. It does not modify files under apis/** or cmd/**, so it does not remove, rename, or require changes to public fields or flags.
Feature Gate Requirement Passed PASS. The pull request changes only nix.sh. It changes dockerd startup to run from / and keeps the existing absolute data and log paths. The diff adds no experimental feature, changes no `apis/*…
  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant