Project

General

Profile

Bug #28211

bhyve crashing on VM shutdown

Added by Patrick M. Hausen over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
No priority
Assignee:
-
Category:
Middleware
Target version:
Severity:
Medium
Reason for Closing:
Not Applicable
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Please see the lower part of the conversation in https://redmine.ixsystems.com/issues/26899 for how this came about.

On my system VMs crash when trying to ACPI shut down via the "Stop" button in the old UI.

I connected via VNC to my Windows 10 VM, then pressed "Stop" in the old UI. Result:

[2018/02/06 07:38:43] (DEBUG) VMService.stop():361 - ===> Soft Stop VM: Windows ID: 5 BHYVE_CODE: None
[2018/02/06 07:38:43] (WARNING) VMService.destroy_vm():275 - ===> Destroying VM: Windows ID: 5 BHYVE_CODE: None
[2018/02/06 07:38:43] (DEBUG) VMService.kill_bhyve_web():340 - ==> Killing WEBVNC: 82205
[2018/02/06 07:38:43] (DEBUG) VMService.run():250 - Windows: Assertion failed: (error == 0), function emulate_inout, file /freenas-11-releng/freenas/_BE/os/usr.sbin/bhyve/inout.c, line 230.

[2018/02/06 07:38:43] (DEBUG) VMService.run():250 - Windows: fbuf frame buffer base: 0x942e00000 [sz 16777216]

[2018/02/06 07:38:44] (INFO) VMService.run():271 - ===> Error VM: Windows ID: 5 BHYVE_CODE: -6
[2018/02/06 07:38:44] (WARNING) VMService.destroy_vm():275 - ===> Destroying VM: Windows ID: 5 BHYVE_CODE: -6
[2018/02/06 07:38:45] (DEBUG) VMService.kill_bhyve_web():340 - ==> Killing WEBVNC: 82205

VNC viewer on my Mac terminated immediately.

Patrick

Bhyve Error.txt (4.23 KB) Bhyve Error.txt Derek Edwards, 02/14/2019 08:09 AM

Related issues

Related to FreeNAS - Bug #26899: Improve VM shutdown and add Power Off buttonDone2017-11-28

History

#1 Updated by Marcelo Araujo over 2 years ago

  • Target version set to 11.2-RC2

#2 Updated by Patrick M. Hausen over 2 years ago

  • Target version deleted (11.2-RC2)

Hardware:
Supermicro SYS-5028A-TN4

root@freenas-pmh:~ # cat /var/run/dmesg.boot 
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-STABLE #0 r321665+4bd3ee42941(freenas/11.1-stable): Thu Jan 18 15:45:01 UTC 2018
    root@gauntlet:/freenas-11-releng/freenas/_BE/objs/freenas-11-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64
FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM 5.0.0svn)
CPU: Intel(R) Atom(TM) CPU  C2758  @ 2.40GHz (2400.07-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406d8  Family=0x6  Model=0x4d  Stepping=8
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x43d8e3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x101<LAHF,Prefetch>
  Structured Extended Features=0x2282<TSCADJ,SMEP,ERMS,NFPUSG>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 36507222016 (34816 MB)
avail memory = 33244450816 (31704 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <INTEL  TIANO   >
WARNING: L1 data cache covers less APIC IDs than a core
0 < 1
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
WARNING: VIMAGE (virtualized network stack) is a highly experimental feature.
ioapic0 <Version 2.0> irqs 0-23 on motherboard
SMP: AP CPU #1 Launched!
SMP: AP CPU #6 Launched!
SMP: AP CPU #2 Launched!
SMP: AP CPU #4 Launched!
SMP: AP CPU #3 Launched!
SMP: AP CPU #7 Launched!
SMP: AP CPU #5 Launched!
Timecounter "TSC-low" frequency 1200036252 Hz quality 1000
random: entropy device external interface
kbd1 at kbdmux0
module_register_init: MOD_LOAD (vesa, 0xffffffff80fc34c0, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG" 
nexus0
cryptosoft0: <software crypto> on motherboard
aesni0: <AES-CBC,AES-XTS,AES-GCM,AES-ICM> on motherboard
padlock0: No ACE support.
acpi0: <ALASKA A M I > 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
cpu4: <ACPI CPU> on acpi0
cpu5: <ACPI CPU> on acpi0
cpu6: <ACPI CPU> on acpi0
cpu7: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 350
Event timer "HPET1" frequency 14318180 Hz quality 340
Event timer "HPET2" frequency 14318180 Hz quality 340
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: _OSC returned error 0x10
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> mem 0xdf3e0000-0xdf3fffff irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 0.0 on pci1
pci2: <ACPI PCI bus> on pcib2
vgapci0: <VGA-compatible display> port 0xd000-0xd07f mem 0xde000000-0xdeffffff,0xdf000000-0xdf01ffff irq 16 at device 0.0 on pci2
vgapci0: Boot video device
pcib3: <ACPI PCI-PCI bridge> mem 0xdf3c0000-0xdf3dffff irq 16 at device 2.0 on pci0
pci3: <ACPI PCI bus> on pcib3
xhci0: <XHCI (generic) USB 3.0 controller> mem 0xdf200000-0xdf201fff irq 17 at device 0.0 on pci3
xhci0: 64 bytes context size, 32-bit DMA
xhci0: Unable to map MSI-X table 
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pcib4: <ACPI PCI-PCI bridge> mem 0xdf3a0000-0xdf3bffff irq 20 at device 3.0 on pci0
pci4: <ACPI PCI bus> on pcib4
ahci0: <AHCI SATA controller> mem 0xdf120000-0xdf120fff irq 22 at device 0.0 on pci4
ahci0: AHCI v1.31 with 1 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
pci0: <processor> at device 11.0 (no driver attached)
pci0: <base peripheral, IOMMU> at device 15.0 (no driver attached)
igb0: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port 0xe0c0-0xe0df mem 0xdf360000-0xdf37ffff,0xdf40c000-0xdf40ffff irq 20 at device 20.0 on pci0
igb0: Using MSIX interrupts with 9 vectors
igb0: Ethernet address: 0c:c4:7a:6b:a6:18
igb0: Bound queue 0 to cpu 0
igb0: Bound queue 1 to cpu 1
igb0: Bound queue 2 to cpu 2
igb0: Bound queue 3 to cpu 3
igb0: Bound queue 4 to cpu 4
igb0: Bound queue 5 to cpu 5
igb0: Bound queue 6 to cpu 6
igb0: Bound queue 7 to cpu 7
igb1: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port 0xe0a0-0xe0bf mem 0xdf340000-0xdf35ffff,0xdf408000-0xdf40bfff irq 21 at device 20.1 on pci0
igb1: Using MSIX interrupts with 9 vectors
igb1: Ethernet address: 0c:c4:7a:6b:a6:19
igb1: Bound queue 0 to cpu 0
igb1: Bound queue 1 to cpu 1
igb1: Bound queue 2 to cpu 2
igb1: Bound queue 3 to cpu 3
igb1: Bound queue 4 to cpu 4
igb1: Bound queue 5 to cpu 5
igb1: Bound queue 6 to cpu 6
igb1: Bound queue 7 to cpu 7
igb2: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port 0xe080-0xe09f mem 0xdf320000-0xdf33ffff,0xdf404000-0xdf407fff irq 22 at device 20.2 on pci0
igb2: Using MSIX interrupts with 9 vectors
igb2: Ethernet address: 0c:c4:7a:6b:a6:1a
igb2: Bound queue 0 to cpu 0
igb2: Bound queue 1 to cpu 1
igb2: Bound queue 2 to cpu 2
igb2: Bound queue 3 to cpu 3
igb2: Bound queue 4 to cpu 4
igb2: Bound queue 5 to cpu 5
igb2: Bound queue 6 to cpu 6
igb2: Bound queue 7 to cpu 7
igb3: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port 0xe060-0xe07f mem 0xdf300000-0xdf31ffff,0xdf400000-0xdf403fff irq 23 at device 20.3 on pci0
igb3: Using MSIX interrupts with 9 vectors
igb3: Ethernet address: 0c:c4:7a:6b:a6:1b
igb3: Bound queue 0 to cpu 0
igb3: Bound queue 1 to cpu 1
igb3: Bound queue 2 to cpu 2
igb3: Bound queue 3 to cpu 3
igb3: Bound queue 4 to cpu 4
igb3: Bound queue 5 to cpu 5
igb3: Bound queue 6 to cpu 6
igb3: Bound queue 7 to cpu 7
ehci0: <Intel Avoton USB 2.0 controller> mem 0xdf417000-0xdf4173ff irq 23 at device 22.0 on pci0
usbus1: EHCI version 1.0
usbus1 on ehci0
usbus1: 480Mbps High Speed USB v2.0
ahci1: <Intel Avoton AHCI SATA controller> port 0xe150-0xe157,0xe140-0xe143,0xe130-0xe137,0xe120-0xe123,0xe040-0xe05f mem 0xdf416000-0xdf4167ff irq 19 at device 23.0 on pci0
ahci1: AHCI v1.30 with 4 3Gbps ports, Port Multiplier not supported
ahcich1: <AHCI channel> at channel 0 on ahci1
ahcich2: <AHCI channel> at channel 1 on ahci1
ahcich3: <AHCI channel> at channel 2 on ahci1
ahcich4: <AHCI channel> at channel 3 on ahci1
ahci2: <Intel Avoton AHCI SATA controller> port 0xe110-0xe117,0xe100-0xe103,0xe0f0-0xe0f7,0xe0e0-0xe0e3,0xe020-0xe03f mem 0xdf415000-0xdf4157ff irq 19 at device 24.0 on pci0
ahci2: AHCI v1.30 with 2 6Gbps ports, Port Multiplier not supported
ahcich5: <AHCI channel> at channel 0 on ahci2
ahcich6: <AHCI channel> at channel 1 on ahci2
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
ichwd0: <Intel Avoton/Rangeley SoC watchdog timer> on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xccfff,0xcd000-0xcdfff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: CGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3d0-0x3db iomem 0xb8000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
coretemp2: <CPU On-Die Thermal Sensors> on cpu2
est2: <Enhanced SpeedStep Frequency Control> on cpu2
coretemp3: <CPU On-Die Thermal Sensors> on cpu3
est3: <Enhanced SpeedStep Frequency Control> on cpu3
coretemp4: <CPU On-Die Thermal Sensors> on cpu4
est4: <Enhanced SpeedStep Frequency Control> on cpu4
coretemp5: <CPU On-Die Thermal Sensors> on cpu5
est5: <Enhanced SpeedStep Frequency Control> on cpu5
coretemp6: <CPU On-Die Thermal Sensors> on cpu6
est6: <Enhanced SpeedStep Frequency Control> on cpu6
coretemp7: <CPU On-Die Thermal Sensors> on cpu7
est7: <Enhanced SpeedStep Frequency Control> on cpu7
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
freenas_sysctl: adding account.
freenas_sysctl: adding directoryservice.
freenas_sysctl: adding middlewared.
freenas_sysctl: adding network.
freenas_sysctl: adding services.
ipfw2 (+ipv6) initialized, divert enabled, nat enabled, default to accept, logging disabled
nvme cam probe device init
ugen1.1: <Intel EHCI root HUB> at usbus1
ugen0.1: <0x1912 XHCI root HUB> at usbus0
uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
uhub1: <0x1912 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub1: 8 ports with 8 removable, self powered
uhub0: 8 ports with 8 removable, self powered
ugen1.2: <vendor 0x8087 product 0x07db> at usbus1
uhub2 on uhub0
uhub2: <vendor 0x8087 product 0x07db, class 9/0, rev 2.00/0.02, addr 2> on usbus1
uhub2: 4 ports with 4 removable, self powered
ugen1.3: <SanDisk Cruzer Fit> at usbus1
umass0 on uhub2
umass0: <SanDisk Cruzer Fit, class 0/0, rev 2.10/1.00, addr 3> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:8:0: Attached to scbus8
ugen1.4: <SanDisk Cruzer Fit> at usbus1
umass1 on uhub2
umass1: <SanDisk Cruzer Fit, class 0/0, rev 2.10/1.00, addr 4> on usbus1
umass1:  SCSI over Bulk-Only; quirks = 0xc100
umass1:9:1: Attached to scbus9
ugen1.5: <vendor 0x0557 product 0x7000> at usbus1
uhub3 on uhub2
uhub3: <vendor 0x0557 product 0x7000, class 9/0, rev 2.00/0.00, addr 5> on usbus1
uhub3: 4 ports with 3 removable, self powered
ugen1.6: <vendor 0x0557 product 0x2419> at usbus1
ukbd0 on uhub3
ukbd0: <vendor 0x0557 product 0x2419, class 0/0, rev 1.10/1.00, addr 6> on usbus1
kbd2 at ukbd0
random: unblocking device.
da1 at umass-sim1 bus 1 scbus9 target 0 lun 0
da0 at umass-sim0 bus 0 scbus8 target 0 lun 0
da1: <SanDisk Cruzer Fit 1.00> Removable Direct Access SPC-4 SCSI device
da1: Serial Number 4C531001591116103425
da1: 40.000MB/s transfersda0: <SanDisk Cruzer Fit 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 4C530001111116102563

da1: 14939MB (30595072 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>
da0: 40.000MB/s transfers
da0: 14939MB (30595072 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <Kingston SHPM2280P2H/240G OC34L5TM> ATA8-ACS SATA 3.x device
ada0: Serial Number 50026B727604AC71
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 228936MB (468862128 512 byte sectors)
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: <TOSHIBA HDWQ140 FJ1M> ATA8-ACS SATA 3.x device
ada1: Serial Number 6779K0VYFPBE
ada1: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 3815447MB (7814037168 512 byte sectors)
ada2 at ahcich2 bus 0 scbus2 target 0 lun 0
ada2: <TOSHIBA HDWQ140 FJ1M> ATA8-ACS SATA 3.x device
ada2: Serial Number 6761K1IQFPBE
ada2: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 3815447MB (7814037168 512 byte sectors)
ada3 at ahcich3 bus 0 scbus3 target 0 lun 0
ada3: <TOSHIBA HDWQ140 FJ1M> ATA8-ACS SATA 3.x device
ada3: Serial Number 6779K0VZFPBE
ada3: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada3: Command Queueing enabled
ada3: 3815447MB (7814037168 512 byte sectors)
ada4 at ahcich4 bus 0 scbus4 target 0 lun 0
ada4: <TOSHIBA HDWQ140 FJ1M> ATA8-ACS SATA 3.x device
ada4: Serial Number 677FK0OUFPBE
ada4: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada4: Command Queueing enabled
ada4: 3815447MB (7814037168 512 byte sectors)
Trying to mount root from zfs:freenas-boot/ROOT/default []...
igb0: link state changed to UP
igb1: link state changed to UP
igb3: link state changed to UP
ipmi0: <IPMI System Interface> port 0xca2,0xca3 on acpi0
ipmi0: KCS mode found at io 0xca2 on acpi
ipmi0: IPMI device rev. 1, firmware rev. 2.23, version 2.0
ipmi0: Number of channels 2
ipmi0: Attached watchdog
GEOM_RAID5: Module loaded, version 1.3.20140711.62 (rev f91e28e40bf7)
GEOM_MIRROR: Device mirror/swap0 launched (2/2).
GEOM_MIRROR: Device mirror/swap1 launched (2/2).
GEOM_ELI: Device mirror/swap0.eli created.
GEOM_ELI: Encryption: AES-XTS 128
GEOM_ELI:     Crypto: hardware
GEOM_ELI: Device mirror/swap1.eli created.
GEOM_ELI: Encryption: AES-XTS 128
GEOM_ELI:     Crypto: hardware
hwpmc: SOFT/16/64/0x67<INT,USR,SYS,REA,WRI> TSC/1/64/0x20<REA> IAP/2/40/0x3ff<INT,USR,SYS,EDG,THR,REA,WRI,INV,QUA,PRC> IAF/3/40/0x67<INT,USR,SYS,REA,WRI>
igb0: link state changed to DOWN
igb0: link state changed to UP
ums0 on uhub3
ums0: <vendor 0x0557 product 0x2419, class 0/0, rev 1.10/1.00, addr 6> on usbus1
ums0: 3 buttons and [Z] coordinates ID=0

#3 Updated by Patrick M. Hausen over 2 years ago

  • Target version set to 11.2-RC2

#4 Updated by Dru Lavigne over 2 years ago

  • Related to Bug #26899: Improve VM shutdown and add Power Off button added

#5 Updated by Dru Lavigne over 2 years ago

  • Assignee changed from Release Council to Marcelo Araujo
  • Seen in changed from 11.1-U1 to 11.1-U1

#6 Updated by Patrick M. Hausen over 2 years ago

Still present in U2:

[2018/02/26 13:36:10] (DEBUG) VMService.stop():364 - ===> Soft Stop VM: Project ID: 2 BHYVE_CODE: None
[2018/02/26 13:36:10] (WARNING) VMService.destroy_vm():275 - ===> Destroying VM: Project ID: 2 BHYVE_CODE: None
[2018/02/26 13:36:11] (DEBUG) VMService.run():250 - Project: Assertion failed: (error == 0), function emulate_inout, file /freenas-11-releng/freenas/_BE/os/usr.sbin/bhyve/inout.c, line 230.
[2018/02/26 13:36:11] (INFO) VMService.run():271 - ===> Error VM: Project ID: 2 BHYVE_CODE: -6
[2018/02/26 13:36:11] (WARNING) VMService.destroy_vm():275 - ===> Destroying VM: Project ID: 2 BHYVE_CODE: -6

Anything I can do to help? Need a current debug file?

Kind regards,
Patrick

#7 Updated by Patrick M. Hausen over 2 years ago

BTW ... on the same system that crashes VMs when pressing "Stop", VMs shut down cleanly when I just send SIGTERM on the command line:

root@freenas-pmh:~ # ps awwux | grep bhyve
root       46511 113.6 10.9 9501956 7335336  -  S    10:11      99:04.66 bhyve: 5_Windows (bhyve)
root        4452   1.2  6.6 9472804 4426804  -  S    Wed20     248:02.17 bhyve: 3_Wiki (bhyve)
root        4456   0.2  1.4 9472804  946396  -  S    Wed20      71:40.16 bhyve: 4_Cloud (bhyve)
root       10284   0.0  0.7 2130596  492352  -  S    Sun17       7:50.26 bhyve: 1_DHCP (bhyve)
root       33798   0.0  0.9 9472804  632580  -  S    Mon14       6:16.74 bhyve: 2_Project (bhyve)
root        7566   0.0  0.0    6696    2588  1  S+   20:49       0:00.00 grep bhyve
root@freenas-pmh:~ # kill -TERM 33798

Second window with VM console:

root@freenas-pmh:~ # cu -l /dev/nmdm2B -s 9600
Connected

FreeBSD/amd64 (project) (ttyu0)

login: Stopping cron.
Waiting for PIDS: 1580.
Stopping apache24.
Waiting for PIDS: 1511.
Stopping sshd.
[...]
Terminated
Feb 27 20:50:00 project syslogd: exiting on signal 15
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Waiting (max 60 seconds) for system process `bufdaemon' to stop... done
Waiting (max 60 seconds) for system process `syncer' to stop... 
Syncing disks, vnodes remaining... 0 done
All buffers synced.
Uptime: 1d6h14m45s
acpi0: Powering system off

So the problem seems to lie with the implementation of the "Stop" button, not bhyve itself.

HTH,
Patrick

#8 Updated by Marcelo Araujo over 2 years ago

  • Severity set to Low Medium

#9 Updated by Patrick M. Hausen over 2 years ago

Stop button still does not work in 11.1-U4:

[2018/05/03 08:03:33] (DEBUG) VMService.stop():364 - ===> Soft Stop VM: Cloud ID: 9 BHYVE_CODE: None
[2018/05/03 08:03:33] (WARNING) VMService.destroy_vm():275 - ===> Destroying VM: Cloud ID: 9 BHYVE_CODE: None
[2018/05/03 08:03:33] (DEBUG) VMService.run():250 - Cloud: Assertion failed: (error == 0), function emulate_inout, file /freenas-11-releng/freenas/_BE/os/usr.sbin/bhyve/inout.c, line 230.

[2018/05/03 08:03:33] (INFO) VMService.run():271 - ===> Error VM: Cloud ID: 9 BHYVE_CODE: -6
[2018/05/03 08:03:33] (WARNING) VMService.destroy_vm():275 - ===> Destroying VM: Cloud ID: 9 BHYVE_CODE: -6

#10 Updated by Marcelo Araujo about 2 years ago

  • Status changed from Not Started to Screened
  • Target version changed from 11.2-RC2 to 11.3

I will try to check it again soon, targeting to 11.3.

#11 Updated by Marcelo Araujo about 2 years ago

  • Status changed from Screened to Unscreened
  • Assignee changed from Marcelo Araujo to William Grzybowski
  • Target version changed from 11.3 to N/A

Forward to middleware Team, the implementation of STOP button needs a review. If there is anything from bhyve side, that I can help, let me know.

#12 Updated by Marcelo Araujo about 2 years ago

  • Category changed from OS to Middleware

#13 Updated by William Grzybowski about 2 years ago

  • Assignee changed from William Grzybowski to Brandon Schneider
  • Severity changed from Low Medium to Medium

#14 Updated by Dru Lavigne about 2 years ago

  • Target version changed from N/A to Backlog

#15 Updated by Brandon Schneider about 2 years ago

  • Status changed from Unscreened to Not Started

#16 Updated by Brandon Schneider about 2 years ago

  • Status changed from Not Started to In Progress

#17 Updated by William Grzybowski about 2 years ago

  • Target version changed from Backlog to 11.3

#19 Updated by Patrick M. Hausen almost 2 years ago

Seems to be working as intended in 11.2-RELEASE.

Thanks
Patrick

#20 Updated by William Grzybowski almost 2 years ago

  • Status changed from In Progress to Closed
  • Assignee deleted (Brandon Schneider)
  • Target version changed from 11.3 to N/A
  • Reason for Closing set to Not Applicable

Thanks for the feedback

#21 Updated by Dru Lavigne almost 2 years ago

  • File deleted (debug-freenas-pmh-20180206084743.tgz)

#22 Updated by Derek Edwards over 1 year ago

I'm still receiving this error in 11.2-U1. Getting an error when starting and when shutting down.

[2019/02/14 16:27:54] (ERROR) VMService.stop():1141 - ===> 'NoneType' object has no attribute 'pid'

Also shows this as a running process but the bhyve never initializes:
10483 root 103 0 10.8G 7272 R 100. 0.0 13:28.22 grub-bhyve -m /mnt/Jails/.bhyve_containers/configs/4_RancherUI/device.map -r host -M 10000 -d /mnt/Jails/.bhyve_containers/configs/4_RancherUI/grub/ 4_RancherUI

I created a new test bhyve RancherOS VM and it worked just fine. Here is the output I should be seeing after the above grub-bhyve process, but am not seeing it.
(DEBUG) VMService.run():264 - Starting bhyve: bhyve -A -H -w -c 4 -m 4096 -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm9A -s 4,e1000,tap4,mac=00:a0:98:44:d4:4d -s 3:0,ahci,hd:/mnt/Jails/test.img_TESTRANCHER 9_TESTRANCHER

#23 Updated by Dru Lavigne over 1 year ago

Derek: please open a new ticket that includes your debug (System -> Advanced -> Save debug).

Also available in: Atom PDF