Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nomad logs: output is incomplete and disordered #4159

Closed
fho opened this issue Apr 16, 2018 · 2 comments · Fixed by #4234
Closed

nomad logs: output is incomplete and disordered #4159

fho opened this issue Apr 16, 2018 · 2 comments · Fixed by #4234

Comments

@fho
Copy link
Contributor

fho commented Apr 16, 2018

Nomad version

reproduced it with 0.8 and 0.7.1

Issue

Running nomad logs multiple times for an allocation that wrote more then X KB of output
to STDOUT produces different results (even when the output isn't changing anymore).
Lines are missing and/or the output is disordered (line X+1 appears before line X).

This seems only to happen when the output of an allocation is bigger then a certain size (1004K of output is sufficient to reproduce it).

I expect that when an allocation is not printing anything new to STDOUT/STDERR that:

  • the output from nomad logs (starting from the offset) is exactly the same then alloc/logs/*.stdout.0, no missing lines, lines appear at the same offset,
  • running nomad logs multiple times always outputs the same

Reproduction steps

  • run a nomad job that produces >= 1004K of STDOUT output (less output may also be sufficient) and then sleep forever
  • run nomad logs multiple times, compare the output

mkdir -p /tmp/logs
for ((i=0;i<30;i++)); do nomad logs <ALLOC_ID> | tee /tmp/logs/$i; done
  • compare them, e.g. with md5sum and diff, most times not even 2 runs of the command produced the same output
@schmichael
Copy link
Member

Thanks for the thorough report @fho! I was easily able to reproduce the bug. I ran log 10 times and it produced 3 distinct results. We'll look into it as soon as possible.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants