History log of /openbmc/phosphor-debug-collector/ (Results 1 – 25 of 342)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
fa6a47bf25-Mar-2024 Jian Zhang <zhangjian.3032@bytedance.com>

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 sou

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>

show more ...

41167a2a10-Dec-2024 Jian Zhang <zhangjian.3032@bytedance.com>

dreport: collecting all namespace journal logs

For BMCs that support multiple namespaces to manage logs, add the
--namespace=* option to the journalctl command to collect all logs.

refer to systemd

dreport: collecting all namespace journal logs

For BMCs that support multiple namespaces to manage logs, add the
--namespace=* option to the journalctl command to collect all logs.

refer to systemd-journald.service.html[0].

Tested:
1. Prepare a namespace configuration, to isolate logs (in general for
the third-party code, like silicon vendor, etc), avoid too many
unexpected to noise the system.
```
~# cp /etc/systemd/journald.conf /etc/systemd/journald@intel.conf
~# mkdir -p /etc/systemd/system/com.intel.crashdump.service.d
~# echo "[Service]" > /etc/systemd/system/com.intel.crashdump.service.d/override.conf
~# echo "LogNamespace=intel" >> /etc/systemd/system/com.intel.crashdump.service.d/override.conf
~# reboot # or restart systemd-journald, and daemon-reload
````

2. using journalctl vs journalctl --namespace=*
```
~# journalctl -u com.intel.crashdump.service
Dec 10 16:56:49 xxx systemd[1]: Starting Intel BMC CPU Crashdump...
Dec 10 16:56:55 xxx systemd[1]: Started Intel BMC CPU Crashdump.
```

```
~# journalctl --namespace=*
Dec 10 16:56:49 xxx systemd[1]: Starting Intel BMC CPU Crashdump...
Dec 10 16:56:55 xxx systemd[1]: Started Intel BMC CPU Crashdump.
Dec 10 16:56:57 xxx crashdump[258]: Crashdump version: ....
Dec 10 16:56:57 xxx crashdump[258]: Initializing crashdump...
....
```

3. After this change, check the journal logs, and the journal logs
should be collect the logs from all namespaces.
```
cat journal-pretty.log| ag "Initializing crashdump"
"MESSAGE" : "Initializing crashdump...",
```

[0]: https://www.freedesktop.org/software/systemd/man/latest/systemd-journald.service.html#Journal%20Namespaces

Change-Id: I70f33eb6119cbe041bb0dc2aac527e02d8f5e757
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>

show more ...

d56bab5508-Aug-2024 Jian Zhang <zhangjian.3032@bytedance.com>

dreport: fix procfd missing

During the execution of 'ls -Al /proc/*/fd/ 2> /dev/null', some
processes may stop, like `while true; do echo "Hello" > /dev/null; done`

Causing the ls cmd to fail, and

dreport: fix procfd missing

During the execution of 'ls -Al /proc/*/fd/ 2> /dev/null', some
processes may stop, like `while true; do echo "Hello" > /dev/null; done`

Causing the ls cmd to fail, and as a result, the procfs.log will not be
collected in the dump log.

So ensure ls procfd returns success.

Tested:
1. Run `while true; do echo "Hello" > /dev/null; done` in the
background.

2. Run `set -e; while true; do ls -Al /proc/*/fd/ 2> /dev/null
|| true; done`, the command will not stop
(before the fix, the command will stop quickly).

Change-Id: I1f4e8fda000f303fd579825e0a94efdba5a097eb
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>

show more ...

ffbb9d6d07-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-tidy: filter out subproject headers

Subproject headers should be filtered out so that when building
outside of the CI docker container (or Yocto) we do not get tons
of clang-tidy failures for

clang-tidy: filter out subproject headers

Subproject headers should be filtered out so that when building
outside of the CI docker container (or Yocto) we do not get tons
of clang-tidy failures for things present in those subprojects.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I35e909d667ce700e6c68ff3c2f269f1ef549dca3

show more ...

2c63448f06-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

openpower-dumps: eliminate special generated config file

Meson calls for 'clang-tidy' changed behavior such that it will call
for all "c-like" files in a repository rather than just the ones pulled

openpower-dumps: eliminate special generated config file

Meson calls for 'clang-tidy' changed behavior such that it will call
for all "c-like" files in a repository rather than just the ones pulled
in as dependencies. When openpower extensions are disabled, this means
that we fail clang-tidy because required header files do not exist.

The generated header file has a few constants that are not openpower
specific. Move them to the top-level config.h.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2ee5c9246b9c47b564130c22ff8e02fee7f752b1

show more ...

57de251c01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

Change-Id: Ic556a6e6065b9df4cf778ba91d7bf5619f2955ca
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

4207adcd01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I88079e69decd57b30d0455a723fd051be8449e36
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I88079e69decd57b30d0455a723fd051be8449e36
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

ecdd36d806-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang: Fix include path for pldm_utils.hpp

Updated the include directive in pldm_oem_cmds.cpp to correctly
reference the path to pldm_utils.hpp. This resolves the issue
fixes the error below

'''
ho

clang: Fix include path for pldm_utils.hpp

Updated the include directive in pldm_oem_cmds.cpp to correctly
reference the path to pldm_utils.hpp. This resolves the issue
fixes the error below

'''
host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp:19:10:
error: 'pldm_utils.hpp' file not found [clang-diagnostic-error]
'''

Change-Id: I34a99d1ba199be045da63e92d896ded100865ba7
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

7d6d244506-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang:tidy host-transport-extensions Fix warnings

Fixed cppcoreguidelines-special-member-functions warning by defining
the move constructor and move assignment operator for the
PLDMInstanceManager c

clang:tidy host-transport-extensions Fix warnings

Fixed cppcoreguidelines-special-member-functions warning by defining
the move constructor and move assignment operator for the
PLDMInstanceManager class.

'''
error: class 'PLDMInstanceManager' defines a non-default destructor, a copy constructor
and a copy assignment operator but does not define a move constructor or a move assignment
operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
'''

Change-Id: I959bed0787ee35de4aaeaf13ff53956198621493
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

3b44559f06-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy:openpower-dumps fix warning bugprone-

Fixed the bugprone-forward-declaration-namespace warning by including
the appropriate header file. This ensures that the forward declaration
and defi

clang-tidy:openpower-dumps fix warning bugprone-

Fixed the bugprone-forward-declaration-namespace warning by including
the appropriate header file. This ensures that the forward declaration
and definition are in the same namespace, preventing namespace-related
issues.

Change-Id: If65f993252d6f24a529e626544affb80bbe3e6d5
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

938588b006-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy: disable readability-suspicious-call-ar

This commit disables the readability-suspicious-call-argument check
in Clang-Tidy configuration to avoid false positives errors

'''
../dump-exte

clang-tidy: disable readability-suspicious-call-ar

This commit disables the readability-suspicious-call-argument check
in Clang-Tidy configuration to avoid false positives errors

'''
../dump-extensions/openpower-dumps/dump_manager_system.cpp:94:18: error: 2nd argument 'size' (passed to 'dumpSize')
looks like it might be swapped with the 3rd, 'dumpId' (passed to 'sourceId')
[readability-suspicious-call-argument,-warnings-as-errors]
94 | upEntry->update(timeStamp, size, dumpId);
| ^ ~~~~ ~~~~~~
../dump-extensions/openpower-dumps/system_dump_entry.hpp:78:10: note: in the call to 'update', declared here
78 | void update(uint64_t timeStamp, uint64_t dumpSize, const uint32_t sourceId)
| ^ ~~~~~~~~ ~~~~~~~~
'''

Change-Id: I39ff4d4002373cee8c1a17f2c416c563d259a74a
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

282c3c5106-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang: fix undeclared identifier

Included config header file to resolve the following error after
recent build version upgrade.

'''
error: use of undeclared identifier 'FAULTLOG_DUMP_PATH' [clang-d

clang: fix undeclared identifier

Included config header file to resolve the following error after
recent build version upgrade.

'''
error: use of undeclared identifier 'FAULTLOG_DUMP_PATH' [clang-diagnostic-error]
'''

Change-Id: I140c0074104bd65387d2b3621c580fd4fecd9849
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

e596d7a806-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang:openpower-dumps: fix defaulted-function-dele

Addressed the issue where the defaulted copy constructor is implicitly
deleted due to a base class having a deleted copy constructor.

'''
error: e

clang:openpower-dumps: fix defaulted-function-dele

Addressed the issue where the defaulted copy constructor is implicitly
deleted due to a base class having a deleted copy constructor.

'''
error: explicitly defaulted copy constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
'''

Change-Id: I4a944a9b4213142486be8e9b4bfe442dc01d1697
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

100be9de06-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy: disable cppcoreguidelines-avoid-non-c

Disabled the `cppcoreguidelines-avoid-non-const-global-variables`
check due to dependency on libpldm library API that requires
non-const global vari

clang-tidy: disable cppcoreguidelines-avoid-non-c

Disabled the `cppcoreguidelines-avoid-non-const-global-variables`
check due to dependency on libpldm library API that requires
non-const global variables.

Change-Id: I65af4735dfc88f0dce8ca20477f9466eb8b5e174
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

07b9b56d06-Feb-2025 Jayanth Othayoth <ojayanth@gmail.com>

clang: add header for uint32_t

fixes the below error related to unknown type name `uint32_t`:

'''
error: unknown type name 'uint32_t' [clang-diagnostic-error]
'''

Change-Id: I13b5ebb1ad5e848491030

clang: add header for uint32_t

fixes the below error related to unknown type name `uint32_t`:

'''
error: unknown type name 'uint32_t' [clang-diagnostic-error]
'''

Change-Id: I13b5ebb1ad5e8484910300ffe5aaa1edac0d3cd8
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

ceba1f0705-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

dump-extensions: openpower: add header for uint32_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I1ab8672c475d209ee99058734d5ceee6c79a7cb2

8e62d55505-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

host-transport: pldm: fix variable shadow

Inside a single function are two variables both named 'eid' but
of different types. This causes confusion to clang and implicit
constructors are inadverten

host-transport: pldm: fix variable shadow

Inside a single function are two variables both named 'eid' but
of different types. This causes confusion to clang and implicit
constructors are inadvertently called. Eliminate the variable shadow.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2c15799718b0129aad01ab857dec7a255cbf36a3

show more ...

e9ec952e05-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

replace fs alias with std::filesystem

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9072353526c2c18453aa97dc6f9c5d610508609a

7c7ba55d05-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

host-transport: pldm: fix antiquated header

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5bb5644e00e28a41d8c38c4e68df99779927afe0

2f3794fb05-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

dump_types: change filenames to [ch]pp.mako

We have a tendency to name mako files as "foo.type.mako" rather than
"foo.mako.type" because too many tools tend to identify the file as a
"type file" rat

dump_types: change filenames to [ch]pp.mako

We have a tendency to name mako files as "foo.type.mako" rather than
"foo.mako.type" because too many tools tend to identify the file as a
"type file" rather than a "mako file". Right now, meson is somehow
picking up these files as part of the `clang-tidy` invocation and
puking on it. Rename the files both to fit convention and to avoid
the issues.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I65a80860242f7d8841b5d3a18d9847d87d087eb8

show more ...

03414ffa07-Jul-2024 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

Move to libpldm pldm_transport APIs

Replaced pldm transport APIs with libpldm pldm_transport APIs to
remove the dependency on pldm.

This change removes the dependency on pldm by utilizing the
stand

Move to libpldm pldm_transport APIs

Replaced pldm transport APIs with libpldm pldm_transport APIs to
remove the dependency on pldm.

This change removes the dependency on pldm by utilizing the
standardized libpldm APIs for transport operations, improving
maintainability and compatibility.

We don't currently have the infrastructure in place to get the correct
TIDs, so to keep everything working as before use the EID as the TID in
the EID-to-TID mapping.

Test: Tested the resource dump download and delete using GUI
and it works as expected.

Change-Id: I3ec741024c7b99f0ee630678f3b3b49f741e1ea1
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Signed-off-by: Eddie James <eajames@linux.ibm.com>

show more ...

11beea4517-May-2024 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

Move to libpldm instance id APIs

libpldm provides APIs for allocating instance IDs directly, which
eliminates the need for remote dbus calls to the pldm daemon. Refactor
the code to use these APIs

Move to libpldm instance id APIs

libpldm provides APIs for allocating instance IDs directly, which
eliminates the need for remote dbus calls to the pldm daemon. Refactor
the code to use these APIs and eliminate all the dbus operations.

Test: Tested the resource dump download and delete using GUI
and it works as expected.

Change-Id: I9c03de15174f517c182258b88245a58c74f4313f
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Signed-off-by: Eddie James <eajames@linux.ibm.com>

show more ...

971d1a7417-Dec-2024 Matt Fischer <matthew.fischer@hpe.com>

Fix some things in dreport

The version command for dreport doesn't do anything
and so this commit removes it.

Additionally I was having trouble with --quiet and
--verbose. After enough squinting on

Fix some things in dreport

The version command for dreport doesn't do anything
and so this commit removes it.

Additionally I was having trouble with --quiet and
--verbose. After enough squinting one can see that
a different dash character was being used in the
original code, likely these never worked.

Fixes openbmc/phosphor-debug-collector#18

Change-Id: I86eb58e848790122f2c23841de3c39e18acd7d0b
Signed-off-by: Matt Fischer <matthew.fischer@hpe.com>

show more ...

454dee5f18-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have b

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.

See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.

Change-Id: Ice3075169401fab4568d278569e08892702411a7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

f7a5bf7026-Nov-2024 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy: Enable modernize-use-equals-default

Modified code to address issues flagged by this check.

Tested: Build and unit tests passed successfully.

Change-Id: I17f31ea24c59e910ff4249b62334ed7

clang-tidy: Enable modernize-use-equals-default

Modified code to address issues flagged by this check.

Tested: Build and unit tests passed successfully.

Change-Id: I17f31ea24c59e910ff4249b62334ed7f4e38c20c
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...

12345678910>>...14