#
4f68fc46 |
| 25-Nov-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Initial Commit
This commit introduces clang-tidy and modifies code to address issues flagged by the checks. Additionally, it includes the initial infrastructure setup.
Tested: Build and
clang-tidy: Initial Commit
This commit introduces clang-tidy and modifies code to address issues flagged by the checks. Additionally, it includes the initial infrastructure setup.
Tested: Build and unit tests completed successfully.
Change-Id: I55f9f4a2a9a1b1cd2016773b47935484d6a57867 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
#
93f06410 |
| 02-Jun-2024 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Add Serialization Support for Dump Entry Attributes
Implemented serialization of dump entry attributes using the nlohmann::json library. Added serialization support in the Dump Entry class, serializ
Add Serialization Support for Dump Entry Attributes
Implemented serialization of dump entry attributes using the nlohmann::json library. Added serialization support in the Dump Entry class, serializing attributes including originatorId, originatorType, and startTime. These attributes are not part of the dump filename and thus require serialization to ensure their state is preserved.
Deserialization will occur only if the serialization version matches and the dump ID in the dump object matches the ID in the serialized file.
Tests: - Created BMC dumps and restarted service - Created BMC dumps and restarted BMC - Created 200 BMC dumps and restarted service and BMC multiple times
File: ``` {"dumpId":2,"originatorId":"","originatorType":1,"startTime":1718199238942411,"version":1} ```
Change-Id: I16ecb058bddd464c8771bd8d08a50ea1877747ed Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
show more ...
|
#
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 ...
|
#
3604710d |
| 29-Jun-2023 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
BMCDump: dump subtype input parameter support
The BMC dump is not accepting any parameters to specify the type of dump or level of data to be collected. It was always creating a default user-request
BMCDump: dump subtype input parameter support
The BMC dump is not accepting any parameters to specify the type of dump or level of data to be collected. It was always creating a default user-requested dump.
This commit allows for the specification of the dump type during the dump creation process. A new table has been added in a new header file which stores the valid dump types. When a new dump is requested, the specified dump type is verified against this table. If no dump type is mentioned, a user-requested BMC dump is created for backward compatibility. If an invalid dump type is mentioned, an Invalid Argument exception is thrown.
Tested: - Create BMC dump with no arguments - Create BMC dump with type as user - Create a error log dump and make sure other types of dumps which is using internal interface is not impacted. - Built with master and p10bmc
Change-Id: I79f68be6ac6892ac7754b7221db64c22330b1822 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
show more ...
|
#
3ed02c32 |
| 28-Jun-2022 |
Marri Devender Rao <devenrao@in.ibm.com> |
sdevent:inode entry is not released after creating dump
For every dump generated an "anon_inode:[pidfd]" entry is created for the associated process and the same is not released.
When the number of
sdevent:inode entry is not released after creating dump
For every dump generated an "anon_inode:[pidfd]" entry is created for the associated process and the same is not released.
When the number of inode entries reach the maximum count dump request will fail and the dump service takes a reset with a core dump.
When a dump is requested a child process is spawned to perform dump collection, parent process waits on the child process completion using sd-event-add-child systemd call.
sd-event-add-child adds an inode entry which needs to be released during the callback method called after child process exit using unref but the same is not done.
Now switching to sdeventplus::source::Child wrapper class for sd-event-add-child which takes care of releasing the inode fd.
Tested: ''' Without the fix for the 3 dumps created noticed 3 anon_inode:[pidfd] are added but not cleared root@rain135bmc:/proc/2044/fd# ls -la dr-x------ 2 root root 0 Jun 27 08:38 . dr-xr-xr-x 8 root root 0 Jun 27 08:38 .. lr-x------ 1 root root 64 Jun 27 08:39 0 -> /dev/null lrwx------ 1 root root 64 Jun 27 08:39 1 -> socket:[21586] lrwx------ 1 root root 64 Jun 27 08:39 10 ->anon_inode:[timerfd] lrwx------ 1 root root 64 Jun 27 08:47 11 ->anon_inode:[pidfd] lrwx------ 1 root root 64 Jun 27 08:47 12 ->anon_inode:[pidfd] lrwx------ 1 root root 64 Jun 27 08:47 13 ->anon_inode:[pidfd]
After the fix noticed all the anon_inode:[pidfd] are cleared dr-x------ 2 root root 0 Jun 27 08:38 . dr-xr-xr-x 8 root root 0 Jun 27 08:38 .. lr-x------ 1 root root 64 Jun 27 08:39 0 -> /dev/null lrwx------ 1 root root 64 Jun 27 08:39 1 -> socket:[21586] lrwx------ 1 root root 64 Jun 27 08:39 10 ->anon_inode:[timerfd] '''
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com> Change-Id: I9a2fec0a2287bfe978b811671c1cfeb1356e59d2
show more ...
|
#
73953b8f |
| 15-Feb-2022 |
Marri Devender Rao <devenrao@in.ibm.com> |
bmcdump: ignore dump request when a dump is in progress
At present generating a user dump is an asynchronous call and does not block the user to generate another dump.
This can cause out-of-memory
bmcdump: ignore dump request when a dump is in progress
At present generating a user dump is an asynchronous call and does not block the user to generate another dump.
This can cause out-of-memory issues if dumps are generated in a loop.
Adding a check to see if the user-initiated dump is already in progress before starting another user dump request.
Return "Unavailable" error if generate user dump request is received while a user dump generation is in progress.
Tested: ''' root@p10bmc:~# busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0 MESSAGE "o" { OBJECT_PATH "/xyz/openbmc_project/dump/bmc/entry/3"; };
root@p10bmc:~# busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0 Call failed: The operation is not allowed root@p10bmc:~# busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0 Call failed: The operation is not allowed root@p10bmc:~# busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0 MESSAGE "o" { OBJECT_PATH "/xyz/openbmc_project/dump/bmc/entry/4"; };
'''
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com> Change-Id: Ic9434f34c040405f8664f7dc71109e7cb67a80c2
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 ...
|
#
ddc3366e |
| 19-Jul-2021 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Update dump create parameters
Dump create parameters are a set of parameters accepted in dict format while creating the dump. So far the values can be only strings but now unit64 also added. This co
Update dump create parameters
Dump create parameters are a set of parameters accepted in dict format while creating the dump. So far the values can be only strings but now unit64 also added. This commit address the changes to handle the updated dictionary
Testing: - Full build with interface change is successful - Created dumps with new interface Resource Dump: busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/resource xyz.openbmc_project.Dump.Create CreateDump a{sv} 2 "com.ibm.Dump.Create.CreateParameters.VSPString" s "vsp" "com.ibm.Dump.Create.CreateParameters.Password" s "0" MESSAGE "o" { OBJECT_PATH "/xyz/openbmc_project/dump/resource/entry/1"; };
BMC Dump: busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc xyz.openbmc_project.Dump.Create CreateDump a{sv} 0 MESSAGE "o" { OBJECT_PATH "/xyz/openbmc_project/dump/bmc/entry/92"; };
System Dump: busctl --verbose call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/system xyz.openbmc_project.Dump.Create CreateDump a{sv} 0 MESSAGE "o" { OBJECT_PATH "/xyz/openbmc_project/dump/system/entry/1"; };
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I37ab7d870954e1b52500f5975735286433fbb8df
show more ...
|
#
ff92ffe2 |
| 09-Feb-2021 |
George Liu <liuxiwei@inspur.com> |
Collect ramoops data into BMC dump
- Add ramoops file monitor and support to enable ramoops data collection for kernel dump.
- Systemd will collect ramoops data and write it into /var/lib/syste
Collect ramoops data into BMC dump
- Add ramoops file monitor and support to enable ramoops data collection for kernel dump.
- Systemd will collect ramoops data and write it into /var/lib/systemd/pstore when a system kernel oops/panics.
- Today, need to grab everything in that directory, put it in a dump and then delete everything in that directory.
Tested: - Simulate a kernel panic by creating similar data in the expected location. `dmesg > /var/lib/systemd/pstore/dmesg1.txt` `dmesg > /var/lib/systemd/pstore/dmesg2.txt` `dmesg > /var/lib/systemd/pstore/dmesg3.txt` `dmesg > /var/lib/systemd/pstore/dmesg4.txt`
tar -tvf obmcdump_1_248.tar.xz:
drwxr-xr-x 0/0 0 1970-01-01 00:01:32 obmcdump_1_248/ -rw-r--r-- 0/0 21239 1970-01-01 00:01:32 obmcdump_1_248/dmesg1.txt -rw-r--r-- 0/0 21239 1970-01-01 00:01:32 obmcdump_1_248/dmesg2.txt -rw-r--r-- 0/0 21239 1970-01-01 00:01:32 obmcdump_1_248/dmesg3.txt -rw-r--r-- 0/0 21239 1970-01-01 00:01:32 obmcdump_1_248/dmesg4.txt -rw-r--r-- 0/0 162 1970-01-01 00:01:32 obmcdump_1_248/dreport.log -rw-r--r-- 0/0 294 1970-01-01 00:01:31 obmcdump_1_248/os-release -rw-r--r-- 0/0 278 1970-01-01 00:01:31 obmcdump_1_248/summary.log
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I05bca408f4dcc2b62350104a0c5f757d740dde22
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 ...
|
#
969f9a59 |
| 30-Oct-2020 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Update createDump to accept additional parameters
Updating create dump implementation to match the change in the interface to accept the additional parameters.
Testing: Created BMC dump Creat
Update createDump to accept additional parameters
Updating create dump implementation to match the change in the interface to accept the additional parameters.
Testing: Created BMC dump Created system dump
Dbus changes associated with this: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/37355
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I1402a9c4c8e0e5c6277055d835f7d024673831d8
show more ...
|
#
6ccb50e1 |
| 29-Oct-2020 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Return the object path for user requested dumps.
Return the object path to a dump entry for the user requested dump. A dump entry will be created when the user request for the dump and that will be
Return the object path for user requested dumps.
Return the object path to a dump entry for the user requested dump. A dump entry will be created when the user request for the dump and that will be used for tracking the progress. The dump details like size etc will be empty and the complete details will be filled once the dump creation is completed.
Executed current BMC and system dump test cases on a test build - Create BMC dump - List All dumps - Offload BMC dump - Delete BMC dump - Create manual system dump. - Attempt to offload dump.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: I89b252e2731f4f1fb924d26c7ac05999341fc691
show more ...
|
#
fef66a95 |
| 06-Sep-2020 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Create dump manager for each dump type.
Currently all types of dumps exist in the same path and under the single dump manager. When there are multiple dumps to be created separate path is needed for
Create dump manager for each dump type.
Currently all types of dumps exist in the same path and under the single dump manager. When there are multiple dumps to be created separate path is needed for creating and managing the dump. this commit is splitting the dump manager into multiple objects without adding any new functionality. There will be only one dump manager process but it will contain seperate dump manager objects for system and BMC dumps as per current scope.
Tested the existing dump functions with the build - created bmc dump - created system dump using notify - deleted dump entry - offloaded bmc dump
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> Change-Id: Id4806660be1f1ba0b3cb6f840ae185a967f05a83
show more ...
|