Bug 6687 - qemu for ppc crashes running postinsts
Summary: qemu for ppc crashes running postinsts
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: virtual machines (show other bugs)
Version: 1.7
Hardware: All ppc
: Medium+ normal
Target Milestone: 1.8 M3
Assignee: Cristian Iorga
QA Contact: Mihail Stanciu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-09-05 09:33 UTC by Ross Burton
Modified: 2015-01-22 09:35 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
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 Ross Burton 2014-09-05 09:33:05 UTC
If you build eg core-image-sato with MACHINE=qemuppc you'll see that whilst the image has successfully build, the qemu-executed post-install scripts have crashed in qemu:

$ file *
qemu_gtk-query-immodules-2.0_20140903-185832_23241.core: ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'modu/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/rootfs/usr'
qemu_gtk-query-immodules-2.0_20140903-185839_24833.core: ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'modu/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/rootfs/usr'
qemu_gtk-query-immodules-2.0_20140904-160132_8327.core:  ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'modu/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato-base/1.0-r0/rootf'
qemu_gtk-query-immodules-2.0_20140904-160137_9906.core:  ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'modu/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato-base/1.0-r0/rootf'
qemu_pango-querymodules_20140903-185742_17441.core:      ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'odul/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/rootfs/usr'
qemu_pango-querymodules_20140903-185839_24829.core:      ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'odul/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/rootfs/usr'
qemu_pango-querymodules_20140904-160034_2114.core:       ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'odul/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato-base/1.0-r0/rootf'
qemu_pango-querymodules_20140904-160137_9902.core:       ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'odul/data/poky-master/tmp/work/qemuppc-poky-linux/core-image-sato-base/1.0-r0/rootf'
qemu_udevadm_20140903-155700_3565.core:                  ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'oky-linux/core-image-base/1.0-r0/rootfs/bin'
qemu_udevadm_20140903-155703_4203.core:                  ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'oky-linux/core-image-base/1.0-r0/rootfs/bin'
qemu_udevadm_20140903-185835_23965.core:                 ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'oky-linux/core-image-sato/1.0-r0/rootfs/bin'
qemu_udevadm_20140903-185841_24836.core:                 ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'oky-linux/core-image-sato/1.0-r0/rootfs/bin'
qemu_udevadm_20140904-160135_9059.core:                  ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'oky-linux/core-image-sato-base/1.0-r0/rootf'
qemu_udevadm_20140904-160139_9909.core:                  ELF 32-bit MSB core file, PowerPC or cisco 4500, version 1 (SYSV), SVR4-style, from 'oky-linux/core-image-sato-base/1.0-r0/rootf'

This doesn't get counted as an error because they'll just be executed on the target on first boot.  I've confirmed that this happened before glibc was merged (tested against 954e45b)
Comment 1 Cristian Iorga 2014-09-12 11:36:08 UTC
Investigation started.
Comment 2 Cristian Iorga 2014-09-15 08:07:54 UTC
Durinmg the course of my investigation, I tried the following:
- Changing the CPU model that is passed to qemu-ppc during the run of gdk-pixbuf postinstals: switched from 7400 to G4, same as the processor used with qemu system emulation (runqemu); basically it is the same processor.
- Applied a patch from qemu repo that was added after 2.1 release and that was fixing a qemu abort for ppc emulation: qemu SHA1: fbdc200ac2d0d29e88ee6af9b77810c0f84265a6; the solved issue was present in linux-user qemu mode.

None of the above worked, so further investigation is needed.
Comment 3 Cristian Iorga 2014-09-15 08:13:45 UTC
During the course of the investigation, I was not able to reproduce the issue for any other qemu machines. I tried with qemux86, qemux86-64, qemumips.
Comment 4 Cristian Iorga 2014-12-04 19:08:31 UTC
tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs details:

NOTE: Running intercept scripts:
NOTE: > Executing update_pixbuf_cache intercept ...
Invalid instruction
NIP 0fc6c610   LR 0fdc42e4 CTR 0fc6bfa0 XER 00000000
MSR 00006040 HID0 00000000  HF 00006000 idx 0
TB 00000000 00000000
GPR00 0000000000000020 00000000f6ffe190 00000000f67e04c0 00000000f6ffe240
GPR04 000000000000002f 00000000f6ffe258 0000000000000000 000000000fd8418c
GPR08 0000000000000800 0000000000000046 000000000000002f 000000007f7f7f7f
GPR12 0000000048004484 0000000010019850 0000000000000000 0000000000000000
GPR16 0000000000000000 0000000000000000 00000000f6ffe258 000000000fef0c14
GPR20 00000000f6ffe3d8 0000000000000000 0000000000000000 0000000000000000
GPR24 0000000010018a00 0000000000000000 0000000010023248 00000000f6ffe240
GPR28 00000000f6ffe220 00000000f6ffe220 000000000fdc42e4 00000000f6ffe190
CR 48004484  [ G  L  -  -  G  G  L  G  ]             RES ffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 00000000
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction (core dumped)
WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 132)! See log for details!
WARNING: The postinstalls for the following packages will be postponed for first boot: gdk-pixbuf-loader-png gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm gdk-pixbuf-loader-jpeg
NOTE:   * postponing gdk-pixbuf-loader-png
Comment 5 Cristian Iorga 2014-12-05 12:25:28 UTC
A fix is in the work.
Comment 7 Mihail Stanciu 2015-01-22 09:35:00 UTC
Verified on master: d9d5b8b499af3ae01a1e33d0d3969c54c2d4ab1b

Steps taken:
1. Created a new core-image-sato for qemuppc.
2. Checked the log at: tmp/work/qemuppc-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs for any messages similar to those posted by Cristian. None were found.