Code Monkey home page Code Monkey logo

Comments (11)

Code-Hex avatar Code-Hex commented on August 19, 2024 5

@ryancurrah I've released v3.0.4

from vz.

Code-Hex avatar Code-Hex commented on August 19, 2024 2

@ryancurrah Thanks!
I'll investigate it!

from vz.

balajiv113 avatar balajiv113 commented on August 19, 2024 2

@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.

Code-Hex avatar Code-Hex commented on August 19, 2024 1

OK, I can make a reproduction! Thanks.
90ae4df

from vz.

ryancurrah avatar ryancurrah commented on August 19, 2024 1

Nice! I just opened my laptop to see if I could try as well.

from vz.

Code-Hex avatar Code-Hex commented on August 19, 2024

mmm, minimal reproduction seems hard...

from vz.

ryancurrah avatar ryancurrah commented on August 19, 2024

I can try to reproduce as well.

How are you doing it?

from vz.

Code-Hex avatar Code-Hex commented on August 19, 2024

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.

Code-Hex avatar Code-Hex commented on August 19, 2024

@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.

Code-Hex avatar Code-Hex commented on August 19, 2024

It could be reproduced 7d2aa2f

from vz.

rdeusser avatar rdeusser commented on August 19, 2024

@Code-Hex you're the best. Thank you!

from vz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.