惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
H
Help Net Security
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
D
Docker
A
About on SuperTechFans
Vercel News
Vercel News
腾讯CDC
C
Check Point Blog
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
J
Java Code Geeks
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
量子位
MongoDB | Blog
MongoDB | Blog
博客园 - 司徒正美
博客园_首页
月光博客
月光博客
U
Unit 42

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Three days I lost chasing a ghost that was already dead o...
Chief Mojo Risin' · 2026-05-25 · via DEV Community
Cover image for Three days I lost chasing a ghost that was already dead on disk

Chief Mojo Risin'

I want to talk about the dumbest bug I've shipped to myself in months. Not because it was clever. Because it wasn't, and I burned three days on it anyway.

Mid-April. I'm doing what I called the Felix V3 graft - rewiring five components in the bot stack to share a single config accessor instead of each one reading env vars on its own. Boring plumbing work. The kind of refactor where you're not building anything new, you're just trying to stop the duplication that's been mocking you every time you open a file.

I got it done in an afternoon. Five components touched, accessor in place, fail-open default so if a key is missing the bot returns a safe value instead of crashing. I was proud of the fail-open part. Felt grown up.

Then the tests went sideways.

The logs were printing variable names that didn't exist in the new code. I'd grep the repo - nothing. Open the file - the line wasn't there. Restart the test. Same log line. Same ghost variable. I started questioning whether I was reading the right repo. Whether I had two checkouts. Whether the disk had silently corrupted. I ran find / -name "felix*.py" 2>/dev/null like a paranoid person at 2am.

I had never opened a terminal until a couple months ago, so my mental model of how a Linux service actually runs is, let's say, under construction. I knew the bot was a systemd service. I knew I'd been editing the files. I assumed - and this is the whole bug - that editing the file on disk meant the running process saw the new code. Because in my head, the file IS the program.

Day three, sitting there with coffee gone cold, I finally read the systemd docs for real instead of skimming. And there it was. When you change a unit file, or the code a daemon is executing, the running process keeps running the version it loaded into memory at startup. The disk has the new code. RAM has the old code. They are two different programs that happen to share a name.

sudo systemctl daemon-reload re-reads the unit definitions. sudo systemctl restart felix actually reloads the Python into a fresh process. I had been doing neither. I had been editing files and watching a corpse run.

The moment I restarted the service, the ghost variable vanished. The new accessor took over. The fail-open default kicked in for one missing key I hadn't noticed and the bot kept serving instead of dying. The thing I built actually worked. It had been working for three days. I just couldn't see it because I was watching the old version perform.

I'm still learning what half of these commands actually do under the hood, and senior devs reading this are going to wince. That's fine. The lesson I want to write down before I forget it:

The file on disk is not the program. The program is what's in memory. When you refactor a long-running service, the refactor isn't done until the process is restarted. Until then you are reading one book and grading a different one.

The second lesson, smaller but I like it more: fail-open accessors save your weekend. I had one config key go missing during the restart because I'd renamed it and forgot to update the env file. Old me would have woken up to a dead bot and angry logs. New me woke up to a bot that returned a sensible default and kept earning. Another Safety Pack went out the door while I was asleep being wrong about how Linux works.

How long did it take you to internalize the difference between the code on disk and the code in memory? And did anyone tell you, or did you have to lose three days to a ghost first?