Bug 10519

Summary: Can not run multiple QEMU machines under UNFS
Product: [Runtime] General Runtime Reporter: Yi Zhao <yi.zhao>
Component: General RuntimeAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact: Yi Zhao <yi.zhao>
Severity: normal    
Priority: Medium+ CC: jose.perez.carranza, richard.purdie, sgw, yi.zhao
Version: 2.2   
Target Milestone: 2.3 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Zhao 2016-10-28 06:55:56 UTC
Image location: http://autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc6/

This is a regression bug, used to work with old runqemu.

Case on testopia: https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=315

Steps:

1. Download toolchain tarball and qemu rootfs.
2. Install toolchain and set the environment
3. Run runqemu-extract-sdk to extract the qemu rootfs in rootfs1 directory and rootfs2 directory.
4. From 2 terminals, run "runqemu  qemuboot.conf rootfs1" and run "runqemu qemuboot.conf rootfs2" to launch 2 qemu system at the same time.

The expected result should be the 2 qemu system can launch respectively. But now only one system can boot up and the other one can not boot up with kernel panic:
>> =============================================================
>> OpenBIOS 1.1 [Jul 19 2016 06:34]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 256M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,G4
milliseconds isn't unique.
Welcome to OpenBIOS v1.1 built on Jul 19 2016 06:34
>> [ppc] Kernel already loaded (0x01000000 + 0x00ac2300) (initrd 0x00000000 + 0x00000000)
>> [ppc] Kernel command line: root=/dev/nfs nfsroot=192.168.7.1:/buildarea/jenkins-yocto/images/image2,nfsvers=3,port=3051,mountprog=21112,nfsprog=11112,udp,mountport=3050 rw highres=off  console=ttyS0 mem=256M ip=192.168.7.4::192.168.7.3:255.255.255.0 console=tty console=ttyS0
OF stdout device is: /pci@f2000000/mac-io@c/escc-legacy@12000/ch-b@12000
Preparing to boot Linux version 4.8.3-yocto-standard (pokybuild@ubuntu1604) (gcc version 6.2.0 (GCC) ) #1 PREEMPT Wed Oct 26 09:14:16 UTC 2016
Detected machine type: 00000400
command line: 
memory layout at init:
  memory_limit : 00000000 (16 MB aligned)
  alloc_bottom : 01ac7000
  alloc_top    : 10000000
  alloc_top_hi : 10000000
  rmo_top      : 10000000
  ram_top      : 10000000
