---
title: "An empty log does not mean the process did nothing | Proofline"
description: "A process that is killed loses whatever its output buffer still holds."
url: https://proofline.sh/learn/empty-log-after-kill/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# An empty log does not mean the process did nothing

A process that is killed loses whatever its output buffer still holds. Before you conclude that a job never started, check how it ended and whether its output was buffered.

Broken dependencies The Proofline team November 24, 2026 3 min read

## Lines that were printed and never written

Each program printed at once, waited, and was killed after one or two seconds with output redirected to a file:

| Program | Signal | Printed | In the file |
| --- | --- | --- | --- |
| Python, two lines | `KILL` | 2 lines | 0 bytes |
| Python with `-u`, two lines | `KILL` | 2 lines | 2 lines |
| Python, 2,000 lines | `KILL` | 2,000 lines | 41,014 bytes, ending mid-line in `processing order` |
| Python, 2,000 lines | `TERM` | 2,000 lines | 41,014 bytes, the same cut |
| Node 24, two lines | `KILL` | 2 lines | 2 lines |
| `grep` in a pipeline, three matches | `KILL` | 3 lines | 0 bytes |

The last complete line in the third file was `processing order 1913`. The program had printed up to 1999. Taking the last line as the place where the job stopped would be wrong by 86 orders. Run with Python 3.12.

`TERM` behaved like `KILL` here, because Python's default response to it ends the process without flushing. A program that handles the signal and exits normally flushes. Node's lines survived in this fixture, which wrote to a file; do not extend that to pipes without testing.

The `grep` row is a reminder that a filter in front of the file buffers too. `grep --line-buffered` writes each match.

## Separate "never ran" from "lost"

| Evidence | Never started | Ran and lost output |
| --- | --- | --- |
| Exit status | 126, 127, or a scheduler error | 137 or 143 |
| File the job creates first | Absent | Present |
| Database rows or requests it makes | None in the window | Some |
| Start recorded by the scheduler | No | Yes |
| Log ends in the middle of a line | No log | A strong sign of a cut buffer |

137 is 128 plus signal 9, so the process received `KILL`. It does not say who sent it: the kernel's memory killer, a container runtime and a person all produce it. Read the memory events or the runtime's record before you write "out of memory".

## Change the capture before the next run

-   Python: `PYTHONUNBUFFERED=1`, or `print(..., flush=True)` at the lines that mark progress.
-   C programs that use stdio: `stdbuf -oL command`, when the program does not set its own buffering.
-   Progress that matters: write it to the database in the same transaction as the work. A log line says the program passed a point, and a committed row says the work is done.

## What to hand over

1.  The exit status and who recorded it.
2.  The file's size and whether the last line is complete.
3.  How output was captured, with every process in the pipeline.
4.  An independent trace of progress, or the sentence "progress unknown after order 1913".

The word "after" in item 4 matters. The log gives a lower bound on progress.

## Worked example

This example is fictional. A nightly job's log is empty, and Ana hands it over as "did not run, rerun it". Ben sees status 137 and 1,950 charges created in the job's window. The job had run and lost its output. A rerun without a check would have charged those accounts again. He finds the first uncharged account from the table and resumes there.

Resuming safely is the topic of [a backfill in progress](/learn/backfill-in-progress-handoff/). Return to [handing over evidence](/learn/engineering-handoff-evidence/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [The error appears before the step that caused it](/learn/stdout-stderr-order-in-logs/)
    
    Broken dependencies The Proofline team November 24, 2026 2 min read
    
-   ### [Capture a hung process before you restart it](/learn/hung-process-evidence-before-restart/)
    
    Capacity overruns The Proofline team November 24, 2026 3 min read
