armel/versatile: Can't kexec

Bug #518567 reported by Loïc Minier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kexec-tools (Ubuntu)
New
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: kexec-tools

Hi

Before updating kexec-tools to 2.0.1, it wouldn't work at all; I updated to the latest upstream and cherry-picked some patches, it works "more" but qemu/linux now hang:
qemu-system-arm -m 256 -drive file=rootfs.img,media=disk -M versatilepb -cpu cortex-a8 -kernel zImage -append 'rootwait root=/dev/sda S console=ttyAMA0,115200' -nographic
Uncompressing Linux.................................................................................................................................................................................................... done, booting the kernel.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32.6versatile2 (lool@fox) (gcc version 4.4.1 (GCC) ) #64 Sun Feb 7 20:05:51 CET 2010 ()
[ 0.000000] CPU: ARMv7 Processor [410fc080] revision 0 (ARMv7), cr=10c03c7f
[...]
[ 5.388074] VFS: Mounted root (ext3 filesystem) readonly on device 8:0.
[ 5.393392] devtmpfs: mounted
[ 5.395317] Freeing init memory: 152K
mountall: Could not connect to Plymouth
fsck from util-linux-ng 2.16
/dev/sda: clean, 13529/76912 files, 202983/307200 blocks

Give root password for maintenance
(or type Control-D to continue):
root@bee:~# cat /proc/cmdline
rootwait root=/dev/sda S console=ttyAMA0,115200
root@bee:~# kexec -l /root/zImage-1 --append="rootwait root=/dev/sda S console=ttyAMA0,115200"
root@bee:~# sync
root@bee:~# kexec -e
[ 96.628568] Starting new kernel
lsi_scsi: error: Unhandled writeb 0xbc = 0x6c
lsi_scsi: error: Unhandled writeb 0xbd = 0x7e
lsi_scsi: error: Unhandled writeb 0xbe = 0x71
lsi_scsi: error: Unhandled writeb 0xbf = 0xc7
lsi_scsi: error: Unhandled writeb 0x15 = 0x1
lsi_scsi: error: Unhandled writeb 0x18 = 0xff
lsi_scsi: error: Unhandled writeb 0x19 = 0xff
lsi_scsi: error: Unhandled writeb 0x20 = 0x0
lsi_scsi: error: Unhandled writeb 0x23 = 0x0
lsi_scsi: error: Unhandled writeb 0x27 = 0x0
lsi_scsi: error: Unhandled writeb 0xfc = 0x90
lsi_scsi: error: Unhandled writeb 0xfd = 0x23
lsi_scsi: error: Unhandled writeb 0xfe = 0x0
lsi_scsi: error: Unhandled writeb 0xff = 0x50
lsi_scsi: error: Immediate Arbritration not implemented
lsi_scsi: error: Unhandled writeb 0x9 = 0xff
lsi_scsi: error: Unhandled writeb 0x15 = 0x0
lsi_scsi: error: Unhandled writeb 0x18 = 0x0
lsi_scsi: error: Unhandled writeb 0x19 = 0x0
lsi_scsi: error: Unhandled writeb 0x20 = 0x0
lsi_scsi: error: Unhandled writeb 0x23 = 0x0
lsi_scsi: error: Unhandled writeb 0x27 = 0xc7
lsi_scsi: error: Unhandled writeb 0xec = 0x80
lsi_scsi: error: Unhandled writeb 0xed = 0x22
lsi_scsi: error: Unhandled writeb 0xee = 0x0
lsi_scsi: error: Unhandled writeb 0xef = 0x50
lsi_scsi: error: Unhandled writeb 0xf0 = 0x84
lsi_scsi: error: Unhandled writeb 0xf1 = 0xa
lsi_scsi: error: Unhandled writeb 0xf2 = 0x41
lsi_scsi: error: Unhandled writeb 0xf3 = 0xc0
lsi_scsi: error: Unhandled writeb 0xf4 = 0x93
lsi_scsi: error: Unhandled writeb 0xf5 = 0x1
lsi_scsi: error: Unhandled writeb 0xf6 = 0x0
lsi_scsi: error: Unhandled writeb 0xf7 = 0x60
lsi_scsi: error: Unhandled writeb 0xf8 = 0xff
lsi_scsi: error: Unhandled writeb 0xf9 = 0xff
lsi_scsi: error: Unhandled writeb 0xfa = 0xff
lsi_scsi: error: Unhandled writeb 0xfb = 0xff
lsi_scsi: error: Unhandled writeb 0xfc = 0xa4
lsi_scsi: error: Unhandled writeb 0xfd = 0x21
lsi_scsi: error: Unhandled writeb 0xfe = 0x0
lsi_scsi: error: Unhandled writeb 0xff = 0x50
lsi_scsi: error: Unhandled writeb 0x9 = 0x0
lsi_scsi: error: Unhandled writeb 0x15 = 0x7e
lsi_scsi: error: Unhandled writeb 0x18 = 0x2
lsi_scsi: error: Unhandled writeb 0x19 = 0xc
lsi_scsi: error: Destination ID does not match SSID
lsi_scsi: error: Unhandled writeb 0x9 = 0xc
qemu: hardware error: pl011_write: Bad offset fcc

