Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP1
kdump.21348
kdump-recover-from-missing-CRASHTIME.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdump-recover-from-missing-CRASHTIME.patch of Package kdump.21348
From: Petr Tesarik <ptesarik@suse.com> Subject: Recover from missing CRASHTIME= in VMCOREINFO References: bsc#1112387 Upstream: merged Git-commit: 0bc94943a1df4d923aa20b9bd1ff01ed2e49d70c CRASHTIME= may be missing in Xen Dom0 dumps. Vmcoreinfo::getLLongValue throws an exception in that case, but then OSRELEASE will not even be attempted. Consequently, kernel and system map files are not copied, producing the following message: INFO: Don't copy the kernel and System.map because of missing crash kernel release. Signed-off-by: Petr Tesarik <ptesarik@suse.com> --- kdumptool/savedump.cc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) --- a/kdumptool/savedump.cc +++ b/kdumptool/savedump.cc @@ -469,13 +469,23 @@ void SaveDump::fillVmcoreinfo() { Vmcoreinfo vm; vm.readFromELF(m_dump.c_str()); - unsigned long long time = vm.getLLongValue("CRASHTIME"); + unsigned long long crashtime; - m_crashtime = Stringutil::formatUnixTime("%Y-%m-%d %H:%M (%z)", time); + try { + crashtime = vm.getLLongValue("CRASHTIME"); + } catch (const KError &error) { + Debug::debug()->dbg("Error getting CRASHTIME: %s", error.what()); + crashtime = time(NULL); + } + m_crashtime = Stringutil::formatUnixTime("%Y-%m-%d %H:%M (%z)", crashtime); - // don't overwrite m_crashrelease from command line - if (m_crashrelease.size() == 0) - m_crashrelease = vm.getStringValue("OSRELEASE"); + try { + // don't overwrite m_crashrelease from command line + if (m_crashrelease.size() == 0) + m_crashrelease = vm.getStringValue("OSRELEASE"); + } catch (const KError &error) { + Debug::debug()->dbg("Error getting OSRELEASE: %s", error.what()); + } Debug::debug()->dbg("Using crashtime: %s, crashrelease: %s", m_crashtime.c_str(), m_crashrelease.c_str());
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor