Comments (11)
@ryancurrah I've released v3.0.4
from vz.
@ryancurrah Thanks!
I'll investigate it!
from vz.
@Code-Hex
Am still getting cgo panics during stop (sometimes)
INFO[0001] [hostagent] panic:
INFO[0001] [hostagent] runtime/cgo: misuse of an invalid Handle
INFO[0001] [hostagent] goroutine 17 [running, locked to thread]:
INFO[0001] [hostagent] runtime/cgo.Handle.Value(...)
INFO[0001] [hostagent] /usr/local/opt/go/libexec/src/runtime/cgo/handle.go:124
INFO[0001] [hostagent] github.com/Code-Hex/vz/v3.changeStateOnObserver(0x0, 0xc000006601?)
INFO[0001] [hostagent] /Users/balaji/go/pkg/mod/github.com/!code-!hex/vz/[email protected]/virtualization.go:
from vz.
OK, I can make a reproduction! Thanks.
90ae4df
from vz.
Nice! I just opened my laptop to see if I could try as well.
from vz.
mmm, minimal reproduction seems hard...
from vz.
I can try to reproduce as well.
How are you doing it?
from vz.
I'm trying to make a minimal reproduction like below in issues_test.go
But haven't done yet :(
func TestIssue119(t *testing.T) {
container := newVirtualizationMachine(t,
func(vmc *vz.VirtualMachineConfiguration) error {
return setupConsoleConfig(vmc)
},
)
sshSession := container.NewSession(t)
defer sshSession.Close()
vm := container.VirtualMachine
if got := vm.State(); vz.VirtualMachineStateRunning != got {
container.Close()
t.Fatalf("want state %v but got %v", vz.VirtualMachineStateRunning, got)
}
done := make(chan struct{})
go func() {
defer close(done)
for {
select {
case newState := <-vm.StateChangedNotify():
if newState == vz.VirtualMachineStateStopped {
return
}
}
}
}()
sshSession.Run("poweroff")
for i := 0; i < 10; i++ {
runtime.GC()
time.Sleep(time.Second)
}
<-done
}
from vz.
@ryancurrah Oops, if you look closely at your stack trace, you see an error in changeStateOnObserver
.
My reproduction code was wrong because caused an error in StateChangedNotify
.
Maybe, the reason is happened Go's VirtualMachine
struct has been destructured but Objective-C VZVirtualMachine
object has not been destructured.
Re-create the reproduction code 😢
from vz.
It could be reproduced 7d2aa2f
from vz.
@Code-Hex you're the best. Thank you!
from vz.
Related Issues (20)
- Make easier to check API is available HOT 2
- socket.go could provide a Dial() method HOT 10
- macOS 13 API has been disabled despite being on Ventura with latest Xcode 14.1 HOT 1
- Support for VirtualMachine.networkDevices HOT 9
- panic: runtime/cgo: misuse of an invalid Handle on RequestStop and waiting for vm stopped state HOT 18
- Uncaught exception when using EFI bootloader with empty NVRAM file HOT 3
- macOS 14 HOT 2
- Please tell me about the projects that are using this library HOT 5
- Occasional ` runtime/cgo: misuse of an invalid Handle` panic when using vsock HOT 6
- Is it possible to run pre-built MacOS images from Packer? HOT 14
- Add `func (v *VirtioNetworkDeviceConfiguration) GetMACAddress() string`? HOT 1
- Bridged Networking HOT 7
- Seeking Continuous Sponsorship for development HOT 1
- Help: Tests Not Executing on macOS 13 (amd64) HOT 4
- VZNetworkBlockDeviceStorageDeviceAttachment
- VZMacKeyboardConfiguration
- example/gui-linux does not exit when `vm.Stop()` is used
- Vulnerability patch (golang.org/x/crypto/ssh) HOT 1
- gui-linux VZErrorDomain Internal Virtualization error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vz.