CPU #0:
R00=c060d838 R01=101f4160 R02=c0410a84 R03=60000193
R04=ffffffff R05=101f4084 R06=00000000 R07=00000000
R08=f2000000 R09=c0410aa4 R10=00000000 R11=c7717e6c
R12=00000c02 R13=101f3fcc R14=c0410a9c R15=c0410a60
PSR=60000193 -ZC- A svc32
zsh: abort (core dumped) qemu-system-arm -m 256 -drive file=rootfs.img,media=disk -M versatilepb -cpu

If I don't use serial console (ie without -nographic), qemu just hangs after "Starting new kernel", using 100% CPU.

Bye

Revision history for this message
Loïc Minier (lool) wrote :

Tried again with the kernel at http://people.canonical.com/~roc/kernel/kexec/ prepared by Bryan from the sources at http://kernel.ubuntu.com/git?p=roc/ubuntu-lucid.git;a=shortlog;h=refs/heads/kexec-versatile:

qemu-system-arm -m 256 -drive file=lucid.img,media=disk -M versatilepb -cpu cortex-a8 -kernel linux-image-2.6.32-16-versatile_2.6.32-16.24/boot/vmlinuz-2.6.32-16-versatile -append 'root=/dev/sda console=ttyAMA0,115200 S' -nographic

kexec -l vmlinuz-2.6.32-16-versatile --append="rootwait root=/dev/sda console=ttyAMA0,115200 S"
kexec -e

All I get is:
[ 87.854989] Starting new kernel

But at least it doesn't dump core anymore; apparently it avoids writing bogus data over the I/O space.

I also tried without rootwait, but I really get no more output after "Starting new kernel" despite the use of a serial console.

Revision history for this message
Loïc Minier (lool) wrote :

So booting the same kernel and kexec-loading a vmlinux instead (created from the vmlinuz bzImage) works!

I can't boot the vmlinux in qemu though.

Revision history for this message
Loïc Minier (lool) wrote :

What I meant in comment #2 was that I can't use qemu-system-arm -kernel vmlinux ..., this hangs (without even initializing the fb); if I boot qemu-system-arm with a vmlinuz and kexec the vmlinux, it works.

Summary:
qemu-system-arm: works with vmlinuz, not vmlinux
kexec: works with vmlinux, not vmlinuz

Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Loïc Minier (lool) wrote :

Closing the linux task since it works with the in archive kernel just fine (didn't actually test initramfs though).

Changed in linux (Ubuntu):
status: New → Invalid
Revision history for this message
Loïc Minier (lool) wrote :

So what remains to be fixed here is kexec on qemu/versatile when an using a vmlinuz; either it should properly compute the address (not sure what actually breaks when using a vmlinuz) or it should unconditionally unpack the vmlinuz into a vmlinux (to save time when kexec -e comes).

Revision history for this message
Loïc Minier (lool) wrote :

I've sent a heads up to the kexec@ list.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.