Skip to content

tests: 5-10m block possibly during TestExecError in GHA engine tests #7786

Closed

Description

@sipsma

I am not entirely sure what's precisely going on here yet, so just going to list the details I've gathered so far. The end effect is that we seem to be getting multi-minute hangs in GHA when printing certain output. The tests still pass thankfully but it appears to possibly be increasing CI test job time a lot.


One example:

  1. Cloud traces: https://dagger.cloud/dagger/traces/dda1b716e38a06eee8f434b500b6c16e#87f6ab6bc7234db9
  2. GHA job): https://github.com/dagger/dagger/actions/runs/9711496785/job/26804333495

For some reason, the GHA job output seems to more clearly show this hang.

In there, the test output moves quickly for a while until here:

2024-06-28T10:49:44.3199842Z �[95m2603: �[0m    Container.�[1msync�[0m�[2m: ContainerID!�[0m
2024-06-28T10:49:44.3200401Z �[95m2604: �[0m    exec sh -c base64 -d encout >&1; base64 -d encerr >&2; exit 1
2024-06-28T10:55:21.7314561Z �[95m2604: �[0m    �[90m[0.1s] �[0m�[90m|�[0m <truncated really really long string from TestExecError>

Note the 6m gap before the output of the exec is printed (exec in question here).

After the long string, there's another 5m time gap before the next line, after which everything proceeds fast again:

2024-06-28T11:00:02.2189162Z �[95m2604: �[0m    exec sh -c base64 -d encout >&1; base64 -d encerr >&2; exit 1�[33m ERROR�[0m�[90m [0.1s]�[0m
2024-06-28T11:00:02.2190162Z �[95m2604: �[0m    �[33m! process "sh -c base64 -d encout >&1; base64 -d encerr >&2; exit 1" did not complete successfully: exit code: 1�[0m
2024-06-28T11:00:02.2190948Z �[95m2603: �[0m    Container.�[1msync�[0m�[33m ERROR�[0m�[90m [0.2s]�[0m
2024-06-28T11:00:02.2191772Z �[95m2603: �[0m    �[33m! process "sh -c base64 -d encout >&1; base64 -d encerr >&2; exit 1" did not complete successfully: exit code: 1�[0m
2024-06-28T11:00:02.2193184Z �[95m827 : �[0m    /.dagger-cli session --label dagger.io/sdk.name:go --label dagger.io/sdk.version:n/a�[32m DONE�[0m�[90m [1m29.1s]�[0m
2024-06-28T11:00:02.2193937Z �[95m2605: �[0m    includes output of failed exec in error
2024-06-28T11:00:02.2194528Z �[95m2605: �[0m    includes output of failed exec in error�[32m DONE�[0m�[90m [0.4s]�[0m
2024-06-28T11:00:02.2195266Z �[95m2606: �[0m    includes output of failed exec in error when redirects are enabled
2024-06-28T11:00:02.2196060Z �[95m2606: �[0m    includes output of failed exec in error when redirects are enabled�[32m DONE�[0m�[90m [0.3s]�[0m
2024-06-28T11:00:02.2196721Z �[95m2607: �[0m    truncates output past a maximum size
2024-06-28T11:00:02.2197278Z �[95m2607: �[0m    truncates output past a maximum size�[32m DONE�[0m�[90m [0.5s]�[0m
2024-06-28T11:00:02.2197857Z �[95m826 : �[0m    TestExecError�[32m DONE�[0m�[90m [1m29.2s]�[0m

Another seemingly important detail is that the runtime of the traces are ~10m but the runtime of the GHA job is ~14m30s.


Another example of this here:

Same exact behavior of there being large time gaps around that output from TestExecError


I'm not sure what to make of this yet. I can't repro locally.

Some possibilities:

  1. This might actually be a GHA problem? That could explain why the traces and GHA job step execution time are so different. Doesn't seem crazy there could be some block from whatever GHA ingests output to when the CLI tries to print that absurdly long single line (100KB in a single line)
  2. The CLI could be trying to flush output at the end of execution, after traces for the test have ended, but hitting some performance problem of it's own internally maybe? I don't know if this really adds up with all the details of the CLI and it's flushing of telemetry, just a guess.

cc @vito @jedevc

Activity

  1. added
    kind/bug
    on Jun 28, 2024
  2. sipsma commented on Jul 2, 2024

    @sipsma
    ContributorAuthor

    Still seeing this, latest examples:

  3. vito commented on Jul 3, 2024

    @vito
    Contributor

    Seems like this? actions/runner#1031

  4. sipsma commented on Jul 3, 2024

    @sipsma
    ContributorAuthor

    Seems like this? actions/runner#1031

    Great find! Wow yeah that is really odd. Either way, I don't think TestExecError actually relies on the string having no \n in it, I'll see if it can be updated to workaround this for now

  5. sipsma commented on Jul 3, 2024

    @sipsma
    ContributorAuthor

    #7819 (comment) may have fixed this, but leaving open until we've not seen the problem for a bit

  6. sipsma commented on Jul 5, 2024

    @sipsma
    ContributorAuthor

    Looking at CI runs on main, I haven't see this happen any more since merging #7819, so I'll go ahead and close this until proven otherwise

  7. added
    kind/flake
    on Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cikind/bugkind/flake

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions