Skip to content

Commit 50e8a26

Browse files
Swarnendu-R-Crfrandse
authored andcommitted
Phosphor dump manager : Crashed for quota exceeded error
The Problem: BMC goes into Quiesced state due to the crashing of Phosphor Dump manager for not being able to handle the exception thrown while capturing core dumps if the disk quota is full The Solution: An exception handling mechanism is put in place to catch any exception thrown while capturing the dumps, printing the error message and then carry on as susual. Test Results: Oct 12 11:13:44 ever6bmc systemd[1]: Starting Phosphor Dump Manager... Oct 12 11:13:44 ever6bmc systemd[1]: Started Phosphor Dump Manager. Oct 12 11:13:44 ever6bmc phosphor-dump-manager[4834]: Core file found, files size 12 Oct 12 11:13:44 ever6bmc phosphor-dump-manager[4834]: Dump not captured due to a cap. Oct 12 11:13:44 ever6bmc phosphor-dump-manager[4834]: Exception received while capturing dump, xyz.openbmc_project.Dump.Create.Error.QuotaExceeded: Dump not captured due to a cap. Signed-off-by: Swarnendu Roy Chowdhury <[email protected]> Change-Id: Ia38dd0ec91fce5f7c81d4ea3fb5089fd913942dc
1 parent f332a42 commit 50e8a26

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

dump_manager_bmc.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,18 @@ void Manager::checkAndCreateCoreDump()
177177
log<level::INFO>(
178178
fmt::format("Core file found, files size {}", files.size())
179179
.c_str());
180-
captureDump(Type::ApplicationCored, files);
180+
try
181+
{
182+
captureDump(Type::ApplicationCored, files);
183+
}
184+
catch (const std::exception& excp)
185+
{
186+
log<level::ERR>(
187+
fmt::format("Exception received while capturing dump: "
188+
"{}",
189+
excp.what())
190+
.c_str());
191+
}
181192
}
182193
}
183194
}

0 commit comments

Comments
 (0)