Bug 1114

Summary: LSB 4.1: illegal instruction
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Xiaofeng Yan <Xiaofeng.yan>
Component: coreAssignee: Xiaofeng Yan <Xiaofeng.yan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: brett.ciphery, galak, jessica.zhang, mark.hatle, meta.mr.watcher, meta.watcher, sgw
Version: 1.0-alpha   
Target Milestone: 1.3   
Hardware: mpc8315e-rdb   
OS: ppc   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Xiaofeng Yan 2011-05-27 04:24:35 UTC
There are about 50 test items which are related to illegal instruction for lsb test on mpc8315e-rdb. x86-32 and x86-64 have no this problem.
For example:
mpc8315e-rdb#./T.cos
15|0 3.6-lite 4|TCM Start
400|0 1 1 16:19:32|IC Start
200|0 1 16:19:32|TP Start
520|0 1 00005260 2 1|child process was terminated by signal 4 (SIGILL)
220|0 1 2 16:19:32|UNRESOLVED
410|0 1 1 16:19:32|IC End
400|0 2 1 16:19:32|IC Start
200|0 2 16:19:32|TP Start
520|0 2 00005260 2 1|child process was terminated by signal 4 (SIGILL)
220|0 2 2 16:19:32|UNRESOLVED
410|0 2 1 16:19:32|IC End
400|0 3 1 16:19:32|IC Start
200|0 3 16:19:32|TP Start
220|0 3 0 16:19:32|PASS
410|0 3 1 16:19:32|IC End
400|0 4 1 16:19:32|IC Start
200|0 4 16:19:32|TP Start
520|0 4 00005260 2 1|child process was terminated by signal 4 (SIGILL)
220|0 4 2 16:19:32|UNRESOLVED
410|0 4 1 16:19:32|IC End

The binary T.cos is test program from LSB Test Suite.
Comment 1 Xiaofeng Yan 2011-05-27 04:31:35 UTC
Hi Saul & Mark,

It could be caused by the difference of compilation tool between LSB Test Suite and mpc8315e. 
  -Error don't happen when I use LSB Test Suite with version 4.0.
  -I extract test case source codes from lsb test suite and run this code after compiling with compilation tool of mpc8315e,error of illegal instruction don't happen.
  So I think LSB official compilation tool could have some instructions which don't exist on compilation tool of mpc8315e. 

Do you think I should solve this bug? We use LSB Test Suite with version 4.1 make lsb test now.
Comment 2 Xiaofeng Yan 2011-05-30 20:10:43 UTC
Instruction "fsqrt" isn't supported by e300core but LSB Test Suite need this instruction when running. So it is hardware problem.
Comment 3 Mark Hatle 2011-05-31 08:22:11 UTC
See: http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-PPC32/LSB-Core-PPC32/lowlevel.html

This indicates that floating point instructions are not required by the LSB.  The test harness seems to be in error here.

In addition, the LSB requires only 603 instructions.  The 603 does NOT implement the fsqrt or fsqrts instructions.

We would like to file a bug with the Linux Foundation, but we need to know the full list of tests that failed with the illegal instruction error.

I'm reopening this only for tracking purposes.
Comment 4 Mark Hatle 2011-05-31 08:22:32 UTC
This is an upstream bug, changing status to note this.
Comment 5 Xiaofeng Yan 2011-06-01 05:36:22 UTC
Hi Mark & Brett

I find LSB Test Suite has instruction "fsqrt" by command "objdump -S ./T.cos". Some other binaries also include this instruction. I will report this bug on LF according to Mark's suggestion.
Comment 6 Brett Ciphery 2011-06-01 06:25:30 UTC
Hi Xiaofeng,

If you can provide the version of the specific LSB test and a listing of the failing subtests I can coordinate with LF to have them corrected.

If you do go ahead and open the bug please reference it here.
Comment 7 Xiaofeng Yan 2011-06-03 00:02:26 UTC
I have report this bug to LF, please check:
http://bugs.linuxbase.org/show_bug.cgi?id=3253
Comment 8 Kumar Gala 2011-08-05 14:47:51 UTC
(In reply to comment #7)
> I have report this bug to LF, please check:
> http://bugs.linuxbase.org/show_bug.cgi?id=3253

I think my recent changes to eglibc will help address this, will post some patches to update the tune file to pick up proper sqrt implementation.
Comment 10 Mark Hatle 2012-04-04 17:36:29 UTC
Update on this.  The Linux Standard Base folks are still tracking this item. 

They have recently resolved the defect on their end, I will note that here as well.