churchers / vm-bhyve

Shell based, minimal dependency bhyve manager
BSD 2-Clause "Simplified" License
807 stars 168 forks source link

Kernel Panic on AMD on install of CentOs7 #196

Open horstleitenmueller opened 6 years ago

horstleitenmueller commented 6 years ago

hi all, question I have a small problem on installing CentOS in vm-bhyve 1.1.8_2 on FreeBSD 10.4-STABLE #2 r327241. amd64. it ends with kernel panic

Processor: CPU: AMD Opteron(TM) Processor 6220 (3000.06-MHz K8-class CPU) Origin="AuthenticAMD" Id=0x600f12 Family=0x15 Model=0x1 Stepping=2 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=0x1e98220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX> AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM> AMD Features2=0x1c9bfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,NodeId,Topology,PCXC,PNXC> SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=65536 TSC: P-state invariant, performance statistics

ERROR Log: Installing aic94xx-firmware (256/293) Installing microcode_ctl (257/293) [ 609.797836] general protection fault: 0000 [#1] SMP [ 609.800143] Modules linked in: xfs fcoe libfcoe libfc scsi_transport_fc scsi_tgt sg pcspkr ext4 mbcache jbd2 loop nls_utf8 isofs sr_mod cdrom crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel 8021q ghash_clmulni_intel ahci garp stp libahci llc mrp libata virtio_blk virtio_net aesni_intel glue_helper ablk_helper virtio_pci cryptd virtio_ring virtio sunrpc xts lrw gf128mul mcryptd dm_crypt dm_round_robin dm_multipath dm_snapshot dm_bufio dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_memcpy async_pq raid6_pq libcrc32c async_xor xor async_tx raid1 raid0 iscsi_ibft iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi squashfs cramfs [ 609.827209] CPU: 0 PID: 2387 Comm: sh Not tainted 3.10.0-693.el7.x86_64 #1 [ 609.830083] Hardware name: BHYVE, BIOS 1.00 03/14/2014 [ 609.832059] task: ffff88013091cf10 ti: ffff880070dd8000 task.ti: ffff880070dd8000 [ 609.834623] RIP: 0010:[] [] apply_microcode_amd+0xb8/0x160 [ 609.837901] RSP: 0018:ffff880070ddbd60 EFLAGS: 00010012 [ 609.839723] RAX: 000000002fb20000 RBX: 0000000000000000 RCX: 00000000c0010020 [ 609.842312] RDX: 00000000ffff8801 RSI: ffffc90000757000 RDI: 0000000000600f12 [ 609.844678] RBP: ffff880070ddbd88 R08: 0000000000000000 R09: 0000000000000000 [ 609.847247] R10: ffff88013fe19ba0 R11: ffffea00048d6980 R12: ffff88013fe163c0 [ 609.850225] R13: 0000000000000000 R14: ffff88012fb20000 R15: 00000000000163c0 [ 609.853158] FS: 00007f2bc4e9c740(0000) GS:ffff88013fe00000(0000) knlGS:0000000000000000 [ 609.856508] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 609.858873] CR2: 00007f2bc4e9b000 CR3: 0000000130968000 CR4: 00000000000406f0 [ 609.861846] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 609.864798] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 609.867583] Stack: [ 609.868300] ffff880070ddbe44 0000000000000000 0000000000000002 ffffffff81b1c820 [ 609.871025] 0000000000000000 ffff880070ddbda0 ffffffff8104c3ce 0000000000000246 [ 609.873744] ffff880070ddbe00 ffffffff810f9386 0000000000000000 0000000000000000 [ 609.876440] Call Trace: [ 609.877477] [] apply_microcode_local+0x1e/0x30 [ 609.880014] [] generic_exec_single+0x156/0x1a0 [ 609.882541] [] ? release_firmware+0x58/0x70 [ 609.884988] [] ? collect_cpu_info_local+0x30/0x30 [ 609.887562] [] smp_call_function_single+0x5f/0xa0 [ 609.889714] [] apply_microcode_on_target+0x38/0x60 [ 609.891880] [] reload_store+0x157/0x190 [ 609.893747] [] dev_attr_store+0x18/0x30 [ 609.895576] [] sysfs_write_file+0xc6/0x140 [ 609.897487] [] vfs_write+0xbd/0x1e0 [ 609.899195] [] SyS_write+0x7f/0xe0 [ 609.900887] [] system_call_fastpath+0x16/0x1b [ 609.902893] Code: 83 c1 01 41 89 c8 46 8b 04 85 90 15 a1 81 45 85 c0 75 e8 4d 01 fc 41 39 56 04 76 57 4c 89 f2 b9 20 00 01 c0 44 89 f0 48 c1 ea 20 <0f> 30 b9 8b 00 00 00 0f 32 48 89 d6 41 8b 56 04 89 c0 48 c1 e6 [ 609.913484] RIP [] apply_microcode_amd+0xb8/0x160 [ 609.916188] RSP [ 609.917877] ---[ end trace 260f0dbc4b11f938 ]--- [ 609.919791] Kernel panic - not syncing: Fatal exception [ 609.922114] Kernel Offset: disabled

my config: filesystem ZFS

loader="grub" cpu=1 memory=4098M network0_type="virtio-net" network0_switch="public" disk0_type="virtio-blk" disk0_name="disk0" disk0_dev="sparse-zvol" grub_install0="linux /isolinux/vmlinuz LANG=en_US.UTF-8 KEYTABLE=de SYSFONT=latarcyrheb-sun16 console=ttyS0" grub_install1="initrd /isolinux/initrd.img" grub_run0="linux /vmlinuz-3.10.0-327.el7.x86_64 root=/dev/mapper/centos-root LANG=en_US.UTF-8 KEYTABLE=de SYSFONT=latarcyrheb-sun16 console=ttyS0" grub_run1="initrd /initramfs-3.10.0-327.el7.x86_64.img"

the log file

vm-bhyve.log

Feb 03 20:09:48: initialising Feb 03 20:09:48: [loader: grub] Feb 03 20:09:48: [uefi: no] Feb 03 20:09:48: [cpu: 1] Feb 03 20:09:48: [memory: 4098M] Feb 03 20:09:48: [hostbridge: standard] Feb 03 20:09:48: [com ports: com1] Feb 03 20:09:48: [uuid: c457d8ef-0915-11e8-84c1-00e081cc65cc] Feb 03 20:09:48: [utctime: no] Feb 03 20:09:48: [debug mode: no] Feb 03 20:09:48: [primary disk: disk0] Feb 03 20:09:48: [primary disk dev: sparse-zvol] Feb 03 20:09:48: generated static mac 58:9c:fc:0c:87:73 (based on 'it4h.centos7vm2:0:1517684988:0') Feb 03 20:09:48: initialising network device tap1 Feb 03 20:09:48: adding tap1 -> bridge0 (public) Feb 03 20:09:48: booting Feb 03 20:09:48: create file /vms/it4h.centos7vm2/device.map Feb 03 20:09:48: -> (hd0) /dev/zvol/zroot/vms/it4h.centos7vm2/disk0 Feb 03 20:09:48: -> (cd0) /vms/.iso/CentOS-7-x86_64-Minimal-1708.iso Feb 03 20:09:48: create file /vms/it4h.centos7vm2/grub.cfg Feb 03 20:09:48: -> timeout=3 Feb 03 20:09:48: -> menuentry 'it4h.centos7vm2 (bhyve install)' { Feb 03 20:09:48: -> root=cd0 Feb 03 20:09:48: -> linux /isolinux/vmlinuz LANG=en_US.UTF-8 KEYTABLE=de SYSFONT=latarcyrheb-sun16 console=ttyS0 Feb 03 20:09:48: -> initrd /isolinux/initrd.img Feb 03 20:09:48: -> } Feb 03 20:09:48: /usr/local/sbin/grub-bhyve -m /vms/it4h.centos7vm2/device.map -M 4098M -r host -d /vms/it4h.centos7vm2 it4h.centos7vm2 Feb 03 20:09:52: [bhyve options: -c 1 -m 4098M -AHP -U c457d8ef-0915-11e8-84c1-00e081cc65cc] Feb 03 20:09:52: [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/dev/zvol/zroot/vms/it4h.centos7vm2/disk0 -s 5:0,virtio-net,tap1,mac=58:9c:fc:0c:87:73] Feb 03 20:09:52: [bhyve console: -l com1,stdio] Feb 03 20:09:52: [bhyve iso device: -s 3:0,ahci-cd,/vms/.iso/CentOS-7-x86_64-Minimal-1708.iso] Feb 03 20:09:52: starting bhyve (run 1)`

perhaps somebody could help :-)

nihr43 commented 6 years ago

Hi, I've run bhyve on the opteron 6100 and 6200 series quite a bit, including centos7 guests, so at least I can tell you "its not the cpu".

horstleitenmueller commented 6 years ago

also on version 10.4 ? and how I can find out now why it's on your site working and not on mine :-)

nihr43 commented 6 years ago

I should have specified; I've been running bhyve on 11+. Upgrade if possible. That said, this is a strange issue. Though, socket G34 hardware is aging; If we're talking about a server thats been more or less running since 2011, you should definitely run memtest86 or the like before sinking too much time into this.