-
Notifications
You must be signed in to change notification settings - Fork 23
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
(#2029426) Rework PID change handling in journald #273
(#2029426) Rework PID change handling in journald #273
Conversation
dfbb965
to
9ba5063
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test won't work without systemd/systemd#15648, since currently we ignore --output-fields=
option in the cat
output mode (-o cat
):
Fedora:
$ journalctl -b -o cat --output-fields=_TRANSPORT -n5
stdout
stdout
stdout
stdout
journal
RHEL 8:
# journalctl -b -o cat --output-fields=_TRANSPORT -n5
kdump: Starting kdump: [OK]
Started Crash recovery kernel arming.
Startup finished in 701ms (kernel) + 1.617s (initrd) + 36.679s (userspace) = 38.998s.
systemd-hostnamed.service: Succeeded.
Source 104.131.155.175 replaced with 2601:603:b7f:fec0:0:ba11:ba11:ba11 (2.rhel.pool.ntp.org)
@dtardon Could you please have a look, thank you. |
@dtardon Could you please rebase on the latest |
If the previous received buffer length is almost equal to the allocated buffer size, before this change the next read can only receive a couple of bytes (in the worst case only 1 byte), which is not efficient. (cherry picked from commit 034e971) Related: #2029426
(cherry picked from commit 549b737) Related: #2029426
(cherry picked from commit 020b4a0) Related: #2029426
Let's introduce an explicit line ending marker for line endings due to pid change. Let's also make sure we don't get confused with buffer management. Fixes: #15654 (cherry picked from commit 45ba1ea) Resolves: #2029426
(cherry picked from commit c11d8fd) Related: #2029426
9ba5063
to
56eccac
Compare
Check: - There is only 3 messages logged with type stdout - Check all messages logged does not have new line: LINE_BREAK=eof - Check that the 3 messages are logged from a different PID - Check the 3 MESSAGE= content (cherry picked from commit d38b3b7) Related: #2029426
(cherry picked from commit a3d9aee) Related: #2029426
56eccac
to
c09bb44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.