Bug 8888

Summary: qemu-x86-64 crashes when running postinst intercepts
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: devtools / tool chainAssignee: Ross Burton <ross.burton>
Status: VERIFIED FIXED QA Contact: Alexandru Roman <alexandru.costinx.roman>
Severity: normal    
Priority: High CC: alexandru.costinx.roman, meta.mr.watcher, meta.watcher
Version: 2.0   
Target Milestone: 2.1 M3   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2016-01-06 15:54:11 UTC
If I build core-image-sato for intel-corei7-64 I end up with core dumps in my build directory because qemu segfaulted:

NOTE: Running intercept scripts:
NOTE: > Executing update_font_cache intercept ...
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction

I'm guessing the target binaries are using instructions that qemu doesn't support?
Comment 1 Cristian Iorga 2016-01-07 16:23:35 UTC
Investigation started.
Comment 2 Ross Burton 2016-01-07 17:20:08 UTC
Just to update the bug, there are several places where this could have gone wrong:

1. regression into qemu
2. new compiler	using new opcodes that qemu doesn't support
3. software using new opcodes that qemu doesn't support
4. wrong cpu type being passed to qemu in the wrapper
Comment 3 Ross Burton 2016-02-08 14:15:11 UTC
fontconfig is executing the popcnt instruction that is part of SSE4.2, as requested by tune-corei7.inc.

Testing a patch to tell qemu.bbclass to pass -cpu Nelhalem so this instruction is emulated.
Comment 4 Ross Burton 2016-02-08 15:16:32 UTC
Patch posted.
Comment 5 Ross Burton 2016-02-11 14:13:09 UTC
Fixed in oe-core fef106b9b97ec48bad2b9a084357b884f653d6c8.
Comment 6 Alexandru Roman 2016-03-01 08:04:38 UTC
Verified on master: 4006a7f2762ccd5dcbc6cdff49482d4387a73261