-
First Long Run of the Season
Notes from today’s long run — distance, pace, how the legs felt, and what’s next.
-
The Bug Only a Real Postgres Server Could Find
Every test I had — pkg/vdso, pkg/procmem, pkg/trampoline, pkg/inject, pkg/faketime, the end-to-end injection test that checks a target prints timestamps 24 hours ahead — passed. All of it, consistently, for weeks. Then I ran the test that actually mattered: a...
-
Following Forked Children
Everything up to this point assumes injecting into a process means injecting into one process, once, at startup. That assumption is fine for a lot of services in a pipeline. It falls apart against two very ordinary shapes of program:...
-
Designing the faketime API
pkg/inject (the previous post) is correct, but it only knows about one process at a time, and it talks in terms of PIDs, ptrace tracers, and raw offset structs. A test for an end-of-day pipeline doesn’t want any of that...
-
Building the Injector: Remote Mmap and the Trampoline
The previous post ended on: a jump instruction needs somewhere to jump to. That somewhere is a small hand-assembled payload — the trampoline — that has to live in memory I control, within reach of the vDSO, and it has...
-
The vDSO Shortcut
The reason clock_gettime is fast enough for a real service to call constantly — logging, scheduling loops, request timestamps, all the ordinary background noise of a process that mostly waits for an end-of-day trigger — is that, on modern Linux,...
-
The Naive Approach: Ptrace Every Clock Read
Before writing any of the code that ended up in epochd, I tried the approach that seems obvious if you already know Linux gives you ptrace: attach to the target service, catch every clock_gettime syscall as it happens, and rewrite...
-
Testing Batch Jobs Without Waiting for Them
A lot of the distributed systems I work on have a shape like this: several independently-deployed services, each with its own scheduler, and a pile of behavior that only happens once a day — end-of-day settlement, nightly reconciliation, report generation,...