found display   : /pci@f2000000/QEMU,VGA@e, opening... done
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings 0x01ac8000 -> 0x01ac8557
Device tree struct  0x01ac9000 -> 0x01acc000
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x01000000 ...
[    0.036964] console [ttyS0] enabled
[    0.037687] bootconsole [udbg0] disabled
[    0.038796] pid_max: default: 32768 minimum: 301
[    0.040801] Security Framework initialized
[    0.043844] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.044442] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.063068] ftrace: allocating 21783 entries in 64 pages
[    0.218315] devtmpfs: initialized
[    0.237877] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.240643] xor: measuring software checksum speed
[    0.279529]    8regs     :   467.000 MB/sec
[    0.320049]    8regs_prefetch:   410.000 MB/sec
[    0.360646]    32regs    :   498.000 MB/sec
[    0.401270]    32regs_prefetch:   404.000 MB/sec
[    0.443886]    altivec   :   733.000 MB/sec
[    0.457242] xor: using function: altivec (733.000 MB/sec)
[    0.478544] NET: Registered protocol family 16
[    0.495313] PCI: Probing PCI hardware
[    0.497893] PCI host bridge to bus 0000:00
[    0.499067] pci_bus 0000:00: root bus resource [io  0x0000-0x7fffff]
[    0.499672] pci_bus 0000:00: root bus resource [mem 0x80000000-0x8fffffff]
[    0.500569] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.567497] pci 0000:00:0f.0: reg 0x20: can't handle BAR above 4GB (bus address 0xffffffff82800000)
[    0.582764] pci 0000:00:0f.0: BAR 4: assigned [mem 0x80800000-0x80ffffff 64bit pref]
[    0.722255] raid6: altivecx1 gen()   247 MB/s
[    0.794051] raid6: altivecx2 gen()   285 MB/s
[    0.863032] raid6: altivecx4 gen()   300 MB/s
[    0.932151] raid6: altivecx8 gen()   252 MB/s
[    1.001037] raid6: int32x1  gen()   236 MB/s
[    1.071608] raid6: int32x1  xor()   180 MB/s
[    1.140734] raid6: int32x2  gen()   351 MB/s
[    1.209686] raid6: int32x2  xor()   266 MB/s
[    1.278969] raid6: int32x4  gen()   144 MB/s
[    1.347947] raid6: int32x4  xor()   295 MB/s
[    1.417087] raid6: int32x8  gen()   180 MB/s
[    1.485920] raid6: int32x8  xor()   145 MB/s
[    1.486302] raid6: using algorithm int32x2 gen() 351 MB/s
[    1.486748] raid6: .... xor() 266 MB/s, rmw enabled
[    1.487225] raid6: using intx1 recovery algorithm
[    1.498545] vgaarb: setting as boot device: PCI:0000:00:0e.0
[    1.499288] vgaarb: device added: PCI:0000:00:0e.0,decodes=io+mem,owns=io+mem,locks=none
[    1.500306] vgaarb: loaded
[    1.500602] vgaarb: bridge control possible 0000:00:0e.0
[    1.504383] usbcore: registered new interface driver usbfs
[    1.505277] usbcore: registered new interface driver hub
[    1.506131] usbcore: registered new device driver usb
[    1.525782] clocksource: Switched to clocksource timebase
[    1.767961] NET: Registered protocol family 2
[    1.779021] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    1.779767] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    1.780566] TCP: Hash tables configured (established 2048 bind 2048)
[    1.782596] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.783234] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.785722] NET: Registered protocol family 1
[    1.790232] RPC: Registered named UNIX socket transport module.
[    1.790802] RPC: Registered udp transport module.
[    1.791196] RPC: Registered tcp transport module.
[    1.791576] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.811043] futex hash table entries: 256 (order: -1, 3072 bytes)
[    1.817471] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    1.876228] NFS: Registering the id_resolver key type
[    1.878240] Key type id_resolver registered
[    1.878664] Key type id_legacy registered
[    1.904147] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    1.905006] io scheduler noop registered
[    1.906338] io scheduler deadline registered
[    1.906937] io scheduler cfq registered (default)
[    1.912703] Using unsupported 800x600 QEMU,VGA at 81000000, depth=32, pitch=3200
[    1.936090] Console: switching to colour frame buffer device 100x37
[    1.948746] fb0: Open Firmware frame buffer device on /pci@f2000000/QEMU,VGA@e
[    1.955957] pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
[    2.015224] brd: module loaded
[    2.018380] MacIO PCI driver attached to Keylargo chipset
[    2.029029] 0.00013020:ch-a: ttyS0 at MMIO 0x80013020 (irq = 37, base_baud = 230400) is a Z85c30 ESCC - Serial port
[    2.032435] 0.00013000:ch-b: ttyS1 at MMIO 0x80013000 (irq = 36, base_baud = 230400) is a Z85c30 ESCC - Serial port
[    2.037552] Macintosh CUDA driver v0.5 for Unified ADB.
[    2.040118] Uniform Multi-Platform E-IDE driver
[    2.043039] adb: starting probe task...
[    2.136838] ADB keyboard at 2, handler set to 3
[    2.146367] Detected ADB keyboard, type ANSI.
[    2.155863] input: ADB keyboard as /devices/virtual/input/input0
[    2.169020] random: fast init done
[    2.208281] ADB mouse at 3, handler set to 2
[    2.216383] input: ADB mouse as /devices/virtual/input/input1
[    2.223836] adb: finished probe task...
[    3.097240] ide-pmac: Found Apple KeyLargo ATA-3 controller (macio), bus ID 0, irq 16
[    3.714061] ide0 at 0xd107e000-0xd107e070,0xd107e160 on irq 16
[    4.761225] ide-pmac: Found Apple KeyLargo ATA-3 controller (macio), bus ID 1, irq 18
[    5.197715] hdc: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
[    5.927134] hdc: MWDMA2 mode selected
[    5.935647] ide1 at 0xd1288000-0xd1288070,0xd1288160 on irq 18
[    5.946458] ide-gd driver 1.18
[    5.963391] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
[    5.973210] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.981303] ehci-pci: EHCI PCI platform driver
[    5.989386] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.997452] ohci-pci: OHCI PCI platform driver
[    6.007340] ohci-pci 0000:00:0d.0: OHCI PCI host controller
[    6.016738] ohci-pci 0000:00:0d.0: new USB bus registered, assigned bus number 1
[    6.026367] ohci-pci 0000:00:0d.0: irq 27, io mem 0x80080000
[    6.103843] hub 1-0:1.0: USB hub found
[    6.112897] hub 1-0:1.0: 3 ports detected
[    6.124708] uhci_hcd: USB Universal Host Controller Interface driver
[    6.137544] mousedev: PS/2 mouse device common for all mice
[    6.148234] md: linear personality registered for level -1
[    6.156286] md: raid0 personality registered for level 0
[    6.163913] md: raid1 personality registered for level 1
[    6.171406] md: raid10 personality registered for level 10
[    6.178790] md: multipath personality registered for level -4
[    6.186000] md: faulty personality registered for level -5
[    6.195084] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[    6.207177] usbcore: registered new interface driver usbhid
[    6.214550] usbhid: USB HID core driver
[    6.221596] oprofile: using timer interrupt.
[    6.232000] u32 classifier
[    6.239000]     Actions configured
[    6.250001] NET: Registered protocol family 10
[    6.266630] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    6.277830] NET: Registered protocol family 17
[    6.285846] Key type dns_resolver registered
[    6.303873] Btrfs loaded, crc32c=crc32c-generic
[    6.316377] console [netcon0] enabled
[    6.323643] netconsole: network logging started
[    6.376084] IP-Config: Complete:
[    6.383070]      device=eth0, hwaddr=52:54:00:12:34:04, ipaddr=192.168.7.4, mask=255.255.255.0, gw=192.168.7.3
[    6.396720]      host=192.168.7.4, domain=, nis-domain=(none)
[    6.403857]      bootserver=255.255.255.255, rootserver=192.168.7.1, rootpath=
[    6.420710] md: Waiting for all devices to be available before autodetect
[    6.427997] md: If you don't use raid, use raid=noautodetect
[    6.440068] md: Autodetecting RAID arrays.
[    6.447215] md: Scanned 0 and added 0 devices.
[    6.454452] md: autorun ...
[    6.460952] md: ... autorun DONE.
[    6.513478] usb 1-1: new full-speed USB device number 2 using ohci-pci
[    6.762229] input: QEMU QEMU USB Tablet as /devices/pci0000:00/0000:00:0d.0/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input2
[    6.777550] hid-generic 0003:0627:0001.0001: input: USB HID v0.01 Pointer [QEMU QEMU USB Tablet] on usb-0000:00:0d.0-1/input0
[  322.617498] VFS: Unable to mount root fs via NFS, trying floppy.
[  322.632058] VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[  322.640102] Please append a correct "root=" boot option; here are the available partitions:
[  322.648426] 0100            4096 ram0  (driver?)
[  322.656317] 0101            4096 ram1  (driver?)
[  322.663975] 0102            4096 ram2  (driver?)
[  322.671470] 0103            4096 ram3  (driver?)
[  322.678748] 0104            4096 ram4  (driver?)
[  322.685762] 0105            4096 ram5  (driver?)
[  322.692514] 0106            4096 ram6  (driver?)
[  322.699144] 0107            4096 ram7  (driver?)
[  322.705723] 0108            4096 ram8  (driver?)
[  322.712226] 0109            4096 ram9  (driver?)
[  322.718777] 010a            4096 ram10  (driver?)
[  322.725231] 010b            4096 ram11  (driver?)
[  322.731464] 010c            4096 ram12  (driver?)
[  322.737672] 010d            4096 ram13  (driver?)
[  322.743711] 010e            4096 ram14  (driver?)
[  322.749757] 010f            4096 ram15  (driver?)
[  322.755727] VFS: Unable to mount root fs on unknown-block(2,0)
[  322.761788] User configuration error - no valid root filesystem found
[  322.768077] Kernel panic - not syncing: Invalid configuration from end user prevents continuing
[  322.774679] CPU: 0 PID: 1 Comm: swapper Not tainted 4.8.3-yocto-standard #1
[  322.781000] Call Trace:
[  322.787283] [cf8a9db0] [c07376a0] panic+0x118/0x260 (unreliable)
[  322.793612] [cf8a9e10] [c0937628] mount_block_root+0x250/0x298
[  322.799680] [cf8a9e60] [c09378b8] mount_root+0x110/0x124
[  322.805545] [cf8a9e90] [c0937a50] prepare_namespace+0x184/0x1cc
[  322.811415] [cf8a9eb0] [c0937154] kernel_init_freeable+0x248/0x264
[  322.817315] [cf8a9f30] [c000481c] kernel_init+0x24/0x128
[  322.823143] [cf8a9f40] [c0011acc] ret_from_kernel_thread+0x5c/0x64
[  322.829721] Rebooting in 180 seconds..
Comment 1 Yi Zhao 2016-12-22 07:20:58 UTC
This issue still happens on 2.3 M1 rc1 build
Comment 3 Yi Zhao 2017-02-08 06:05:49 UTC
Verified with 2.3 M2 RC3.
Git rev: master/226a508da955439b881b2f0a544a3aee76e59919