qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Richard Henderson <rth@twiddle.net>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Dennis Luehring <dl.soluz@gmx.net>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Richard W.M. Jones" <rjones@redhat.com>
Subject: Re: [Qemu-devel] alpha platform is missing files after initrd load
Date: Fri, 4 Nov 2016 20:40:20 +0100	[thread overview]
Message-ID: <e798b637-073c-0256-4a3d-b1bd9a5341b1@redhat.com> (raw)
In-Reply-To: <d3eba598-aaf2-98f0-c47c-c5d3e3633071@twiddle.net>

On 11/04/16 17:37, Richard Henderson wrote:
> On 11/04/2016 05:08 AM, Stefan Hajnoczi wrote:
>> On Thu, Oct 20, 2016 at 12:45:37PM +0200, Dennis Luehring wrote:
>>> qemu: 2.7.x (git head)
>>> platform: Alpha (Clipper)
>>
>> Two options:
>>
>> 1. Not many people use Alpha.  You may need to debug this yourself by
>>    learning about the Linux alpha boot protocol (where the initramfs is
>>    loaded and how big that region of memory may be).  Then you can
>>    verify the memory contents after QEMU has loaded the
>>    kernel/initramfs using monitor commands to read memory.  You may need
>>    to look at QEMU's kernel/initramfs loading code to see what it's
>>    doing.
>>
>> 2. If it worked in a previous QEMU version, please use git-bisect(1) to
>>    find out which commit broke it.
>>
>> Good luck!
> 
> We debugged this via private mail.
> 
> For the 4.7 kernel, we had enough ram to unpack the (large) initrd; with
> the 4.8 kernel, we ran out.  The 4.8 kernel did in fact print an
> (obscure) error message to that effect, which had not been noticed.

Was it

  Unpacking initramfs...
  Initramfs unpacking failed: junk in compressed archive

?

If so, then the same has been encountered with the aarch64 target:

https://github.com/libguestfs/libguestfs/commit/c24f242521e8

> I
> consider it a bug that the kernel does not treat this like any other
> failure to mount /root, via panic.

I agree.

And, apparently, it used to be handled with a panic() call, but then that was deemed "policy", and downgraded to a KERN_EMERG message:

commit 73310a169aebe257efdd35a763cce1c7658f40c9
Author: H. Peter Anvin <hpa@linux.intel.com>
Date:   Wed Jan 14 11:28:35 2009 -0800

    init: make initrd/initramfs decompression failure a KERN_EMERG event
    
    Impact: More consistent behaviour, avoid policy in the kernel
    
    Upgrade/downgrade initrd/initramfs decompression failure from
    inconsistently a panic or a KERN_ALERT message to a KERN_EMERG event.
    It is, however, possible do design a system which can recover from
    this (using the kernel builtin code and/or the internal initramfs),
    which means this is policy, not a technical necessity.
    
    A good way to handle this would be to have a panic-level=X option, to
    force a panic on a printk above a certain level.  That is a separate
    patch, however.
    
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

I guess it is "possible to design a system which can recover from this", except noone seems to have bothered, since 2009. (Ditto for the proposed "panic-level=X" alternative.)

I've now briefly considered posting a trivial kernel patch for this, but having learned about the above commit, I don't think so...

Thanks
Laszlo

> Increasing ram from 1GB to 2GB allowed the 4.8 kernel to succeed in
> unpacking and booting off of the initrd.

  reply	other threads:[~2016-11-04 19:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20 10:45 [Qemu-devel] alpha platform is missing files after initrd load Dennis Luehring
2016-11-04 11:08 ` Stefan Hajnoczi
2016-11-04 16:37   ` Richard Henderson
2016-11-04 19:40     ` Laszlo Ersek [this message]
2016-11-04 21:08       ` Richard Henderson
2016-11-07  7:37         ` Dennis Luehring
2016-11-07 14:12           ` Laszlo Ersek
2016-11-07 14:38             ` Dennis Luehring
2016-11-07 15:56               ` Laszlo Ersek
2016-11-07 16:11                 ` Dennis Luehring
2016-11-07 17:21                   ` Laszlo Ersek
2016-11-09  6:34                     ` Dennis Luehring
2016-11-11  6:49                       ` Dennis Luehring
2016-11-07  7:35       ` Dennis Luehring
2016-11-07 14:15         ` Laszlo Ersek
2016-11-07 14:18           ` Laszlo Ersek
2016-11-07 15:16           ` Dennis Luehring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e798b637-073c-0256-4a3d-b1bd9a5341b1@redhat.com \
    --to=lersek@redhat.com \
    --cc=dl.soluz@gmx.net \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=rth@twiddle.net \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).