virtualization-rs icon indicating copy to clipboard operation
virtualization-rs copied to clipboard

Example is Segfaulting

Open Toasterson opened this issue 2 years ago • 0 comments

I was trying out the example with an ubuntu image today and it kept segfaulting.

After launching it with lldb I got this backtrace.

* thread #3, queue = 'second', stop reason = EXC_BAD_ACCESS (code=1, address=0x3eadde6d5640)
  * frame #0: 0x00000001884d45f8 libobjc.A.dylib`objc_release + 16
    frame #1: 0x00000001f3813c28 Virtualization`void Base::DispatchQueue::async<-[VZVirtualMachine _startInternal:completionHandler:]::$_25::operator()(bool)::'lambda'(Base::Expected<Base::Expected<void, VzCore::VirtualMachineError>, Base::Xpc::Error>)::operator()(Base::Expected<Base::Expected<void, VzCore::VirtualMachineError>, Base::Xpc::Error>)::'lambda'()>(-[VZVirtualMachine _startInternal:completionHandler:]::$_25::operator()(bool)::'lambda'(Base::Expected<Base::Expected<void, VzCore::VirtualMachineError>, Base::Xpc::Error>)::operator()(Base::Expected<Base::Expected<void, VzCore::VirtualMachineError>, Base::Xpc::Error>)::'lambda'()&&)::'lambda'(void*)::__invoke(void*) + 96
    frame #2: 0x00000001886c0400 libdispatch.dylib`_dispatch_client_callout + 20
    frame #3: 0x00000001886c7a88 libdispatch.dylib`_dispatch_lane_serial_drain + 668
    frame #4: 0x00000001886c85f8 libdispatch.dylib`_dispatch_lane_invoke + 384
    frame #5: 0x00000001886d3244 libdispatch.dylib`_dispatch_workloop_worker_thread + 648
    frame #6: 0x000000018886c074 libsystem_pthread.dylib`_pthread_wqthread + 288

I can do a lot of rust but this seems to crash when calling start_with_completion_handler(completion_handler) and then the completion handler gets the error. When I start it with lldb i get a password dialog otherwise not. Although I tried to start it with sudo.

My Mac is a Mac Mini M2 2023 with MacOS Ventura 13.4.1

Toasterson avatar Aug 09 '23 19:08 Toasterson