Skip to contentSkip to conversation

A regression in IA64 kexec/kdump patch for 2.6.18?

DISCUSSION Jay Lan 2 participants 7 messages Oct 16, 2006 – Oct 17, 2006

lore
Share & tools
lore

Jay Lan

author
#0 lore raw

I ran into a problem not seen in kexec/dkump 2.6.17rc5 ia64 patch. The system on test was an Altix.

The system was booted up fine; however, after loading 'kexec -p' and "echo c >/proc/sysrq-triggeŕ", the crashdump kernel would try to boot up and restarted the system near the end of init().

The extraodinary message observed on the console was
Warning: unable to open an initial console

but the actual reboot seems to be invoked in running /sbin/init:

    run_init_process("/sbin/init");

The problem is 100% reproducible. I have disabled all cpus except cpu0 in my testing.

Is this a known problem? Anyone else runs into this?

Thanks,
- jay
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#1 lore raw
Quoted 9 lines · Jay Lan

I ran into a problem not seen in kexec/dkump 2.6.17rc5 ia64 patch. The system on test was an Altix.

The system was booted up fine; however, after loading 'kexec -p' and "echo c >/proc/sysrq-triggeŕ", the crashdump kernel would try to boot up and restarted the system near the end of init().

The extraodinary message observed on the console was
Warning: unable to open an initial console

It failed in do_filp_open(AT_FDCWD, "/dev/console", O_RDWR, 0) with error -2.

However, it was fine booting up as the 1st kernel.

- jay

Quoted 11 lines

but the actual reboot seems to be invoked in running /sbin/init:

    run_init_process("/sbin/init");

The problem is 100% reproducible. I have disabled all cpus except cpu0 in my testing.

Is this a known problem? Anyone else runs into this?

Thanks,
- jay

#2 lore raw
In reply to Jay Lan
Quoted 3 lines · Jay Lan

I ran into a problem not seen in kexec/dkump 2.6.17rc5 ia64 patch. The system on test was an Altix.

You mean 2.6.18rc5 patch?

Quoted 7 lines

The system was booted up fine; however, after loading 'kexec -p' and "echo c >/proc/sysrq-triggeŕ", the crashdump kernel would try to boot up and restarted the system near the end of init().

The extraodinary message observed on the console was
Warning: unable to open an initial console

Quoted 8 lines

but the actual reboot seems to be invoked in running /sbin/init:

    run_init_process("/sbin/init");

The problem is 100% reproducible. I have disabled all cpus except cpu0 in my testing.

Is this a known problem? Anyone else runs into this?

It seems to be an incorrect initrd problem

Zou Nan hai

Quoted 2 lines

Thanks,
- jay

author
#3 lore raw
In reply to Jay Lan
Quoted 5 lines · Zou Nan hai
Quoted 3 lines · Jay Lan

I ran into a problem not seen in kexec/dkump 2.6.17rc5 ia64 patch. The system on test was an Altix.

You mean 2.6.18rc5 patch?

Oops, yes, i meant 2.6.18rc5... although i found the kernel patch was not the cause. See below.

Quoted 10 lines
Quoted 10 lines

The system was booted up fine; however, after loading 'kexec -p' and "echo c >/proc/sysrq-triggeŕ", the crashdump kernel would try to boot up and restarted the system near the end of init().

The extraodinary message observed on the console was
Warning: unable to open an initial console

but the actual reboot seems to be invoked in running /sbin/init:

    run_init_process("/sbin/init");
Quoted 6 lines
Quoted 5 lines

The problem is 100% reproducible. I have disabled all cpus except cpu0 in my testing.

Is this a known problem? Anyone else runs into this?

It seems to be an incorrect initrd problem

No, i used the correct initrd. I would not be able to boot the kernel/initrd pair as the 1st kernel (sytstem kernel) if the initrd was incorrect.

Well, i built 2.6.18 kernel and 2.6.18rc5 kernels.
I also built 2 kexec-tools based on kdump10 patch. I have been associating the kexec-tools tree that i built at the rc5 time with the rc5 kernel and the newer kexec-tools tree with the 2.6.18 kernel.

I just ran a few tests with different combination of kexec-tools and kernels. Well, it showed that the rc5 version of kexec-tools worked correctly with both kernels, but the newer version of kexec-tools displayed the system restart problem with both kernels.

So, it was the kexec-tools that caused the problem. Not the kernel side. I will diff the patches i applied to both trees...

Later,
- jay

Quoted 8 lines

Zou Nan hai

Quoted 2 lines

Thanks,
- jay

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#4 lore raw
In reply to Jay Lan

Jay Lan wrote:
<snip>

Quoted 7 lines

Well, i built 2.6.18 kernel and 2.6.18rc5 kernels.
I also built 2 kexec-tools based on kdump10 patch. I have been associating the kexec-tools tree that i built at the rc5 time with the rc5 kernel and the newer kexec-tools tree with the 2.6.18 kernel.

Quoted 7 lines

