(#2029426) Rework PID change handling in journald#273
Merged
systemd-rhel-bot merged 7 commits intoredhat-plumbers:masterfrom Feb 27, 2023
Merged
(#2029426) Rework PID change handling in journald#273systemd-rhel-bot merged 7 commits intoredhat-plumbers:masterfrom
systemd-rhel-bot merged 7 commits intoredhat-plumbers:masterfrom
Conversation
dfbb965 to
9ba5063
Compare
mrc0mmand
previously requested changes
Aug 18, 2022
Member
There was a problem hiding this comment.
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)
Member
|
@dtardon Could you please have a look, thank you. |
Member
|
@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.