Bug 5807

Summary: NFS startup failed with build 20140205-1(qemuarm, qemumips and qemuppc)
Product: [Runtime] General Runtime Reporter: Ke Zou <ke.zou>
Component: General RuntimeAssignee: Saul Wold <sgw>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: alexandru.c.georgescu, jason.wessel, yi.zhao
Version: 1.6   
Target Milestone: 1.6 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
crush none

Description Ke Zou 2014-02-10 07:11:57 UTC
Created attachment 1762 [details]
crush

Steps to reproduce:

Download images from 
http://autobuilder.yoctoproject.org/pub/nightly/20140205-1/

install the toolchain
extract rootfs
runqemu qemuxxx nfs core  rootfs

system crushed.
Comment 1 Yi Zhao 2014-02-10 07:42:40 UTC
This issue also happened on qemux86 and qemux86-64

Boot error log:
################
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
1600         4194302 hdc  driver: ide-cdrom
VFS: Unable to mount root fs on unknown-block(2,0)
User configuration error - no valid root filesystem found
Kernel panic - not syncing: Invalid configuration from end user prevents continuing
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.25-yocto-standard #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 cf883ec0 cf883ec0 cf883e74 c1743e79 cf883e94 c173ffcd c19334a4 c1b4ae80
 00000000 cf883ec0 00008000 cfb76000 cf883eec c1a91f38 c1923e04 cf883ec0
 cf883ec0 fffffffa 00000000 cfb76142 00000000 cfff4ec0 fffffffa 6e6b6e75
Call Trace:
 [<c1743e79>] dump_stack+0x16/0x18
 [<c173ffcd>] panic+0x87/0x170
 [<c1a91f38>] mount_block_root+0x1cb/0x1db
 [<c11283dd>] ? SyS_mknod+0x2d/0x30
 [<c1a9213a>] mount_root+0xf3/0xfb
 [<c1a92290>] prepare_namespace+0x14e/0x192
 [<c1119de5>] ? SyS_access+0x25/0x30
 [<c1a91c22>] kernel_init_freeable+0x1ea/0x1f7
 [<c1a914ca>] ? do_early_param+0x78/0x78
 [<c1732130>] kernel_init+0x10/0x140
 [<c174f577>] ret_from_kernel_thread+0x1b/0x28
 [<c1732120>] ? rest_init+0x80/0x80
general protection fault: fffa [#1] PREEMPT SMP 
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.25-yocto-standard #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
task: cf888000 ti: cf882000 task.ti: cf882000
EIP: 0060:[<c174007e>] EFLAGS: 00000246 CPU: 0
EIP is at panic+0x138/0x170
EAX: 00000000 EBX: cf883ec0 ECX: 00000001 EDX: cf882000
ESI: 00008000 EDI: 00000000 EBP: cf883e94 ESP: cf883e7c
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
CR0: 8005003b CR2: 00000000 CR3: 01b40000 CR4: 00000690
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: 00000000 DR7: 00000000
Stack:
 c19334a4 c1b4ae80 00000000 cf883ec0 00008000 cfb76000 cf883eec c1a91f38
 c1923e04 cf883ec0 cf883ec0 fffffffa 00000000 cfb76142 00000000 cfff4ec0
 fffffffa 6e6b6e75 2d6e776f 636f6c62 2c32286b 00002930 cf883eec c11283dd
Call Trace:
 [<c1a91f38>] mount_block_root+0x1cb/0x1db
 [<c11283dd>] ? SyS_mknod+0x2d/0x30
 [<c1a9213a>] mount_root+0xf3/0xfb
 [<c1a92290>] prepare_namespace+0x14e/0x192
 [<c1119de5>] ? SyS_access+0x25/0x30
 [<c1a91c22>] kernel_init_freeable+0x1ea/0x1f7
 [<c1a914ca>] ? do_early_param+0x78/0x78
 [<c1732130>] kernel_init+0x10/0x140
 [<c174f577>] ret_from_kernel_thread+0x1b/0x28
 [<c1732120>] ? rest_init+0x80/0x80
Code: 00 00 be 65 00 00 00 4e 74 0c b8 58 89 41 00 e8 59 69 bf ff eb f1 83 c3 64 eb c0 83 3d 4c ae b4 c1 00 74 05 e8 24 99 90 ff fb 90 <8d> 74 26 00 31 f6 39 fe 7c 15 83 75 f0 01 8b 45 f0 ff 15 40 ae
EIP: [<c174007e>] panic+0x138/0x170 SS:ESP 0068:cf883e7c
---[ end trace 4dae21803e0c2fbb ]---
note: swapper/0[1] exited with preempt_count 1
################
Comment 2 Saul Wold 2014-02-19 23:50:08 UTC
Is it possible that you forgot to export the rootfs first? You need to run 
"runqemu-export-rootfs start <nfs dir>" to correctly export the nfs client FS.
Comment 3 Yi Zhao 2014-02-20 04:48:56 UTC
(In reply to comment #2)
> Is it possible that you forgot to export the rootfs first? You need to run 
> "runqemu-export-rootfs start <nfs dir>" to correctly export the nfs client
> FS.

It still doesn't work.
Steps:
1. Install toolchain sdk tarball and source the environment
2. runqemu-extract-sdk core-image-sato-qemumips.rootfs.tar.bz2 rootfs
3. runqemu-export-rootfs start rootfs
4. runqemu nfs vmlinux.bin rootfs
Comment 4 Alexandru Georgescu 2014-02-20 09:12:31 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Is it possible that you forgot to export the rootfs first? You need to run 
> > "runqemu-export-rootfs start <nfs dir>" to correctly export the nfs client
> > FS.
> 
> It still doesn't work.
> Steps:
> 1. Install toolchain sdk tarball and source the environment
> 2. runqemu-extract-sdk core-image-sato-qemumips.rootfs.tar.bz2 rootfs
> 3. runqemu-export-rootfs start rootfs
> 4. runqemu nfs vmlinux.bin rootfs

Hi YI, Saul,

I could reproduce it too. To fix this I had to specify the full path for nfs path, e.g.: 

[fed@fed machines]$ runqemu nfs /run/media/fed/ssd/m3-rc2/machines/mips-minimal vmlinux-qemumips.bin  serial
Comment 5 Yi Zhao 2014-02-20 09:51:38 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Is it possible that you forgot to export the rootfs first? You need to run 
> > > "runqemu-export-rootfs start <nfs dir>" to correctly export the nfs client
> > > FS.
> > 
> > It still doesn't work.
> > Steps:
> > 1. Install toolchain sdk tarball and source the environment
> > 2. runqemu-extract-sdk core-image-sato-qemumips.rootfs.tar.bz2 rootfs
> > 3. runqemu-export-rootfs start rootfs
> > 4. runqemu nfs vmlinux.bin rootfs
> 
> Hi YI, Saul,
> 
> I could reproduce it too. To fix this I had to specify the full path for nfs
> path, e.g.: 
> 
> [fed@fed machines]$ runqemu nfs
> /run/media/fed/ssd/m3-rc2/machines/mips-minimal vmlinux-qemumips.bin  serial

It doesn't work with relative path for rootfs. 
"runqemu nfs vmlinux.bin rootfs" and "runqemu nfs vmlinux.bin ./rootfs" failed to boot. 
We should use absolute path like below:
runqemu nfs vmlinux.bin /home/build/qemumips/rootfs

I also tried the 1.5 build, the rootfs with relative path works fine. I think it is a regression bug.
Comment 6 Saul Wold 2014-02-21 19:01:28 UTC
added code to ensure that relative paths are converted to abolute

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=425dc69bc7b9ea0f8ca886c442e37bba4f76ec8f
Comment 7 Ke Zou 2014-02-28 07:20:46 UTC
Verified with build 20140226-1
http://autobuilder.yoctoproject.org/pub/nightly/20140226-1/