"Too long with no output" overwrites previous output

When a build step times out, CircleCI generates a “Too long with no output” message in the output. If you’re viewing the build page when this occurs, you can see the output that the step generated prior to this message. However, if you load a build page where the timeout has already occurred, the only visible output is the “Too long with no output” message. Any of the output that may have helped you to diagnose the issue is irretrievably gone.

Test case here: https://circleci.com/gh/jfirebaugh/circle-ci-output-bug/2. I’ve been watching this build since it started, and can see the “A first hello” output. But all you will see is “Too long with no output”.

I can confirm this. The same is happening in some of my builds:

Accessing the logs using the API also shows only the “too long with no output”. For example:

curl https://circleci.com/api/v1.1/project/github/lagom/lagom/141

And then curl again the output_url for that step returns:

HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: max-age=31536000
Content-Encoding: gzip
Content-Length: 117
Content-Type: application/json
Date: Wed, 14 Aug 2019 16:23:18 GMT
ETag: "c7d2bb80e88789339788e65390563c8e"
Last-Modified: Wed, 14 Aug 2019 15:07:05 GMT
Server: AmazonS3
x-amz-id-2: a5fhgAboBXLJhWhsPVihWmQGDhlsmhSEOXTiE8ah+j1VKmGGjIjf0a1w1R+ayqNTpTaOsU57ogw=
x-amz-request-id: B0E3A78A11CEC399

        "message": "Too long with no output (exceeded 10m0s)",
        "time": "2019-08-14T15:07:04.192Z",
        "type": "err"