open-menu closeme
Engineering
github linkedin rss
  • Debugging zero disk reads after moving to Bottlerocket

    calendar Oct 6, 2026 · 9 min read · Linux Container Bottlerocket  ·
    Share on: twitter copy

    Our container platform moved from Amazon Linux 2 (AL2) to Bottlerocket. Soon after the migration started, a partner team that runs Spark jobs reported a regression. Their jobs still finished successfully, but far more of them reported zero "storage read bytes": about 23% of tasks on AL2, and about 56% on …


    Read More
  • Mysterious boot hang on Graviton: mitigated but never root-caused

    calendar Sep 11, 2026 · 10 min read · Linux Bottlerocket  ·
    Share on: twitter copy

    I was getting an arm64 build of our Bottlerocket variant ready for production on Graviton EC2 instances. Load tests kept failing at a low rate. Somewhere between 0.3% and 1% of instances froze a few seconds into boot and never came back. The x86_64 build of the same variant has never done this. I never found the root …


    Read More
  • What is an ABI? Break one to find out

    calendar Sep 1, 2026 · 11 min read · Linux  ·
    Share on: twitter copy

    I used NVIDIA's go-dcgm to read GPU health data and stats. It hardcodes the name of the dynamic library it loads, which looked odd at first and turns out to be good practice. go-dcgm uses cgo, and its initDCGM dlopens the literal string libdcgm.so.4 at runtime: 1func initDCGM(m mode, args ...string) (err error) { 2 …


    Read More
  • Counting systemd service restarts: NRestarts and the D-Bus API behind it

    calendar Aug 18, 2026 · 14 min read · Linux systemd  ·
    Share on: twitter copy

    A while ago I debugged a resource leak caused by a service stuck in a restart loop. Each restart left a process behind, and after a few minutes the host had over a thousand copies of it. Nothing alerted on the loop itself. We noticed CPU and memory climbing, and only found the restart loop after reading the journal. …


    Read More
  • Apply sysctl before systemd: a lesson from reserving ephemeral ports too late

    calendar Aug 1, 2026 · 7 min read · Linux Network Bottlerocket  ·
    Share on: twitter copy

    We run an OpenTelemetry Collector (otel-collector) as a systemd service on Bottlerocket. Its Prometheus metrics endpoint was configured on port 51000, which falls inside the default Linux ephemeral port range. On a small portion of EC2 instances, the otel-collector kept restarting, failing to bind with EADDRINUSE. …


    Read More
  • Don't hardcode fsync in your library

    calendar Jul 20, 2026 · 5 min read · Containers Linux  ·
    Share on: twitter copy

    I recently ran into an issue after upgrading the containerd client library to v2.3.0. The root cause was a change in one of containerd's dependencies, continuity, that started enforcing fsync when copying files. containerd/continuity is a library in containerd that provides filesystem utilities: file copying, directory …


    Read More
  • Replacing socat with systemd-socket-proxyd

    calendar Mar 30, 2026 · 3 min read · Linux Systemd Bottlerocket  ·
    Share on: twitter copy

    Bottlerocket v11.0.0 dropped the socat package from bottlerocket-core-kit (#742). If you had a service that relied on socat to bridge a Unix Domain Socket (UDS) to a TCP port, you need a replacement. This post shows how to use systemd-socket-proxyd instead. Why socat was used soci-snapshotter exposes its metrics …


    Read More
  • Who killed my service: collecting kernel kill logs with OTEL

    calendar Mar 10, 2026 · 6 min read · Linux  ·
    Share on: twitter copy

    We run a container platform. For privacy and security reasons, we do not collect kernel logs because customer workloads use the same kernel as the host and kernel messages can contain sensitive customer data, such as command-line arguments surfaced in audit logs. However, we recently hit a blind spot: foo.service was …


    Read More
  • Simplify device path on boot with udev

    calendar Feb 2, 2026 · 4 min read · Linux Bottlerocket  ·
    Share on: twitter copy

    While prototyping Bottlerocket, I discovered it doesn't recognize additional EBS volumes specified through Block device mappings on Xen. For example, launching the same AMI on t2.medium (Xen) and t3.medium (Nitro) with "DeviceName=/dev/xvdcz": On Nitro, the device appears at /dev/nvme1n1 and …


    Read More
  • Use KillMode=process with caution: restart loop could deplete resources

    calendar Dec 12, 2025 · 4 min read · Linux systemd  ·
    Share on: twitter copy

    I recently debugged a resource leak where a systemd service kept restarting while leaving a process behind after each restart. The root cause isn't particularly interesting: a backward-incompatible third-party dependency upgrade. But the debugging process and lessons learned are. Thousands of zombie processes from a …


    Read More
    • ««
    • «
    • 1
    • 2
    • 3
    • »
    • »»

Peng Zhang

Software Engineer

Recent Posts

  • Debugging zero disk reads after moving to Bottlerocket
  • When sync.Cond is a better primitive than channels: lessons from Go's HTTP/2 client
  • Mysterious boot hang on Graviton: mitigated but never root-caused
  • What is an ABI? Break one to find out
  • Counting systemd service restarts: NRestarts and the D-Bus API behind it
  • Apply sysctl before systemd: a lesson from reserving ephemeral ports too late
  • Don't hardcode fsync in your library
  • When enforcing OCI image spec broke customer containers

Tags

LINUX 26 GO 22 BOTTLEROCKET 10 ALGORITHMS 8 INTERVIEW 7 CONTAINER 6 CONCURRENCY 4 SYSTEMD 4 GUIDE 3 AWS 2 CONTAINERS 2 DISTRIBUTED SYSTEM 2 SELINUX 2 WEB 2
All Tags
ALGORITHMS8 AWS2 BOTTLEROCKET10 CONCURRENCY4 CONTAINER6 CONTAINERS2 CRYPTOGRAPHY1 DATABASES1 DISTRIBUTED SYSTEM2 DNS1 DOCKER1 EC21 GO22 GUIDE3 INTERVIEW7 LINUX26 NETWORK1 SELINUX2 SHELL1 SYSTEMD4 TESTING1 WEB2
[A~Z][0~9]
Peng Zhang

Copyright 2022-  PENG ZHANG. All Rights Reserved

to-top