#
1615b824 |
| 31-May-2023 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Remove internal dump create interface
The createDump method was revised to support key-value parameters, allowing flexible dump type specification. This change negates the need for the internal crea
Remove internal dump create interface
The createDump method was revised to support key-value parameters, allowing flexible dump type specification. This change negates the need for the internal create interface, exclusive to the phosphor-debug-collector repository.
This commit removes all instances of the internal create method, replacing them with the updated createDump method. The modified createDump approach ensures a consistent dump initiation procedure and enables all applications to request various dump types.
Manual Tests: - Validate the creation of a user-requested BMC dump. - Validate the creation of a dump due to an InternalFailure. - Generate a core dump to validate the corresponding BMC dump creation. - Ensure that system-generated dumps are allowed when user-requested dump is in progress. - Ensure simultaneous user requested dumps are prevented
Checkstop dump busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging \ xyz.openbmc_project.Logging.Create Create ssa{ss} \ org.open_power.Host.Boot.Error.Checkstop \ xyz.openbmc_project.Logging.Entry.Level.Error 0
Logs: Initiating new BMC dump with type: checkstop path: /xyz/openbmc_\ project/logging/entry/78 performing dump compression /tmp/BMCDUMP.XX.0000003.20230724015349 Report is available in /var/lib/phosphor-debug-collector/dumps/3
Automated tests: Create_And_Delete_User_Initiated_BMC_Dump_Multiple_Times Create_Two_User_Initiated_BMC_Dumps Create_Two_User_Initiated_BMC_Dumps_And_Delete_One Delete_All_User_Initiated_BMC_Dumps_And_Verify Delete_User_Initiated_BMC_Dump_And_Verify Verify_BMC_Core_Dump_When_Host_Powered_Off Verify_BMC_Dump_Create_Errors_While_Another_BMC_Dump_In_Progress Verify_BMC_Dump_Default_Location_In_BMC Verify_Core_Dump_Size Verify_Core_Watchdog_Initiated_BMC_Dump Verify_Dump_Persistency_On_BMC_Reset Verify_Dump_Persistency_On_Dump_Service_Restart Verify_Error_Log_And_Dump_For_Internal_Failure Verify_Error_Response_For_Already_Deleted_Dump_Id Verify_Error_While_Initiating_BMC_Dump_During_Dumping_State Verify_Internal_Failure_Initiated_BMC_Dump_Size Verify_Multiple_BMC_Dump_Creation Verify_User_Initiated_BMC_Dump_At_Host_Booting Verify_User_Initiated_BMC_Dump_Size Verify_User_Initiated_BMC_Dump_When_Host_Booted Verify_User_Initiated_BMC_Dump_When_Host_Powered_Off
Built with master and p10bmc
Change-Id: I9f91375788201e2badf51d87f8117154a8e1ed8a Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
show more ...
|
#
247159b0 |
| 29-Jun-2023 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Add support core dump in common create
This commit modifies the interaction between the core dump monitor and the BMC dump manager. Earlier, when a process managed by systemd crashed, it generated a
Add support core dump in common create
This commit modifies the interaction between the core dump monitor and the BMC dump manager. Earlier, when a process managed by systemd crashed, it generated a core dump. The core dump monitor would then inform the dump manager about this event through a dedicated internal D-Bus interface.
With this commit, we change this approach and leverage the common BMC dump creation interface. Now, when a core dump is generated, the core dump monitor requests the dump manager to create a specific BMC dump that incorporates this core dump data.
Tests: Create a core dump and make sure BMC dump with core is created
>kill -3 2232 Trace: phosphor-dump-manager[542]: Initiating new BMC dump with \ type: core path: /var/lib/systemd/coredump/core.openpower\ -occ-c.0.0b16f513a5bc43f98ea11ed525f1a0c5.2232.16889058660\ 00000.zst
Built with master and p10bmc
phosphor-dump-manager[2738]: Report is available in /var/\ lib/phosphor-debug-collector/dumps/5
Change-Id: Ic2cc723babccb0f8d36504992996bcf418db8463 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
show more ...
|
#
0b566d54 |
| 14-Jun-2023 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Minor cleanup: Remove unused header file and namespace
This commit performs minor by removing an unnecessary header file: phosphor-logging/log.hpp and namespace: using namespace phosphor::logging
T
Minor cleanup: Remove unused header file and namespace
This commit performs minor by removing an unnecessary header file: phosphor-logging/log.hpp and namespace: using namespace phosphor::logging
These cleanup changes have no impact on the functionality. They enhance code cleanliness, reduce potential confusion, and promote better code maintenance and readability.
Test: Created a full build to make sure no errors
Change-Id: I68f2d81c538d3f632e6edd24702efc6ae7b07086 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
show more ...
|
#
d1f670fe |
| 05-Jun-2023 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Implementing Phosphor-Logging/LG2 logging
This commit introduces changes in the phosphor-debug-collector repository to implement structured logging using the LG2 framework. The existing log calls in
Implementing Phosphor-Logging/LG2 logging
This commit introduces changes in the phosphor-debug-collector repository to implement structured logging using the LG2 framework. The existing log calls in the repository, have been replaced with LG2 logging, facilitates better log tracking and troubleshooting by offering improved detail in JSON object values.
Test: - Created BMC dump - Created system dump
Here is a example { "_EXE" : "/tmp/phosphor-dump-manager", "_MACHINE_ID" : "f9ca96d99c7b4ba688556f632ffeff5d", "_CAP_EFFECTIVE" : "1ffffffffff", "LOG2_FMTMSG" : "Invalid Dump file name, FILENAME: {FILENAME}", "__CURSOR" : "s=721ae7a5b6ed43ec904f2bb03e3c0403;i=2a8d0;\ b=b372b9a5989e46bb8e62b33310e181ea;m=2c05fda2b;t=5fdf0684c1e70;x=1592f60584d6486c", "CODE_FUNC" : "void phosphor::dump::bmc::Manager::\ createEntry(const std::filesystem::__cxx11::path&)", "_SYSTEMD_SLICE" : "system-dropbear.slice", "CODE_LINE" : "174", "__REALTIME_TIMESTAMP" : "1686583867350640", "PRIORITY" : "3", "_SYSTEMD_UNIT" : "dropbear@1-9.3.29.238:22-9.3.84.138:45432.service", "_PID" : "16209", "_BOOT_ID" : "b372b9a5989e46bb8e62b33310e181ea", "_SOURCE_REALTIME_TIMESTAMP" : "1686583867350580", "_TRANSPORT" : "journal", "_HOSTNAME" : "openbmc", "SYSLOG_IDENTIFIER" : "phosphor-dump-manager", "MESSAGE" : "Invalid Dump file name, \ FILENAME: BMCDUMP.XXXXXXX.0000006.20230612153010", "CODE_FILE" : \ "/usr/src/debug/phosphor-debug-collector/1.0+gitAUTOINC+a17f1c92ce-r1\ /dump_manager_bmc.cpp", "_UID" : "0", "_CMDLINE" : "/tmp/phosphor-dump-manager", "_RUNTIME_SCOPE" : "system", "FILENAME" : "BMCDUMP.XXXXXXXX.0000006.20230612153010", "_SYSTEMD_INVOCATION_ID" : "64a11629aade4c96ab62154cbc4be8b7", "__MONOTONIC_TIMESTAMP" : "11817441835", "_SYSTEMD_CGROUP" : "/system.slice/system-dropbear.slice/\ dropbear@1-9.3.29.238:22-9.3.84.138:45432.service", "_COMM" : "phosphor-dump-m", "_GID" : "0" }
Change-Id: I3a52b812b059b64d945493de2e2cc68a43f6d72a Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
show more ...
|
#
78e88402 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: If4790d4928efc3e6690ca090aa79f0c7737c3683 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
9b18bf2d |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7ae6214461bdf45c1a21fb702cc8bf5578d827c6
show more ...
|
#
52ac69c1 |
| 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I33245a48eb2c55667cc8d57e8a3aba8af070f880
show more ...
|
#
0eadeb7e |
| 23-Jul-2021 |
Lei YU <yulei.sh@bytedance.com> |
core_manager: Handle dbus exceptions
The code was using deprecated is_method_error() to check errors, but the sdbusplus now throws on DBus errors. When there is no space for new dump (by default 1M)
core_manager: Handle dbus exceptions
The code was using deprecated is_method_error() to check errors, but the sdbusplus now throws on DBus errors. When there is no space for new dump (by default 1M), it will get an exception and crashes like below:
phosphor-dump-monitor[166]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError' phosphor-dump-monitor[166]: what(): sd_bus_call noreply: xyz.openbmc_project.Dump.Create.Error.QuotaExceeded: Dump not captured due to a cap.
Add try-catch to handle the exceptions.
Tested: Verify when there is no space for new dump there is no more dump-monitor crash and it just prints an error:
phosphor-dump-monitor[174]: Failed to create dump
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ibd290587fd16c59be98ccff52887f598ee5b5c33
show more ...
|
#
858fbb2e |
| 30-Jun-2021 |
George Liu <liuxiwei@inspur.com> |
Add fmtlib for phosphor-debug-collector
Call fmtlib to get additional information from journal.
Tested: built phosphor-debug-collector successfully and Unit Test passes.
Signed-off-by: Geo
Add fmtlib for phosphor-debug-collector
Call fmtlib to get additional information from journal.
Tested: built phosphor-debug-collector successfully and Unit Test passes.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ibe65637a0b29b76269fb4bc3f498438901c9306a
show more ...
|
#
0af74a5e |
| 08-Apr-2021 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Update clang-format
Update to the latest OpenBMC clang-format.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Change-Id: I54010d3c756af4c85786285644038d449730612b
|
#
3fc6df48 |
| 08-Apr-2021 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
c++17: drop experimental::filesystem
Use the real filesystem library, and drop support for building with experimental under c++14.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Change-Id: I
c++17: drop experimental::filesystem
Use the real filesystem library, and drop support for building with experimental under c++14.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Change-Id: I730c0d6dce53b5e0aa0867cddb7f325cdb9b45fc
show more ...
|
#
cb65ffce |
| 16-Oct-2018 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Enable clang code format
Change-Id: Ib640ef7cea99ff505965182ec9900a2d53a8986e Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
#
15cd3ce7 |
| 15-May-2018 |
William A. Kennington III <william@wkennington.com> |
Add error handling for message parsing
Some of the signals we try and parse for error logs are not structured in the format we expect when parsing. When error logging is enabled in sdbusplus this ca
Add error handling for message parsing
Some of the signals we try and parse for error logs are not structured in the format we expect when parsing. When error logging is enabled in sdbusplus this causes the phosphor-dump-manager to crash. Fix this crashing by logging errors and ignoring the bad signals.
Change-Id: Ieadcb7e95f622005382f3c4957bf1535e3bb1ef9 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
7f2f8027 |
| 22-Sep-2017 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Fix for missing core file in the ApplicationCored type BMC dump
During application core, Systemd-coredump creates a temporary core file first, compresses the file and renames it to systemd-coredump
Fix for missing core file in the ApplicationCored type BMC dump
During application core, Systemd-coredump creates a temporary core file first, compresses the file and renames it to systemd-coredump name format.
dreport relies on inotify notifications to initiate the core dump collection.
Usually inotify generates IN_MOVED_TO events followed by IN_CLOSE_WRITE event on creation of system-coredump file.
In UBI filesystem, inotify notification events behave differently as summarized below:
-------------------------------------------------------------------- Inotifiy Event : UBI FS : COW -------------------------------------------------------------------- - IN_MOVED_TO : _NA_ : notification event : : structure provides the : : name of the core file. : : - IN_CREATE : notification event : _NA_ : structure provides : : the name of the core : : file. : : : - IN_CLOSE_NOWRITE : notification triggers: _NA_ : directory level and : : size of name field : : shows zero. : : : : : - IN_CLOSE_WRITE : notification event : notification event : structure provides : structure provides the : the INODE number : name of the core file. : instead of name of : : the core file. : ----------------------------------------------------------------------
Current implementation relies on inotify IN_CLOSE_WRITE event with the name of the core file to trigger the dump collection.
However, in UBI FS, the inode number is sent in the inotify instead of the name of the core file.
Hence the copying of the core file during the dump collection process fails due to lack of the file name information.
While IN_CLOSE_WRITE is the appropriate event, IN_CREATE is the closest match for UBI FS.
Hence the *workaround* published by this patch watches for IN_CREATE event for the UBI FS based systems.
One possible side effect is premature handling of large systemd-core file resulting in an incomplete file. However, this was _not_ observed during testing due to the time interval between the inotify and dreport consuming the file.
A more generic fix may be explored for issue #2287.
Resolves openbmc/openbmc#2240
Change-Id: Id88181c62a34c05646eed4ac7e67d9b37a523733 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
show more ...
|
#
bf6ec600 |
| 28-Aug-2017 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Refactor core dump handling functions into core manager class
Change-Id: I700ecf517f26332c0a5e0de87c77cffd94f6bb9a Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|
#
9a56bfa9 |
| 26-Aug-2017 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Add core file name validation in core manager
Move the core file name validation from dreport to core manager. systemd-coredump creates temporary file in core file path prior to actual core file cre
Add core file name validation in core manager
Move the core file name validation from dreport to core manager. systemd-coredump creates temporary file in core file path prior to actual core file creation. This check will help to limit dump creation only for the new core files.
Change-Id: I196d3f372d85aae0a7a36ba7171e6bfd2ff4991b Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
show more ...
|
#
d3273ead |
| 12-Jul-2017 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Add support to enable dump collection for core dump
Implemented d-bus internal create function.
Change-Id: I34088d4c084a5a086189f4bc9e84e53a39193501 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm
Add support to enable dump collection for core dump
Implemented d-bus internal create function.
Change-Id: I34088d4c084a5a086189f4bc9e84e53a39193501 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
show more ...
|
#
d02153c9 |
| 02-Jul-2017 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Update core file monitor infrastructre using common inotify
Resolves openbmc/openbmc#1510
Change-Id: I5f73c4330df8a5deab29e29201e8521740e6b047 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|