-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman logs missing last line from json stdout #14458
Comments
So, to clarify here: The container runs to completion, then you run |
That's correct. |
Does it work when you add |
Unfortunately not:
|
If you run podman inspect on that container there should be a entry which shows you the log path. Can you check the file content to see if it is in the log file? |
Certainly (note this is line seems to be only present on the container that I added the --log-driver k8s-file option on the run. I don't see it on the plain run inspect, but that may be expected. It does contain the last line however:
|
Yes your default log driver is journald, so you would need to check the content with |
OK I think I see why this is happening you last line is considered partial (P instead of F). |
So it already works with the journald driver on podman v4.1. However it still does not with with the file driver. I will open a PR tomorrow to fix it. |
Thank you kindly! |
The backend should not convert partial lines to full log lines. While this works for most cases it cannot work when the last line is partial since it will just be lost. The frontend logic can already display partial lines correctly. The journald driver also works correctly since it does not such conversion. Fixes containers#14458 Signed-off-by: Paul Holzinger <[email protected]>
#14477 should fix it As a workaround it should be enough to make your application print an newline on the last line. |
The backend should not convert partial lines to full log lines. While this works for most cases it cannot work when the last line is partial since it will just be lost. The frontend logic can already display partial lines correctly. The journald driver also works correctly since it does not such conversion. Fixes containers#14458 Signed-off-by: Paul Holzinger <[email protected]>
/kind bug
Description
Steps to reproduce the issue:
podman pull docker.io/fkiecad/cwe_checker:stable
podman run fkiecad/cwe_checker:stable /bin/echo --json
ERROR: instr_001022f0_2: Call target at 00102050 does not exist
ERROR: instr_001022f5_2: Call target at 00102050 does not exist
ERROR: instr_001022fa_2: Call target at 00102050 does not exist
ERROR: instr_001022ff_2: Call target at 00102050 does not exist
ERROR: instr_00102304_2: Call target at 00102050 does not exist
ERROR: instr_00102309_2: Call target at 00102050 does not exist
ERROR: instr_0010230e_2: Call target at 00102050 does not exist
ERROR: instr_00102313_2: Call target at 00102050 does not exist
ERROR: instr_00102318_2: Call target at 00102050 does not exist
ERROR: instr_0010231d_2: Call target at 00102050 does not exist
ERROR: instr_00102322_2: Call target at 00102050 does not exist
ERROR: instr_00103070_2: Call target at 00102050 does not exist
ERROR: instr_001050b0_0: Jump target at 00102327 does not exist
ERROR: instr_001050b9_0: Jump target at 00102327 does not exist
ERROR: instr_00105b70_2: Call target at 00102050 does not exist
DEBUG: Pointer Inference @ instr_001042b2_2: Address not contained in runtime memory image
DEBUG: Pointer Inference @ instr_00105963_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00104291_0: Address not contained in runtime memory image
DEBUG: Pointer Inference @ instr_00105ce4_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_00104d42_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_001058a0_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00105c02_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_00105778_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_001043d7_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_001044fe_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00104882_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_001059e8_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00104867_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_001048a8_2: Free on a non-pointer value called.
DEBUG: Pointer Inference: Adding 4 entry points
DEBUG: Pointer Inference: Blocks with state: 14 / 1109
DEBUG: Pointer Inference: Adding 60 speculative entry points
DEBUG: Pointer Inference: Blocks with state: 1040 / 1109
DEBUG: Pointer Inference: Adding 0 speculative entry points
DEBUG: Pointer Inference: Blocks with state: 1040 / 1109
[
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"001032a9"
],
"tids": [
"instr_001032a9_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (001032a9) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"0010335c"
],
"tids": [
"instr_0010335c_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (0010335c) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00103398"
],
"tids": [
"instr_00103398_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"memcmp"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (00103398) -> memcmp"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00103c9e"
],
"tids": [
"instr_00103c9e_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (00103c9e) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00104485"
],
"tids": [
"instr_00104485_2"
],
"symbols": [
"FUN_001043f0"
],
"other": [
[
"dangerous_function",
"memset"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_001043f0 (00104485) -> memset"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105aef"
],
"tids": [
"instr_00105aef_0"
],
"symbols": [
"FUN_00105ac0"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105ac0 (00105aef) -> memcpy"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105b0a"
],
"tids": [
"instr_00105b0a_2"
],
"symbols": [
"FUN_00105b00"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105b00 (00105b0a) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105b30"
],
"tids": [
"instr_00105b30_0"
],
"symbols": [
"FUN_00105b00"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105b00 (00105b30) -> memcpy"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105d52"
],
"tids": [
"instr_00105d52_2"
],
"symbols": [
"FUN_00105d30"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105d30 (00105d52) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105d85"
],
"tids": [
"instr_00105d85_2"
],
"symbols": [
"FUN_00105d30"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105d30 (00105d85) -> memcpy"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105daa"
],
"tids": [
"instr_00105daa_2"
],
"symbols": [
"FUN_00105d30"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105d30 (00105daa) -> memcpy"
},
{
"name": "CWE125",
"version": "0.2",
"addresses": [
"001042b2"
],
"tids": [
"instr_001042b2_2"
],
"symbols": [],
"other": [],
"description": "(Out-of-bounds Read) Memory load at 001042b2 may be out of bounds"
},
{
"name": "CWE125",
"version": "0.2",
"addresses": [
"00104291"
],
"tids": [
"instr_00104291_0"
],
"symbols": [],
"other": [],
"description": "(Out-of-bounds Read) Memory load at 00104291 may be out of bounds"
}
]
podman logs 90613051c45e
ERROR: instr_001022f0_2: Call target at 00102050 does not exist
ERROR: instr_001022f5_2: Call target at 00102050 does not exist
ERROR: instr_001022fa_2: Call target at 00102050 does not exist
ERROR: instr_001022ff_2: Call target at 00102050 does not exist
ERROR: instr_00102304_2: Call target at 00102050 does not exist
ERROR: instr_00102309_2: Call target at 00102050 does not exist
ERROR: instr_0010230e_2: Call target at 00102050 does not exist
ERROR: instr_00102313_2: Call target at 00102050 does not exist
ERROR: instr_00102318_2: Call target at 00102050 does not exist
ERROR: instr_0010231d_2: Call target at 00102050 does not exist
ERROR: instr_00102322_2: Call target at 00102050 does not exist
ERROR: instr_00103070_2: Call target at 00102050 does not exist
ERROR: instr_001050b0_0: Jump target at 00102327 does not exist
ERROR: instr_001050b9_0: Jump target at 00102327 does not exist
ERROR: instr_00105b70_2: Call target at 00102050 does not exist
DEBUG: Pointer Inference @ instr_001042b2_2: Address not contained in runtime memory image
DEBUG: Pointer Inference @ instr_00105963_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00104291_0: Address not contained in runtime memory image
DEBUG: Pointer Inference @ instr_00105ce4_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_00104d42_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_001058a0_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00105c02_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_00105778_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_001043d7_0_r: Unexpected stack register value on return
DEBUG: Pointer Inference @ instr_001044fe_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00104882_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_001059e8_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_00104867_2: Free on a non-pointer value called.
DEBUG: Pointer Inference @ instr_001048a8_2: Free on a non-pointer value called.
DEBUG: Pointer Inference: Adding 4 entry points
DEBUG: Pointer Inference: Blocks with state: 14 / 1109
DEBUG: Pointer Inference: Adding 60 speculative entry points
DEBUG: Pointer Inference: Blocks with state: 1040 / 1109
DEBUG: Pointer Inference: Adding 0 speculative entry points
DEBUG: Pointer Inference: Blocks with state: 1040 / 1109
[
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"001032a9"
],
"tids": [
"instr_001032a9_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (001032a9) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"0010335c"
],
"tids": [
"instr_0010335c_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (0010335c) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00103398"
],
"tids": [
"instr_00103398_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"memcmp"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (00103398) -> memcmp"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00103c9e"
],
"tids": [
"instr_00103c9e_2"
],
"symbols": [
"FUN_00103160"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00103160 (00103c9e) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00104485"
],
"tids": [
"instr_00104485_2"
],
"symbols": [
"FUN_001043f0"
],
"other": [
[
"dangerous_function",
"memset"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_001043f0 (00104485) -> memset"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105aef"
],
"tids": [
"instr_00105aef_0"
],
"symbols": [
"FUN_00105ac0"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105ac0 (00105aef) -> memcpy"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105b0a"
],
"tids": [
"instr_00105b0a_2"
],
"symbols": [
"FUN_00105b00"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105b00 (00105b0a) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105b30"
],
"tids": [
"instr_00105b30_0"
],
"symbols": [
"FUN_00105b00"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105b00 (00105b30) -> memcpy"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105d52"
],
"tids": [
"instr_00105d52_2"
],
"symbols": [
"FUN_00105d30"
],
"other": [
[
"dangerous_function",
"strlen"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105d30 (00105d52) -> strlen"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105d85"
],
"tids": [
"instr_00105d85_2"
],
"symbols": [
"FUN_00105d30"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105d30 (00105d85) -> memcpy"
},
{
"name": "CWE676",
"version": "0.1",
"addresses": [
"00105daa"
],
"tids": [
"instr_00105daa_2"
],
"symbols": [
"FUN_00105d30"
],
"other": [
[
"dangerous_function",
"memcpy"
]
],
"description": "(Use of Potentially Dangerous Function) FUN_00105d30 (00105daa) -> memcpy"
},
{
"name": "CWE125",
"version": "0.2",
"addresses": [
"001042b2"
],
"tids": [
"instr_001042b2_2"
],
"symbols": [],
"other": [],
"description": "(Out-of-bounds Read) Memory load at 001042b2 may be out of bounds"
},
{
"name": "CWE125",
"version": "0.2",
"addresses": [
"00104291"
],
"tids": [
"instr_00104291_0"
],
"symbols": [],
"other": [],
"description": "(Out-of-bounds Read) Memory load at 00104291 may be out of bounds"
}
Describe the results you received:
The stdout from the run command shows the last line with the "]", however the logs command is missing the "]". If I do the same thing with docker the logs command is not missing the last line.
Describe the results you expected:
I expected the logs command to provide the last line of the stdout.
Additional information you deem important (e.g. issue happens only occasionally):
Issue is always reproducible.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
VirtualBox 6.1
The text was updated successfully, but these errors were encountered: