-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.6, rhel-9.6.z, rhel-9.7
-
None
-
No
-
Low
-
rhel-sst-cee-supportability
-
None
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
What were you trying to do that didn't work?
Collect coredump files using SoS plugin that are larger than 200M
What is the impact of this issue to you?
Customer requires to collect coredumps of their application using the SoS feature
Please provide the package NVR for which the bug is seen:
since RHEL-9.2.0 when the coredump.py plugin was introduced
package: sos-4.10.0 and later revisions in RHEL 9
How reproducible is this bug?:
Always with coredumps larger than 200M
Steps to reproduce
- Create a set of different coredump sizes 1G, 200M, 400k
- dd if=/dev/urandom of=/tmp/random1g bs=1024 count=1048576
- dd if=/dev/urandom of=/tmp/random200m bs=1024 count=208000
- python -c 'with open("/tmp/random1g", "br") as fp: foo = fp.read(); print("1GiB Read Into Memory"); import os; os.abort()'
- python -c 'with open("/tmp/random200m", "br") as fp: foo = fp.read(); print("200M Read Into Memory"); import os; os.abort()'
- python -c 'import os; os.abort()'
- Run the sos tool with below options:
- sos report -vv --all-logs --log-size=0 --only-plugins=coredump --batch
Expected results
Collection of all coredump succeeds
Actual results
Collection of the coredump that is larger than 200M gets skipped
[plugin:coredump] Skipping core dump file /var/lib/systemd/coredump/core.python.0.546e2ce70a254227bdca9f19590228ac.6789.1764277047000000.zst due to size
Additional Information
The customer tracked the issue to the coredump.py plugin itself, it shows a hardcoded limit
86 # a_c_s does not return any information for a skipped file, 87 # so stat the size here and if the core is larger than our 88 # limit, move on to the next 89 # TODO: do not hardcode this. Extend log-size to per-plugin 90 # TODO: option and link this to that value 91 if os.stat(core_path).st_size > 209715200: 92 self._log_info( 93 f"Skipping core dump file {core_path} due to size" 94 ) 95 continue
In upstream code this may be a regression from being refactored, commit: 99d0ae2
For our code the plugin was included with this issue.