Bug 221115 - Kernel panics on attempt to initialize apic when amdtemp.ko loaded in amd64
Summary: Kernel panics on attempt to initialize apic when amdtemp.ko loaded in amd64
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-31 08:26 UTC by vova
Modified: 2017-08-30 14:05 UTC (History)
1 user (show)

See Also:


Attachments
Panic stacktrace (393.06 KB, application/pdf)
2017-08-30 14:05 UTC, vova
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vova 2017-07-31 08:26:29 UTC
Everything worked fine on 11.0, but just after upgrade on 11.1 (r321706)
kerenl panics just on early phase of boot (I assume on apic initialization) 

loader.conf:
amdtemp_load="YES" 


Successful dmesg of 11.1, w/o amdtemp.ko:
------
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #0 r321706: Sun Jul 30 10:03:52 MSK 2017
    root@srv.fbsd.ru:/usr/obj/usr/src/sys/SRV amd64
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
VT(vga): resolution 640x480
CPU: AMD Phenom(tm) 9550 Quad-Core Processor (2204.74-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x100f23  Family=0x10  Model=0x2  Stepping=3
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802009<SSE3,MON,CX16,POPCNT>
  AMD Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x7ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS>
  SVM: NP,NAsids=64
  TSC: P-state invariant
real memory  = 8589934592 (8192 MB)
avail memory = 7737937920 (7379 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: <GBT    GBTUACPI>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
ioapic0: Changing APIC ID to 2
ioapic0 <Version 2.1> irqs 0-23 on motherboard
random: entropy device external interface
kbd1 at kbdmux0
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <GBT GBTUACPI> on motherboard
acpi0: Power Button (fixed)
...
ohci4: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe028000-0xfe028fff irq 18 at device 20.5 on pci0
usbus6 on ohci4
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
...


Boot of 11.0 with amdtemp.ko:
Mar 26 22:08:35 srv kernel: Copyright (c) 1992-2016 The FreeBSD Project.
Mar 26 22:08:35 srv kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Mar 26 22:08:35 srv kernel: The Regents of the University of California. All rights reserved.
Mar 26 22:08:35 srv kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
Mar 26 22:08:35 srv kernel: FreeBSD 11.0-RELEASE-p7 #17 r313726: Tue Feb 14 15:01:36 MSK 2017
Mar 26 22:08:35 srv kernel: root@srv.fbsd.ru:/usr/obj/usr/src/sys/SRV amd64
Mar 26 22:08:35 srv kernel: FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
Mar 26 22:08:35 srv kernel: VT(vga): resolution 640x480
Mar 26 22:08:35 srv kernel: info: [drm] Initialized drm 1.1.0 20060810
Mar 26 22:08:35 srv kernel: CPU: AMD Athlon(tm) II X2 245 Processor (2913.04-MHz K8-class CPU)
Mar 26 22:08:35 srv kernel: Origin="AuthenticAMD"  Id=0x100f63  Family=0x10  Model=0x6  Stepping=3
Mar 26 22:08:35 srv kernel: Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
Mar 26 22:08:35 srv kernel: Features2=0x802009<SSE3,MON,CX16,POPCNT>
Mar 26 22:08:35 srv kernel: AMD Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
Mar 26 22:08:35 srv kernel: AMD Features2=0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>
Mar 26 22:08:35 srv kernel: SVM: (disabled in BIOS) NP,NRIP,NAsids=64
Mar 26 22:08:35 srv kernel: TSC: P-state invariant
Mar 26 22:08:35 srv kernel: real memory  = 4294967296 (4096 MB)
Mar 26 22:08:35 srv kernel: avail memory = 3845173248 (3667 MB)
Mar 26 22:08:35 srv kernel: Event timer "LAPIC" quality 400
Mar 26 22:08:35 srv kernel: ACPI APIC Table: <061110 APIC0958>
Mar 26 22:08:35 srv kernel: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
Mar 26 22:08:35 srv kernel: FreeBSD/SMP: 1 package(s) x 2 core(s)
Mar 26 22:08:35 srv kernel: random: unblocking device.
Mar 26 22:08:35 srv kernel: ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20160527/tbfadt-679)
Mar 26 22:08:35 srv kernel: ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block: 64/32 (20160527/tbfadt-650)
Mar 26 22:08:35 srv kernel: ioapic0 <Version 2.1> irqs 0-23 on motherboard
Mar 26 22:08:35 srv kernel: random: entropy device external interface
Mar 26 22:08:35 srv kernel: kbd1 at kbdmux0
Mar 26 22:08:35 srv kernel: vtvga0: <VT VGA driver> on motherboard
Mar 26 22:08:35 srv kernel: cryptosoft0: <software crypto> on motherboard
Mar 26 22:08:35 srv kernel: acpi0: <061110 XSDT0958> on motherboard
Mar 26 22:08:35 srv kernel: acpi0: Power Button (fixed)
Mar 26 22:08:35 srv kernel: cpu0: <ACPI CPU> on acpi0
Mar 26 22:08:35 srv kernel: cpu1: <ACPI CPU> on acpi0
Mar 26 22:08:35 srv kernel: attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Mar 26 22:08:35 srv kernel: Timecounter "i8254" frequency 1193182 Hz quality 0
Mar 26 22:08:35 srv kernel: Event timer "i8254" frequency 1193182 Hz quality 100
Mar 26 22:08:35 srv kernel: atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
Mar 26 22:08:35 srv kernel: Event timer "RTC" frequency 32768 Hz quality 0
Mar 26 22:08:35 srv kernel: hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Mar 26 22:08:35 srv kernel: Timecounter "HPET" frequency 14318180 Hz quality 950
Mar 26 22:08:35 srv kernel: Event timer "HPET" frequency 14318180 Hz quality 550
Mar 26 22:08:35 srv kernel: Event timer "HPET1" frequency 14318180 Hz quality 450
Mar 26 22:08:35 srv kernel: Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
Mar 26 22:08:35 srv kernel: acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
Mar 26 22:08:35 srv kernel: pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
Mar 26 22:08:35 srv kernel: pci0: <ACPI PCI bus> on pcib0
Mar 26 22:08:35 srv kernel: pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
Mar 26 22:08:35 srv kernel: pci1: <ACPI PCI bus> on pcib1
Mar 26 22:08:35 srv kernel: vgapci0: <VGA-compatible display> port 0xd000-0xd0ff mem 0xd0000000-0xdfffffff,0xfeaf0000-0xfeafffff,0xfe900000-0xfe9fffff irq 18 at device 5.0 on pci1
Mar 26 22:08:35 srv kernel: drmn0: <ATI Radeon 3000 Graphics> on vgapci0
...
Mar 26 22:08:35 srv kernel: ohci4: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe8fa000-0xfe8fafff irq 18 at device 20.5 on pci0
Mar 26 22:08:35 srv kernel: usbus6 on ohci4
Mar 26 22:08:35 srv kernel: amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb4
Mar 26 22:08:35 srv kernel: acpi_button0: <Power Button> on acpi0
...
Comment 1 vova 2017-07-31 20:17:29 UTC
on next day it started to work as expected 
- in maintenance window I wanted to get exact panic details but problem is not reproduced any more
Nothing was changed (same sources, same build, ...) 
May be booting after successful boot of 11.1 w/o amdtemp.ko?

but, now it shows warning message: amdtemp0: Erratum 319: temperature measurement may be inaccurate

# sysctl dev.amdtemp
dev.amdtemp.0.core0.sensor0: 26.5C
dev.amdtemp.0.sensor_offset: 0
dev.amdtemp.0.%parent: hostb4
dev.amdtemp.0.%pnpinfo:
dev.amdtemp.0.%location:
dev.amdtemp.0.%driver: amdtemp
dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors
dev.amdtemp.%parent:

Success boot of 11.1 with amdtemp.ko:

Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #0 r321706: Sun Jul 30 10:03:52 MSK 2017
    root@srv.fbsd.ru:/usr/obj/usr/src/sys/SRV amd64
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
VT(vga): resolution 640x480
CPU: AMD Phenom(tm) 9550 Quad-Core Processor (2204.75-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x100f23  Family=0x10  Model=0x2  Stepping=3
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802009<SSE3,MON,CX16,POPCNT>
  AMD Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x7ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS>
  SVM: NP,NAsids=64
  TSC: P-state invariant
real memory  = 8589934592 (8192 MB)
avail memory = 7737917440 (7379 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: <GBT    GBTUACPI>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
random: unblocking device.
ioapic0: Changing APIC ID to 2
ioapic0 <Version 2.1> irqs 0-23 on motherboard
random: entropy device external interface
kbd1 at kbdmux0
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <GBT GBTUACPI> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
...
ohci4: <AMD SB7x0/SB8x0/SB9x0 USB controller> mem 0xfe028000-0xfe028fff irq 18 at device 20.5 on pci0
usbus6 on ohci4
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb4
amdtemp0: Erratum 319: temperature measurement may be inaccurate
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0


before it was died after "acpi0: <GBT GBTUACPI> on motherboard"
Comment 2 vova 2017-08-02 09:47:36 UTC
Motherboard: GA-MA78GM-UD2H
Comment 3 vova 2017-08-30 14:02:22 UTC
Happens again, after cold start, see attached screenshot
Comment 4 vova 2017-08-30 14:05:36 UTC
Created attachment 185922 [details]
Panic stacktrace