I just ran a few tests with different combination of kexec-tools and kernels. Well, it showed that the rc5 version of kexec-tools worked correctly with both kernels, but the newer version of kexec-tools displayed the system restart problem with both kernels.

So, it was the kexec-tools that caused the problem. Not the kernel side. I will diff the patches i applied to both trees...

Nan-hai,

OK, the '-noio' option patch you posted on 9/20 was the cause of my system restart.
http://lists.osdl.org/pipermail/fastboot/2006-September/004062.html

If instead, if i make every inline functions in purgatory/arch/ia64/io.h null functions, it would then work. I will attach the patch i used (based on your suggestion) here for your reference. It was in rough form.

Thanks,
- jay

Quoted 14 lines

Later,
- jay

Quoted 7 lines

Zou Nan hai

Quoted 2 lines

Thanks,
- jay

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

purgatory/arch/ia64/io.h +43 -0
Index: kexec-tools-1.101/purgatory/arch/ia64/io.h
===================================================================
@@ -4,6 +4,7 @@
 #define MF()	asm volatile ("mf.a" ::: "memory")
 #define IO_SPACE_ENCODING(p)     ((((p) >> 2) << 12) | (p & 0xfff))
 
+#ifdef DO_VGA_IO
 static inline void *io_addr (unsigned long port)
 {
         unsigned long offset;
@@ -91,4 +92,46 @@ static inline void writel(unsigned int b
 {
         *(volatile unsigned int *) addr = b;
 }
+#else
+static inline void *io_addr (unsigned long port)
+{ return (void*)0; }
+
+static inline unsigned int inb (unsigned long port)
+{ return 0; }
+
+static inline unsigned int inw (unsigned long port)
+{ return 0; }
+
+static inline unsigned int ia64_inl (unsigned long port)
+{ return 0; }
+
+static inline void outb (unsigned char val, unsigned long port)
+{ return; }
+
+static inline void outw (unsigned short val, unsigned long port)
+{ return; }
+
+static inline void outl (unsigned int val, unsigned long port)
+{ return; }
+
+
+static inline unsigned char readb(const volatile void  *addr)
+{ return 0; }
+
+static inline unsigned short readw(const volatile void  *addr)
+{ return 0; }
+
+static inline unsigned int readl(const volatile void  *addr)
+{ return 0; }
+
+static inline void writeb(unsigned char b, volatile void  *addr)
+{ return; }
+
+static inline void writew(unsigned short b, volatile void  *addr)
+{ return; }
+
+static inline void writel(unsigned int b, volatile void  *addr)
+{ return; }
+
+#endif
 #endif
#5 lore raw
In reply to Jay Lan
Quoted 23 lines · Jay Lan

Jay Lan wrote:
<snip>

Quoted 7 lines

Well, i built 2.6.18 kernel and 2.6.18rc5 kernels.
I also built 2 kexec-tools based on kdump10 patch. I have been associating the kexec-tools tree that i built at the rc5 time with the rc5 kernel and the newer kexec-tools tree with the 2.6.18 kernel.

Quoted 7 lines

I just ran a few tests with different combination of kexec-tools and kernels. Well, it showed that the rc5 version of kexec-tools worked correctly with both kernels, but the newer version of kexec-tools displayed the system restart problem with both kernels.

So, it was the kexec-tools that caused the problem. Not the kernel side. I will diff the patches i applied to both trees...

Nan-hai,

OK, the '-noio' option patch you posted on 9/20 was the cause of my system restart.
http://lists.osdl.org/pipermail/fastboot/2006-September/004062.html

Quoted 9 lines

If instead, if i make every inline functions in purgatory/arch/ia64/io.h null functions, it would then work. I will attach the patch i used (based on your suggestion) here for your reference. It was in rough form.

Thanks,
- jay

Hi, did you run kexec -p with --noio option?

Zou Nan hai

Quoted 81 lines
Quoted 15 lines

Later,
- jay

Quoted 7 lines

Zou Nan hai

Quoted 2 lines

Thanks,
- jay

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

______________________________________________________________________

Index: kexec-tools-1.101/purgatory/arch/ia64/io.h
=================================> --- kexec-tools-1.101.orig/purgatory/arch/ia64/io.h 2006-10-16 18:19:07.346416494 -0700
+++ kexec-tools-1.101/purgatory/arch/ia64/io.h 2006-10-16 18:47:14.742913628 -0700

(quoted diff) +43 -0
@@ -4,6 +4,7 @@
 #define MF()	asm volatile ("mf.a" ::: "memory")
 #define IO_SPACE_ENCODING(p)     ((((p) >> 2) << 12) | (p & 0xfff))
 
+#ifdef DO_VGA_IO
 static inline void *io_addr (unsigned long port)
 {
         unsigned long offset;
@@ -91,4 +92,46 @@ static inline void writel(unsigned int b
 {
         *(volatile unsigned int *) addr = b;
 }
+#else
+static inline void *io_addr (unsigned long port)
+{ return (void*)0; }
+
+static inline unsigned int inb (unsigned long port)
+{ return 0; }
+
+static inline unsigned int inw (unsigned long port)
+{ return 0; }
+
+static inline unsigned int ia64_inl (unsigned long port)
+{ return 0; }
+
+static inline void outb (unsigned char val, unsigned long port)
+{ return; }
+
+static inline void outw (unsigned short val, unsigned long port)
+{ return; }
+
+static inline void outl (unsigned int val, unsigned long port)
+{ return; }
+
+
+static inline unsigned char readb(const volatile void  *addr)
+{ return 0; }
+
+static inline unsigned short readw(const volatile void  *addr)
+{ return 0; }
+
+static inline unsigned int readl(const volatile void  *addr)
+{ return 0; }
+
+static inline void writeb(unsigned char b, volatile void  *addr)
+{ return; }
+
+static inline void writew(unsigned short b, volatile void  *addr)
+{ return; }
+
+static inline void writel(unsigned int b, volatile void  *addr)
+{ return; }
+
+#endif
 #endif
author
#6 lore raw
In reply to Jay Lan
Quoted 28 lines · Zou Nan hai
Quoted 27 lines · Jay Lan

Jay Lan wrote:
<snip>

Quoted 6 lines

Well, i built 2.6.18 kernel and 2.6.18rc5 kernels.
I also built 2 kexec-tools based on kdump10 patch. I have been associating the kexec-tools tree that i built at the rc5 time with the rc5 kernel and the newer kexec-tools tree with the 2.6.18 kernel.

Quoted 7 lines

I just ran a few tests with different combination of kexec-tools and kernels. Well, it showed that the rc5 version of kexec-tools worked correctly with both kernels, but the newer version of kexec-tools displayed the system restart problem with both kernels.

So, it was the kexec-tools that caused the problem. Not the kernel side. I will diff the patches i applied to both trees...

Nan-hai,

OK, the '-noio' option patch you posted on 9/20 was the cause of my system restart.
http://lists.osdl.org/pipermail/fastboot/2006-September/004062.html

If instead, if i make every inline functions in purgatory/arch/ia64/io.h null functions, it would then work. I will attach the patch i used (based on your suggestion) here for your reference. It was in rough form.

Quoted 4 lines
Quoted 3 lines

Thanks,
- jay

Hi, did you run kexec -p with --noio option?

Yes, i did. Without specifying the option the crashkernel would not even have started.

Here is the command line i used:

# kexec -p /boot/efi/efi/redhat/vmlinuz-2.6.18-kdump --noio
--initrd=/boot/efi/efi/redhat/initrd-2.6.18-kdump
--append="root=/dev/sdb6 irqpoll maxcpus=1 ro console=ttySG0"

Thanks,
- jay

Quoted 79 lines

Zou Nan hai

Quoted 77 lines
Quoted 8 lines

Later,
- jay

Quoted 3 lines

Zou Nan hai

Quoted 2 lines

Thanks,
- jay

Quoted 8 lines
Quoted 4 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

______________________________________________________________________

Index: kexec-tools-1.101/purgatory/arch/ia64/io.h
=================================>> --- kexec-tools-1.101.orig/purgatory/arch/ia64/io.h 2006-10-16 18:19:07.346416494 -0700
+++ kexec-tools-1.101/purgatory/arch/ia64/io.h 2006-10-16 18:47:14.742913628 -0700

(quoted diff) +43 -0
@@ -4,6 +4,7 @@
 #define MF()	asm volatile ("mf.a" ::: "memory")
 #define IO_SPACE_ENCODING(p)     ((((p) >> 2) << 12) | (p & 0xfff))
 
+#ifdef DO_VGA_IO
 static inline void *io_addr (unsigned long port)
 {
         unsigned long offset;
@@ -91,4 +92,46 @@ static inline void writel(unsigned int b
 {
         *(volatile unsigned int *) addr = b;
 }
+#else
+static inline void *io_addr (unsigned long port)
+{ return (void*)0; }
+
+static inline unsigned int inb (unsigned long port)
+{ return 0; }
+
+static inline unsigned int inw (unsigned long port)
+{ return 0; }
+
+static inline unsigned int ia64_inl (unsigned long port)
+{ return 0; }
+
+static inline void outb (unsigned char val, unsigned long port)
+{ return; }
+
+static inline void outw (unsigned short val, unsigned long port)
+{ return; }
+
+static inline void outl (unsigned int val, unsigned long port)
+{ return; }
+
+
+static inline unsigned char readb(const volatile void  *addr)
+{ return 0; }
+
+static inline unsigned short readw(const volatile void  *addr)
+{ return 0; }
+
+static inline unsigned int readl(const volatile void  *addr)
+{ return 0; }
+
+static inline void writeb(unsigned char b, volatile void  *addr)
+{ return; }
+
+static inline void writew(unsigned short b, volatile void  *addr)
+{ return; }
+
+static inline void writel(unsigned int b, volatile void  *addr)
+{ return; }
+
+#endif
 #endif