Project

General

Profile

Actions

Bug #5223

open

kernel panic at early boot stage

Added by Denis Kozadaev almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2014-10-09
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

Speaking shortly, a new illumos code does not work on old CPUs such as p3
I have such PC:

The physical processor has 1 virtual processor (0)
  x86 (GenuineIntel 68A family 6 model 8 step 10 clock 1000 MHz)
    Intel(r) Pentium(r) III

Yes, I know that it is very old for modern system, but it works (still!)
ok, the latest OI that I can boot on it was oi151a8 (ISO from the site)
after updading (pkg update) a new BE cannot be booted:
panic[cpu0]/thread=d4984da0: BAD TRAP: type=6 (#ud Invalid opcode) rp=d4988d40 addr=fec24008

#ud Invalid opcode
addr=0xfec24008
pid=0, pc=0xfe85b25e, sp=0xfe86adbc, eflags=0x10082
cr0: 80050011<pg,wp,et,pe> cr4: d8<pge,mce,pse,de>
cr2: 0 cr3: 3113000

  gs: fec201b0  fs: fec40000  es: fe850160  ds: fe850160
 edi: d4984da0 esi: fec24008 ebp: fec402b4 esp: d4988d78
 ebx: fec24008 edx: d3195f68 ecx: fe7fc000 eax: d4984df4
 trp:        6 err:        0 eip: fe85b25e  cs:      158
eflg:    10082 usp: fe86adbc  ss:        0

Warning - stack not written to the dumpbuf

panic: entering debugger (no dump device, continue to reboot)

Welcome to kmdb
Loaded modules: [ mac uppc unix krtld apix genunix specfs pcplusmp cpu.generic ]

Detailed analysis of the addresses gave me the point to module and function:
eip: fe85b25e (unix)
I disassembled this module and I found the code:
fe85b230 <_resume_from_idle>:
fe85b230:       f0 0f ba 6f 6c 00       lock btsl $0x0,0x6c(%edi)
fe85b236:       0f 82 ac 00 00 00       jb     fe85b2e8 <resume_return+0x4>
fe85b23c:       65 8b 35 0c 00 00 00    mov    %gs:0xc,%esi
*skipped*
fe85b25b:       89 7e 10                mov    %edi,0x10(%esi)
fe85b25e:       0f ae f0                mfence 
fe85b261:       33 ed                   xor    %ebp,%ebp
*skipped*

Bingo! mfence is a SSE2 instruction that my CPU does not "understand"
This functions was found in uts/intel/ia32/ml/swtch.s
https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/intel/ia32/ml/swtch.s#L525
yeah, I know what you say, it's time to upgrade your hardware ;-)
thanks anyway

No data to display

Actions

Also available in: Atom PDF