commit | fa6a47bf0a4d44b6730e4a50984bd555bdb6b3f8 | [log] [tgz] |
---|---|---|
author | Jian Zhang <zhangjian.3032@bytedance.com> | Mon Mar 25 13:22:21 2024 +0800 |
committer | Jayanth Othayoth <ojayanth@gmail.com> | Tue Feb 11 01:49:49 2025 -0600 |
tree | a4f905c77ec9fb7c7f15c26704f170b8b19d849d | |
parent | 41167a2a144783721852d6960ff7626d6e247cc2 [diff] |
watch: fix memory leak in Watch class See systemd manunal[0], ``` If the second parameter of sd_event_add_io() is NULL no reference to the event source object is returned. In this case the event source is considered "floating", and will be destroyed implicitly when the event loop itself is destroyed. ``` The Watch class should release the event source object when destructing the Watch object. Tested: 1. Run CreateDump Stress Test ``` while true; do busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0; sleep 200; done ``` 2. run the command to monitor the memory heap size of dump-manager, and no memory leak found. ~# watch -n 10 "cat /proc/[PID]/smaps | grep heap -A 4 | grep ^Rss" [0]: https://www.freedesktop.org/software/systemd/man/latest/sd_event_add_io.html Change-Id: I530bda40a7a7307ee87f03a24c242dde4eae2b14 Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.
One such mechanism is dreport, a script that collects debug data and packages it into an archive file.
To build this package with meson, do the following steps:
1. meson builddir 2. ninja -C builddir
To clean the built files run ninja -C builddir clean
.
Tests can be run in the CI docker container, refer local-ci-build
or with an OpenBMC x86 sdk(see below for x86 steps).
meson -Dtests=enabled build ninja -C build test