[Bug 394216] New: kexec cannot unload the kdump kernel
https://bugzilla.novell.com/show_bug.cgi?id=394216 Summary: kexec cannot unload the kdump kernel Product: openSUSE 10.3 Version: Beta 1 Platform: PowerPC-64 OS/Version: All Status: NEW Severity: Major Priority: P5 - None Component: Kernel AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: bugproxy@us.ibm.com QAContact: kernel-maintainers@forge.provo.novell.com Found By: Third Party Developer/Partner Partner ID: LTC 41619 =Comment: #0================================================= Mohammed Omar <mohd.omar@in.ibm.com> - 2008-01-17 05:29 EDT ---Problem description:-- Kdump service not able to stop properly. It gives the message " Unloading kdumpkexec_load (0 segments) failed: Invalid argument failed" while running service kdump stop. --rpm used--- kexec-tools-1.101-139 ---service kdump restart--- service kdump restart Unloading kdumpkexec_load (0 segments) failed: Invalid argument failed Loading kdump get memory ranges:1 Modified cmdline:CRASH=1 root=/dev/sda6 quiet sysrq=1 xmon=off elevator=deadline sysrq=1 reset_devices 2 elfcorehdr=39888K savemaxmem=3840M segment[0].mem:0x2000000 memsz:7225344 segment[1].mem:0x26e4000 memsz:65536 segment[2].mem:0x26f4000 memsz:4096 segment[3].mem:0x26f5000 memsz:16384 segment[4].mem:0x26f9000 memsz:2441216 segment[5].mem:0xf710000 memsz:32768 done ----uname -a ------- Linux p55lp3 2.6.22.5-31-ppc64 #1 SMP 2007/09/21 22:29:00 UTC ppc64 ppc64 ppc64 GNU/Linux ------Hardware Environment--- Machine type : p55 Cpu type :power5 ---Is this reproducible?-- Yes -----More Information------- When I replace KEXEC variable in /etc/init.d/kdump to point kexec of kexec-tools-testing-20071017-rc.tar.gz, It works. It properly loads and unloads the kernel. =Comment: #1================================================= Mohammed Omar <mohd.omar@in.ibm.com> - 2008-01-17 08:50 EDT Latest kexec-tools rpm kexec-tools-1.101-150 from the factory also has this issue. --Regards Omar M =Comment: #4================================================= Mohammed Omar <mohd.omar@in.ibm.com> - 2008-02-18 08:44 EDT Sharyathi, OpenSUSE-11.0-Alpha2 doesn't have the kdump kernel in repo.Probably need to wait for another release. I picked up the factory kernel(2.6.24-8-ppc64) from the opensuse mirror, this version had kdump kernel, but after installing , it's version doesn't match the FIRST kernel.So decided to wait till next release. --uname -a----- Linux p55lp3 2.6.24-6-ppc64 #1 SMP 2008/01/31 14:27:52 UTC ppc64 ppc64 ppc64 GNU/Linux --Regards Omar =Comment: #17================================================= Nagesh Sharyathi <sharyathi@in.ibm.com> - 2008-05-21 04:21 EDT Hi This is what is I have understood till now, kexec tool calls kexec_load() system call as ==================== int k_unload (unsigned long kexec_flags) { int result; result = kexec_load(NULL, 0, NULL, kexec_flags); ===================== Where kexec flag is set to 0x1, ===================== In the kernel compat_sys_kernel() if ((flags & KEXEC_ARCH_MASK) == KEXEC_ARCH_DEFAULT) return -EINVAL; <== exits from here flags & Kexec_ARCH_MASK equals 0x0 and hence matches with KEXEC_ARCH_DEFAULT (0x0) and hence it exits with EINVAL. ===================== I need to understand what is the best way to fix the problem. Thanks Sharyathi =Comment: #19================================================= Nagesh Sharyathi <sharyathi@in.ibm.com> - 2008-05-23 07:39 EDT Fix to the problem I am attaching the fix to the problem. It has been mirrored to lkml and waiting on response. =Comment: #21================================================= Michael Ranweiler <mranweil@us.ibm.com> - 2008-05-23 16:34 EDT Patch to fix problem with service kdump start Hi Before debugging the problem I came to know service kdump start was not working. This patch is just a hack to make it work. Hope it helps Thanks Sharyathi -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bugproxy@us.ibm.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c1 --- Comment #1 from LTC BugProxy <bugproxy@us.ibm.com> 2008-05-23 14:41:38 MDT --- Created an attachment (id=217909) --> (https://bugzilla.novell.com/attachment.cgi?id=217909) Fix to the problem -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bugproxy@us.ibm.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c2 --- Comment #2 from LTC BugProxy <bugproxy@us.ibm.com> 2008-05-23 14:41:39 MDT --- Created an attachment (id=217910) --> (https://bugzilla.novell.com/attachment.cgi?id=217910) Patch to fix problem with service kdump start -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 LTC BugProxy <bugproxy@us.ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http:// -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 Olaf Hering <olh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |bwalle@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 Bernhard Walle <bwalle@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 Lars Marowsky-Bree <lmb@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QAContact|kernel-maintainers@forge.provo.novell.com |jeffm@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bugproxy@us.ibm.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c3 --- Comment #3 from LTC BugProxy <bugproxy@us.ibm.com> 2008-05-26 09:48:51 MDT --- ------- Comment From sharyathi@in.ibm.com 2008-05-26 11:47 EDT------- Indu This is patch provided by Bernhard Walle can you please test the patch .... Eric has suggested to fix the problem in kexec tool rather than in kernel, You can find more detail here:-- http://article.gmane.org/gmane.linux.kernel/685027 -------------------------------- Signed-off-by: Bernhard Walle <bwalle@suse.de> --- kexec/kexec.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/kexec/kexec.c b/kexec/kexec.c index 096fa4f..1550d68 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -702,6 +702,14 @@ static int my_load(const char *type, int fileind, int argc, char **argv, int k_unload (unsigned long kexec_flags) { int result; + long native_arch; + + /* set the arch */ + native_arch = physical_arch(); + if (native_arch < 0) { + return -1; + } + kexec_flags |= native_arch; result = kexec_load(NULL, 0, NULL, kexec_flags); if (result != 0) { -------------------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bwalle@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c4 Bernhard Walle <bwalle@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #217910|0 |1 is obsolete| | --- Comment #4 from Bernhard Walle <bwalle@novell.com> 2008-05-26 09:52:51 MDT --- Created an attachment (id=218153) --> (https://bugzilla.novell.com/attachment.cgi?id=218153) [PATCH] Fix detection of kernel Fixed kexec-tools in user space (see LKML and kexec list for reasons why the fix in kernel is not appropriate). Posted fix upstream. http://article.gmane.org/gmane.linux.kernel.kexec/1534 Added this patch to 11.0 package with changelog: ------------------------------------------------------------------- Mon May 26 14:15:00 CEST 2008 - bwalle@suse.de - fix kexec unload (rckdump stop) on ppc64 (bnc#394216) ------------------------------------------------------------------- For the kdump package. The KDUMP_KERNELVER="kdump" should work. Fixed that in kdump package. Patch attached. Submitted with ------------------------------------------------------------------- Mon May 26 17:45:18 CEST 2008 - bwalle@suse.de - fix load of kdump kernel when KDUMP_KERNELVER="kdump" on ppc64 (bnc#394216) ------------------------------------------------------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bwalle@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c5 Bernhard Walle <bwalle@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #5 from Bernhard Walle <bwalle@novell.com> 2008-05-26 09:53:31 MDT --- See last comment. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bugproxy@us.ibm.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c6 --- Comment #6 from LTC BugProxy <bugproxy@us.ibm.com> 2008-05-30 06:40:54 MDT --- ------- Comment From IndhuDurai@in.ibm.com 2008-05-30 08:35 EDT------- Hi Sharyathi, I have tested the patch that fixes the service kdump start, and it is working fine now. Indhu D -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bugproxy@us.ibm.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c7 --- Comment #7 from LTC BugProxy <bugproxy@us.ibm.com> 2008-06-02 03:49:14 MDT --- ------- Comment From IndhuDurai@in.ibm.com 2008-06-02 05:43 EDT------- hi, I am hitting the following error, after applying the patch provided by Bernhard Walle, Error: kexec/kexec.o: In function `k_unload': /usr/src/packages/BUILD/kexec-tools-testing-20080324/kexec/kexec.c:720: undefined reference to `physical_arch' collect2: ld returned 1 exit status make: *** [build/sbin/kexec] Error 1 Patch: diff --git a/kexec/kexec.c b/kexec/kexec.c index 096fa4f..1550d68 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -702,6 +702,14 @@ static int my_load(const char *type, int fileind, int argc, char **argv, int k_unload (unsigned long kexec_flags) { int result; + long native_arch; + + /* set the arch */ + native_arch = physical_arch(); + if (native_arch < 0) { + return -1; + } + kexec_flags |= native_arch; result = kexec_load(NULL, 0, NULL, kexec_flags); if (result != 0) { I see the following function call "native_arch = physical_arch();" in the patch provided and there is no definition for physical_arch(). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bugproxy@us.ibm.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c8 --- Comment #8 from LTC BugProxy <bugproxy@us.ibm.com> 2008-06-02 03:57:03 MDT --- ------- Comment From IndhuDurai@in.ibm.com 2008-06-02 05:52 EDT------- hi Bernhard, Can you pls provide us with complete patch, as the patch that you have provided hitting at physical_arch() for definition?? Regards, Indhu D -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=394216 User bwalle@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=394216#c9 --- Comment #9 from Bernhard Walle <bwalle@novell.com> 2008-06-02 03:59:30 MDT --- Created an attachment (id=219464) --> (https://bugzilla.novell.com/attachment.cgi?id=219464) refactor architecture detection You need to apply the patch "refactor architecture detection" before. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com