An edge computer on a vehicle kept crashing and rebooting. Not on a schedule, not under any load I could name from the software side, just often enough to be unacceptable and rarely enough to be maddening. It presented exactly like a software crash, so that is where everyone looked. We read the logs, watched memory, suspected the application, suspected the operating system, added a watchdog to catch the culprit in the act. The watchdog caught nothing useful, because there was nothing in the software to catch. The computer was not crashing. It was being browned out, and a brownout does not leave a stack trace.

The hardest bugs are not in the code.
They are in the space between two things that each work.

01 The crash that wasn't a crash

I had also built the power distribution controller on that vehicle, so eventually I stopped trusting the software story and put a scope on the supply rail. The reboots lined up with something completely ordinary: high-current loads switching on and off. Each time a big load came up it pulled hard for a very short interval, and the rail sagged, briefly, and deeper than anyone had thought to check. The dips were short enough that no average, no panel meter, and no slow log would ever show them. The computer was a capable machine, but it was not automotive-grade, and it had no appetite for transients like that. It saw its supply drop below the brownout threshold for a few milliseconds and did the only sensible thing a computer can do when its power vanishes: it reset.

The software was never the problem. It ran correctly right up to the instant its power went out from under it, and after that it was running nothing at all. There was no bug to find in the code, because the code had done nothing wrong. The fault lived in the electrical seam between two subsystems that each looked perfectly healthy on their own.

02 Why the code is where we look

A reboot presents as a software event. It shows up as a restart in the logs, so instinct sends you straight into the software, because that is the layer that reports the symptom and the layer you can actually change. Software is versioned, observable, cheap to edit, and it holds still while you inspect it. A one-millisecond voltage sag is none of those things. So we search where the light is good, and the light is always brightest on the code. The fault does not care where the light is.

It did not help that every part passed its own test. The computer ran for days on a bench supply. The power controller delivered its rated voltage whenever anyone measured it. Each box was innocent when questioned alone. The failure only appeared when they were wired together and a load switched hard, which is precisely the condition no isolated bench test ever recreated.

03 The bug lives in the seam

The failures that eat a week are rarely inside a well-tested box. They live in the seam between two boxes that each pass their own tests: a shared power rail, a shared bus, the timing between them, the transient behaviour of one meeting the tolerance of the other. My power controller was fine. The computer was fine. What was not fine was the brief, deep sag one produced under switching and the other could not ride through, and nobody owned that interaction, because it was nobody's box.

◉
The seam is nobody's box

Two components that each pass their own tests can still fail together. The failure lives in the space between them, and no single specialist owns that space. Owning it is the integrator's actual job.

04 What I do now

The lesson changed how I hunt. When something that should work keeps failing, the move is to widen the frame, not to deepen the search. Concretely, once a fault resists the code:

When a fault resists the code
Reproduce with the whole system running and switching, not the unit on a bench supply. The fault often needs a neighbour drawing current to appear at all.
Instrument the boundary, not just the function. Put a scope on the rail or an analyzer on the bus, not one more print statement. A millisecond event needs an instrument that can see milliseconds.
Question the environment before the logic. Before assuming the software failed, ask whether it still had what it needs to run: power, clock, a valid input.
Line the failure up against the system, not the log. What else switched, drew current, or moved at that instant?
Suspect the seam between two known-good parts before you suspect either part.
0 / 5

None of this is exotic. It is a habit of not believing the layer you can see just because it is the layer you can see. A rebooting computer is not always a software problem. Sometimes it is a power problem wearing a software costume, and the only way to catch it is to stop reading the code and start measuring the seam.

Key takeaway

When correct code keeps failing, stop deepening the search and widen the frame. The expensive bugs live in the seams between components that each pass their own tests: a shared power rail, a bus, timing, the transient behaviour of one meeting the tolerance of another. Instrument the boundary, not just the function, and when a system reboots or a value goes wrong, ask whether the software still had what it needed to run before you conclude the software was wrong.