Bug 9656 - NFS boot failed due No working init found kernel panic on qemu
Summary: NFS boot failed due No working init found kernel panic on qemu
Status: RESOLVED WORKSFORME
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-runtime (show other bugs)
Version: 1.8.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 4.99
Assignee: Richard Purdie
QA Contact:
URL: http://autobuilder.yoctoproject.org/p...
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-05-18 22:39 UTC by Francisco Pedraza
Modified: 2020-04-22 16:28 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Found by QA test)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco Pedraza 2016-05-18 22:39:03 UTC
STATUS: FAILED
BUILD: 1.8.2: c9f0a99050ec0050f0dbcd55d0cd2ab18848113f
ENVIRONMENT: qemu-x86 , qemux86-64

PREREQUISITE
STEPS TO REPRODUCE: 
    
2. Run shutdown in QEMU targets

EXPECTED OUTCOME: QEMU shutdown with UNFS should work .

ACTUAL OUTCOME: System is not able to launch Qemu using NFS.

Getting the following error message:
Kernel Offset: 0x0 from 0xc1000000 (relocation range: 0xc0000000-0xd07dffff)
---[ end kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guiadance.]

Adding more information about the Kernel Panic:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.2-yocto-standard #1
Hardware name: QEMU Standard PC (i44FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01.2014
c1b44e40 00000000 cf8ddf80 c1807ed9 00000000 cf8ddf98 c1806505 c1b44e40
00000000 c1b44e40 00000000 cf8ddfac c18048d8 c1a1a7ec c1b44e40 cf8edf84
cf8dc000 c180dc41 c1804800 00000000 00000000 00000000 00000000 00000000
Call Trace:
[<c1807ed9>] dump_stack+0x4b/0x75
[<c1806505>] panic+0x81/0x178
[<c18048d8>] kernel_init+0xd8/0xe0
[<c180dc41>] ret_from_kernel_thread+0x21/0x30
[<c1804800>] ? rest_init+0x80/0x80
Comment 1 Francisco Pedraza 2016-05-18 22:41:05 UTC
(In reply to comment #0)
> STATUS: FAILED
> BUILD: 1.8.2: c9f0a99050ec0050f0dbcd55d0cd2ab18848113f
> ENVIRONMENT: qemu-x86 , qemux86-64
> 
> PREREQUISITE
> STEPS TO REPRODUCE: 
>     
> 2. Run shutdown in QEMU targets
> 
> EXPECTED OUTCOME: QEMU shutdown with UNFS should work .
> 
> ACTUAL OUTCOME: System is not able to launch Qemu using NFS.
> 
> Getting the following error message:
> Kernel Offset: 0x0 from 0xc1000000 (relocation range: 0xc0000000-0xd07dffff)
> ---[ end kernel panic - not syncing: No working init found. Try passing
> init= option to kernel. See Linux Documentation/init.txt for guiadance.]
> 
> Adding more information about the Kernel Panic:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.2-yocto-standard #1
> Hardware name: QEMU Standard PC (i44FX + PIIX, 1996), BIOS
> rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01.2014
> c1b44e40 00000000 cf8ddf80 c1807ed9 00000000 cf8ddf98 c1806505 c1b44e40
> 00000000 c1b44e40 00000000 cf8ddfac c18048d8 c1a1a7ec c1b44e40 cf8edf84
> cf8dc000 c180dc41 c1804800 00000000 00000000 00000000 00000000 00000000
> Call Trace:
> [<c1807ed9>] dump_stack+0x4b/0x75
> [<c1806505>] panic+0x81/0x178
> [<c18048d8>] kernel_init+0xd8/0xe0
> [<c180dc41>] ret_from_kernel_thread+0x21/0x30
> [<c1804800>] ? rest_init+0x80/0x80

Steps to Reproduce it:
     In a terminal type the following commands:
$ runqemu-extract-sdk ./tmp/deploy/images/qemux86/core-image-sato-qemux86.tar.bz2 test-nfs
$  runqemu qemux86 ./test-nfs

Expected Result:
qemu should start in NFS
Actual Result:
Kernel panic message is displayed
Comment 2 Alexandru Georgescu 2016-05-19 07:38:13 UTC
Hi Francisco,
Can you try calling the runqemu with the kernel as well?

Before you start the QEMU emulator, you need to set up the emulation environment. The following command form sets up the emulation environment.

     $ source /opt/poky/1.8/environment-setup-arch-poky-linux-if

     Where:
         arch is a string representing the target architecture:
                i586, x86_64, ppc603e, mips, or armv5te.

         if is a string representing an embedded application binary interface.
              Not all setup scripts include this string.

 $ runqemu qemuarch kernel-image filesystem-image
Comment 3 Richard Purdie 2016-05-19 14:58:40 UTC
It would be good to understand if the steps Alex mention fix this issue. I am a bit worried that the original error message is not intuative and that if this does fix the issue, there is a usability problem here we should look at in master (but which wouldn't block 1.8 since its been present there all along).

Incidentally, it is useful to know for 1.8 bugs if previous 1.8 images had this issue.
Comment 4 Francisco Pedraza 2016-05-19 17:25:39 UTC
(In reply to comment #2)
> Hi Francisco,
> Can you try calling the runqemu with the kernel as well?
> 
> Before you start the QEMU emulator, you need to set up the emulation
> environment. The following command form sets up the emulation environment.
> 
>      $ source /opt/poky/1.8/environment-setup-arch-poky-linux-if
> 
>      Where:
>          arch is a string representing the target architecture:
>                 i586, x86_64, ppc603e, mips, or armv5te.
> 
>          if is a string representing an embedded application binary
> interface.
>               Not all setup scripts include this string.
> 
>  $ runqemu qemuarch kernel-image filesystem-image

Hi Alex,
Thanks to verify this.
I followed exactly the steps at mega manual and this was the result.
This script you mentioned, where can I get it? " environment-setup-arch-poky-linux-if", however without do the source as you mentioned, I ran this on terminal as you suggested: $ runqemu qemuarch kernel-image filesystem-image, getting the same result with kernel panic.
Comment 5 Francisco Pedraza 2016-05-20 15:33:12 UTC
In New status, the requested information has been provided.
Comment 6 Francisco Pedraza 2016-05-20 15:33:21 UTC
In New status, the requested information has been provided.
Comment 7 Jose Perez C 2016-12-12 21:50:34 UTC
This bug is also reproducible on 2.0.3 rc6 http://autobuilder.yoctoproject.org/pub/releases/yocto-2.0.3.rc6/machines/qemu/
Comment 8 oscar lopez arandas 2017-07-13 17:37:39 UTC
This bug is also reproducible on 2.3.1 rc2 https://autobuilder.yocto.io/pub/releases/yocto-2.3.1.rc2/machines/qemu/qemux86/
Comment 9 Richard Purdie 2020-04-22 16:28:02 UTC
I tested this with qemux86 and qemux86-64 and both worked fine for me so resolving this as now working.