Signals, shells, and docker: an onion of footguns
Canceled CI runs kept executing pytest because SIGTERM was never forwarded down a long process chain: ci-agent → docker compose → docker → dumb-init → bash → test_pipeline → pytest. Along the way: non-interactive bash without job control waits for the foreground child instead of forwarding SIGINT; ctrl+c signals the whole foreground process group set via tcsetpgrp; bash and busybox ash exec the last command without forking (dash does not); and PID 1 in a container has no default signal handlers. The actual culprit was a docker compose v2 bug (v2.0.0–v2.19.0) where `docker compose run` didn't forward signals, mitigated by tracking and docker-killing containers until the upstream fix.
Related posts
- Docker Best Practices: Choosing Between RUN, CMD, and ENTRYPOINT
Docker mediumAdeptRUN executes commands at image build time and creates layers, CMD sets a default command that any docker run arguments replace, and ENTRYPOINT fixes the executable so that run arguments are appended to it. Pairing an exec-form ENTRYPOINT with CMD as default arguments gives a container that acts like a standalone executable whose parameters users can override. Exec form is preferred for CMD and ENTRYPOINT because the process runs directly as PID 1 and receives signals such as SIGTERM, which allows graceful shutdown. Shell form runs under /bin/sh -c, which usually does not forward signals, so it fits only cases that need pipes, globbing or variable expansion. An ApacheBench example shows a URL argument overriding CMD and failing as a command.
- Fixing the Git Blame Beachball
Zed mediumAdeptCommitting with many files open froze Zed for about 10 seconds. Instruments' Thread State and Narrative views showed the main thread stuck in a condition-variable wait and repeatedly woken by git. The cause was Inline Git Blame: it listened for git index changes in every open buffer, so one commit spawned 257 concurrent git processes. A priority inversion made it worse, because the 5ms block_with_timeout depended on a GPUI timer task scheduled below background tasks, so the main thread waited seconds instead of milliseconds. Both bugs were fixed in v0.133.7.
- Using modules for Testcontainers with Golang
Zalando Engineering mediumAdeptTestcontainers for Go lets integration tests start real dependencies such as Redis in containers, but raw usage requires knowing ports, wait strategies and environment details. Zalando built an internal wrapper library using the Functional Options Pattern to supply per-dependency defaults, then migrated to the official Testcontainers modules, which do the same job and cut maintenance. A common problem is the Ryuk garbage-collector sidecar failing under Podman; it can be fixed by disabling it with TESTCONTAINERS_RYUK_DISABLED or by running Podman rootful with the privileged and Docker socket override variables.
- How recurring network maintenance exposed 6 bugs
Jane Street Tech Blog hardMasterRecurring weekend network partitions caused Jane Street's Kafka relays and consumer-group monitors to segfault, leak hundreds of thousands of sockets, and crash under recovery-time TCP connection surges, and tracing them uncovered six layered bugs. Among them are an eleven-year-old glibc bug where a failed res_init leaves nscount nonzero with null nameserver pointers so the next gethostbyname segfaults in sock_eq, a UDP socket leak when bind fails with EADDRINUSE under ephemeral-port exhaustion, and a fourteen-year-old Async regression where Tcp.connect_sock's timeout no longer covers DNS resolution. The rest are a Kafka client retry loop that never aborts timed-out attempts, duplicated concurrent discovery lookups, and a job runner migration that cut file-descriptor limits eightfold. Each bug masked the next, and the glibc fix shipped upstream in 2.44.
- Automating cherry-picks between OSS and private forks — PlanetScale
PlanetScale mediumAdeptPlanetScale replaced its weekly cron-based cherry-picking and its conflict-replaying git-replay tool with a stateful Vitess cherry-pick bot that continuously syncs OSS Vitess into a private fork. The bot runs hourly in GitHub Actions and stores state in a PlanetScale database. It fetches merged PRs with go-github and cherry-picks them from OSS main into private upstream, opening draft PRs labeled as conflicts when they don't apply cleanly. Backports to private latest-x.0 branches are triggered by labels. Weekly reconciliation checks flag missed cherry-picks, open PRs and non-backport merges, giving the team confidence to rely on the bot for over a year and a half.