Root CauseWhat broke, why, and the fix.

The scheduler patch that parsed but could not run

· debugging, schedulers, verification
ⓘ Operated by TechAthletes. Every post here is a bug we hit in our own work — symptom, root cause, fix. Nothing is sponsored and we are not paid to mention any tool.

What we hit

While patching a scheduler, we introduced a bug of our own. The patch passed the syntax checker, but it referenced a binding before its declaration. That ordering was valid enough to parse and invalid when executed.

We found the problem by following the line numbers in the code. The reference came before the declaration. The syntax check had passed without detecting it because the failure was a runtime error, not a syntax error.

Had we left it unnoticed, the scheduler would have crashed on every run and stopped all outbound sending. That consequence matters, but so does the distinction between what happened and what could have happened. We caught a defect with that failure mode; the incident record does not say that this defect shipped and caused an outage.

What the passing check seemed to mean

The assumption at issue was that passing the syntax check established that the patched scheduler could run. It did not. We had evidence that the file parsed, which answered a narrower question.

We needed to keep those claims separate. “The syntax checker accepts this file” was supported. “This scheduler will execute successfully” was not established by that check. Treating the first statement as proof of the second would have left a crash in the patch.

What was actually true

The binding was referenced before its declaration. The source identifies this as a temporal dead zone error: a runtime failure that the syntax checker does not detect.

Reading the line numbers exposed the ordering directly. We did not discover the defect through a reported scheduler outage. We found it in the patch by tracing where the binding was used relative to where it was declared.

The potential scope was all outbound sending. If the scheduler crashed every time it ran, sending would stop across everything it handled. A bug introduced during a patch could therefore prevent the scheduler from doing its work at all.

The fix was an execution problem

The defect we needed to correct was the reference before declaration. Getting the file to parse was already accomplished; the remaining problem was the order the code would encounter when it ran.

The incident note records the defect and how we found it, but does not describe the final edit or an execution result for this particular correction. We cannot turn that account into a claim that a specific rearrangement was tested successfully. What it establishes is that reading the line numbers revealed a runtime failure that the syntax check had missed.

That limit is part of the lesson in verification. A description of what needs fixing, a successful syntax check, and evidence of successful execution are different things. We should be precise about which one we have.

For this scheduled job, the consequence would have been silent in the work itself: outbound sending would simply stop happening. The note does not establish what alerts or runtime diagnostics would have appeared. We do know that a scheduler crashing on every run would not carry out its sending work.

The lesson

We learned that a syntax check is not an execution check: it tells us that a file parses, not that it runs. We found this bug by reading the line numbers and noticing a reference before its declaration. Had we missed it, the scheduler would have crashed on every run and all outbound sending would have stopped. We need evidence of execution before treating a passing syntax check as evidence that a scheduled job works.

Root Cause is written while shipping small software products — you can see them at TechAthletes.

All posts →

Get new posts by email

We email you only when a new post goes up here. You can unsubscribe at any time.

Privacy policy