Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Heroku Engineering 6 min read Incident mediumAdept

How We Found and Fixed a Filesystem Corruption Bug

A failed Cedar-14 stack image rollback caused Heroku's container tools to truncate and overwrite a disk image while it was still mounted read-only as dynos' root filesystem. A container-tools upgrade had changed checksum filenames and digests, so the safety check that skips already-present images missed the existing image. Because the page cache still held old pages while the backing file was truncated or half-written, newly loaded binaries mixed cached and missing data and segfaulted for about five hours. A loop-mount reproduction shows the effect, and the fix was migrating dynos to fresh hosts and marking installed images read-only on the host.

Related posts

  • Mitigating CVE-2026-31431 (“Copy Fail”) in Docker Engine

    Docker mediumAdept

    CVE-2026-31431 ("Copy Fail") is a Linux kernel flaw in the AF_ALG algif_aead module. It lets any unprivileged process with an AF_ALG socket write to the shared page cache, so a default container can corrupt files such as setuid binaries for the host and for other containers. Docker's first mitigation in v29.4.2 blocked socket(AF_ALG) via seccomp and denied socketcall(2) outright, because BPF cannot inspect socketcall's pointer arguments. That broke networking for 32-bit glibc, Go GOARCH=386, Wine and SteamCMD workloads, and the int $0x80 path from amd64 could still reach socketcall anyway. Docker Engine v29.4.3 reverts the socketcall deny and blocks AF_ALG at the LSM socket-creation hook through AppArmor and a SELinux CIL module, keeping the seccomp filter as defense-in-depth; patching the kernel remains the real fix.

  • Root Cause Analysis for Render's Extended Service Disruption on 3/26/24

    Render mediumAdept

    A faulty control-plane code change on March 26, 2024 restarted every customer and system workload on Render; a feature-flag bug had kept it from running in staging, and test infrastructure differed between environments. Stateless services and static sites recovered within about 15 minutes. Hundreds of thousands of services with attached disks (managed PostgreSQL, Redis, persistent disks) had to be detached and reattached across hosts at once, which hit internal and cloud-provider rate limits and delayed full recovery to 20:00 UTC. Fixes include higher rate limits, batched disk operations for roughly 10x throughput, least-privilege permissions for control-plane components, consistent test environments and faster, more accurate status-page updates.

  • From 732 bytes to nowhere: shutting down Copy Fail in production

    Together AI mediumAdept

    Copy Fail (CVE-2026-31431) is a logic bug in the Linux kernel's algif_aead AF_ALG interface. It gives an unprivileged local user a 4-byte write into the page cache of any readable file. That is enough to patch setuid binaries in memory and gain root without changing the file on disk, so integrity checks miss it. Together AI mitigated it fleet-wide within hours, without reboots, by unloading the module and moving the .ko file out of the module path so it could not reload. They enforced this as an idempotent config-management health check and planned staged, soak-tested kernel rollouts by region. They will keep the module disabled after patching and are adding telemetry for unexpected AF_ALG use and anomalous privileged-binary behavior.

  • Data Loss: a sad tale with a happy ending

    Replit mediumAdept

    Replit silently lost or corrupted user repl data for months. The root cause was a combination of three things: Go's exec.Cmd connecting stdin/stdout directly to child processes, a filesystem snapshot tool that ignored rare failures in its final write(2)/splice(2) calls under heavy load, and low disk space. Together these truncated snapshot streams without raising any error. The team reverted the triggering deploy, added monitoring at suspected loss points, salvaged corrupt data on load, validated snapshot output before persisting, and ran a batch Dataflow pipeline over old repls. Afterwards they refactored snapshotting and Operational Transformation history persistence, which made repls both more reliable and faster to load.

  • Break Stuff on Purpose

    Slack Engineering mediumAdept

    Slack's internal Kibana cluster failed in January 2024 after running out of disk, a consequence of co-locating its Elasticsearch storage on the same hosts as the application. The rebuild exposed a nearly two-year-old unmonitored backup that failed to restore and an outdated runbook, so users' dashboards and visualizations were lost. The team added scheduled backups, checked S3 retention, rewrote runbooks, and then deliberately filled the disks on a development cluster to rehearse recovery. The drill succeeded but missed the one-hour recovery goal and surfaced missing firewall rules in infrastructure as code. A later Kubernetes migration finished with about 30 minutes of downtime, and the backup script became a CLI that restores from cloud storage with a single command.

The quest for software engineering knowledge.

Look:
Layout: