Code-Hex / vz

Create virtual machines and run Linux-based operating systems in Go using Apple Virtualization.framework.
https://pkg.go.dev/github.com/Code-Hex/vz/v3
MIT License
564 stars 46 forks source link

zsh: segmentation fault ./virtualization #13

Closed Code-Hex closed 1 year ago

Code-Hex commented 2 years ago

Guest Side

$ cat cli.sh
#!/usr/bin/bash

while true; do
echo hello | /usr/local/bin/socat - VSOCK-CONNECT:2:8321
sleep 1
done
Clash log ``` root@km-silicon:~# ./cli.sh 2021/12/13 02:23:23 socat[980] E connect(5, AF=40 cid:2 port:8321, 16): Connection reset by peer 2021/12/13 02:23:24 socat[984] E connect(5, AF=40 cid:2 port:8321, 16): Connection reset by peer 2021/12/13 02:23:25 socat[987] E connect(5, AF=40 cid:2 port:8321, 16): Connection reset by peer [ 102.328859] kernel BUG at arch/arm64/kernel/traps.c:405! [ 102.329110] Internal error: Oops - BUG: 0 [#1] SMP [ 102.329222] Modules linked in: dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua bridge stp llc vmw_vsock_virtio_transport vmw_vsock_virtio_transport_common vsock virtio_rng uio_pdrv_genirq uio sch_fq_codel drm ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_ce ghash_ce sha3_ce sha3_generic sha512_ce sha512_arm64 sha2_ce sha256_arm64 sha1_ce virtio_blk virtio_net net_failover failover aes_neon_bs aes_neon_blk aes_ce_blk crypto_simd cryptd aes_ce_cipher [ 102.330499] CPU: 0 PID: 352 Comm: systemd-journal Not tainted 5.4.0-84-generic #94-Ubuntu [ 102.330606] pstate: 00400005 (nzcv daif +PAN -UAO) [ 102.330733] pc : do_undefinstr+0x68/0x70 [ 102.330788] lr : do_undefinstr+0x3c/0x70 [ 102.330836] sp : ffff80001203bbc0 [ 102.330883] x29: ffff80001203bbc0 x28: ffff0000a9b0cb00 [ 102.330959] x27: 0000000000000000 x26: 0000000000000000 [ 102.331030] x25: 000000007fff0000 x24: 0000000000000000 [ 102.331104] x23: 0000000040400005 x22: ffff80000002517c [ 102.331180] x21: ffff80001203bd20 x20: 0000ffffffffffff [ 102.331249] x19: ffff80001203bbe0 x18: 0000000000000000 [ 102.331322] x17: 0000000000000000 x16: 0000000000000000 [ 102.331400] x15: 0000000000000000 x14: 0000000000000000 [ 102.331469] x13: 0000000000000000 x12: 0000000000000000 [ 102.331537] x11: 0000000000000000 x10: 0000000000000000 [ 102.331608] x9 : 0000000040000040 x8 : 0000ffffc27c05e0 [ 102.331714] x7 : 0000ffffab6345a8 x6 : ffff80001203bbb8 [ 102.331788] x5 : 0000000000000000 x4 : 0000000000000000 [ 102.331857] x3 : ffff800011b85a78 x2 : 0000000000000000 [ 102.331930] x1 : 0000000000000000 x0 : 0000000040400005 [ 102.332005] Call trace: [ 102.332044] do_undefinstr+0x68/0x70 [ 102.332125] el1_undef+0x10/0xb4 [ 102.332239] 0xffff80000002517c [ 102.332320] __secure_computing+0x50/0xe0 [ 102.332389] syscall_trace_enter+0x184/0x1c0 [ 102.332463] el0_svc_common.constprop.0+0x70/0x1f0 [ 102.332536] el0_svc_handler+0x38/0xa8 [ 102.332602] el0_svc+0x10/0x2c8 [ 102.332671] Code: 94005368 f9400bf3 a8c27bfd d65f03c0 (d4210000) [ 102.332850] ---[ end trace 82c01dc59ca40dcd ]--- [ 102.368087] systemd[1]: systemd-journald.service: Scheduled restart job, restart counter is at 1. [ 102.388590] systemd[1]: Stopping Flush Journal to Persistent Storage... [ 102.403682] systemd[1]: motd-news.service: Succeeded. [ 102.404700] systemd[1]: Finished Message of the Day. [ 102.406742] systemd[1]: systemd-journal-flush.service: Succeeded. [ 102.407392] systemd[1]: Stopped Flush Journal to Persistent Storage. [ 102.407667] systemd[1]: Stopped Journal Service. [ 102.411246] systemd[1]: Starting Journal Service... [ 102.455216] ------------[ cut here ]------------ [ 102.455294] WARNING: CPU: 0 PID: 0 at kernel/rcu/tree.c:569 rcu_idle_enter+0x74/0x80 [ 102.455355] Modules linked in: dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua bridge stp llc vmw_vsock_virtio_transport vmw_vsock_virtio_transport_common vsock virtio_rng uio_pdrv_genirq uio sch_fq_codel drm ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_ce ghash_ce sha3_ce sha3_generic sha512_ce sha512_arm64 sha2_ce sha256_arm64 sha1_ce virtio_blk virtio_net net_failover failover aes_neon_bs aes_neon_blk aes_ce_blk crypto_simd cryptd aes_ce_cipher [ 102.455747] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 5.4.0-84-generic #94-Ubuntu [ 102.455820] pstate: 20c00085 (nzCv daIf +PAN +UAO) [ 102.455857] pc : rcu_idle_enter+0x74/0x80 [ 102.455897] lr : do_idle+0x210/0x298 [ 102.455921] sp : ffff800011b73ed0 [ 102.455941] x29: ffff800011b73ed0 x28: 00000000714b0018 [ 102.455983] x27: 0000000000000000 x26: 0000000000000000 [ 102.456003] x25: 0000000000000000 x24: ffff800011b79454 [ 102.456028] x23: ffff800011b82e40 x22: ffff800011691838 [ 102.456055] x21: ffff800011b79418 x20: 0000000000000000 [ 102.456092] x19: ffff800011b79338 x18: 0000000000000000 [ 102.456138] x17: 0000000000000000 x16: 0000000000000000 [ 102.456167] x15: 0000000000000000 x14: 0000000000000000 [ 102.456210] x13: 0000000000000000 x12: 0000000000000001 [ 102.456238] x11: ffff800011258368 x10: 0000000000000ad0 [ 102.456273] x9 : ffff800011b73e00 x8 : ffff800011b83970 [ 102.456310] x7 : 0000000000000000 x6 : 000051d67bbdf899 [ 102.456336] x5 : 00ffffffffffffff x4 : 0000000000001ae2 [ 102.456371] x3 : 4000000000000002 x2 : 4000000000000000 [ 102.456407] x1 : ffff800011693b00 x0 : ffff0000adbe6b00 [ 102.456432] Call trace: [ 102.456444] rcu_idle_enter+0x74/0x80 [ 102.456489] do_idle+0x210/0x298 [ 102.456538] cpu_startup_entry+0x30/0xb8 [ 102.456587] rest_init+0xc0/0xcc [ 102.456639] arch_call_rest_init+0x18/0x20 [ 102.456671] start_kernel+0x4cc/0x500 [ 102.456689] ---[ end trace 82c01dc59ca40dce ]--- [ 102.536777] systemd-journald[1240]: File /var/log/journal/4c97dcebbda44c73a9830202169730e5/system.journal corrupted or uncleanly shut down, renaming and replacing. [ 102.629417] systemd[1]: Started Journal Service. [ 102.638990] systemd-journald[1240]: Received client request to flush runtime journal. zsh: segmentation fault ./virtualization ```

Host Side

if newState == vz.VirtualMachineStateRunning {
    log.Println("start VM is running")
    listener := vz.NewVirtioSocketListener(func(conn *vz.VirtioSocketConnection, err error) {
        defer func() {
            if err := conn.Close(); err != nil {
                log.Println("closing error", err)
            }
        }()

        log.Println("call", err)
        log.Println("conn", conn.RemoteAddr(), conn.LocalAddr())
        _, err = io.Copy(log.Writer(), conn)
        log.Println("err", err)
    })

    time.Sleep(30 * time.Second)
    socketDevices := vm.SocketDevices()
    for _, socketDevice := range socketDevices {
        log.Println("listen...")
        socketDevice.SetSocketListenerForPort(listener, 8321)
        log.Println("done.")
    }
}
Clash log I've gotten by `$ cat ~/Library/Logs/DiagnosticReports/virtualization_2021-12-13-113904_mac-mini.crash | pbcopy` ``` Process: virtualization [18487] Path: /Users/USER/*/virtualization Identifier: virtualization Version: 0 Code Type: ARM-64 (Native) Parent Process: zsh [15217] User ID: 501 Date/Time: 2021-12-13 11:39:04.024 +0900 OS Version: macOS 11.6 (20G165) Report Version: 12 Anonymous UUID: 1C28D546-716A-F6B7-A889-1A3819FB7AAC Sleep/Wake UUID: 725F0E6B-3962-4620-86C6-FCB3D8C9A235 Time Awake Since Boot: 3700000 seconds Time Since Wake: 1700 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGSEGV) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: virtualization [18487] Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdac _pthread_cond_wait + 1248 2 virtualization 0x00000001041a8138 runtime.pthread_cond_wait_trampoline + 24 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 1: 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdd8 _pthread_cond_wait + 1292 2 virtualization 0x00000001041a816c runtime.pthread_cond_timedwait_relative_np_trampoline + 28 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 2: 0 libsystem_kernel.dylib 0x000000018cfe59bc read + 8 1 virtualization 0x00000001041a799c runtime.read_trampoline + 28 Thread 3: 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdac _pthread_cond_wait + 1248 2 virtualization 0x00000001041a8138 runtime.pthread_cond_wait_trampoline + 24 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 4: 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdac _pthread_cond_wait + 1248 2 virtualization 0x00000001041a8138 runtime.pthread_cond_wait_trampoline + 24 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 5: 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdac _pthread_cond_wait + 1248 2 virtualization 0x00000001041a8138 runtime.pthread_cond_wait_trampoline + 24 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 6: 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdac _pthread_cond_wait + 1248 2 virtualization 0x00000001041a8138 runtime.pthread_cond_wait_trampoline + 24 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 7: 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdac _pthread_cond_wait + 1248 2 virtualization 0x00000001041a8138 runtime.pthread_cond_wait_trampoline + 24 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 8: 0 libsystem_pthread.dylib 0x000000018d01a5cc start_wqthread + 0 Thread 9:: Dispatch queue: c6rb3g5mmud4gdpjo080 0 libsystem_kernel.dylib 0x000000018cfe8344 __semwait_signal + 8 1 libsystem_c.dylib 0x000000018cf64284 nanosleep + 216 2 libsystem_c.dylib 0x000000018cf64148 usleep + 68 3 virtualization 0x00000001041a7d84 runtime.usleep_trampoline + 20 4 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 10: 0 libsystem_kernel.dylib 0x000000018cfe8548 __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x000000018d01fdac _pthread_cond_wait + 1248 2 virtualization 0x00000001041a8138 runtime.pthread_cond_wait_trampoline + 24 3 virtualization 0x00000001041a6ec8 runtime.asmcgocall + 200 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000104 x1: 0x0000000000000000 x2: 0x0000000000000300 x3: 0x0000000000000000 x4: 0x0000000000000000 x5: 0x00000000000000a0 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x000000016bcbe858 x9: 0x0000000000000301 x10: 0x00000001042dbd78 x11: 0x0000010000000102 x12: 0x0000000000000100 x13: 0x0000000000000000 x14: 0x0000000000000100 x15: 0x0000000000000001 x16: 0x0000000000000131 x17: 0x00000001fbaa6e48 x18: 0x0000000000000000 x19: 0x00000001042dbd60 x20: 0x00000001042dbda0 x21: 0x0000000104537e20 x22: 0x0000000000000000 x23: 0x0000000000000000 x24: 0x0000000000000300 x25: 0x0000000000000301 x26: 0x0000000000000400 x27: 0x0000000000000020 x28: 0x00000001042db620 fp: 0x000000016bcbe8d0 lr: 0x000000018d01fdac sp: 0x000000016bcbe840 pc: 0x000000018cfe8548 cpsr: 0x60000000 far: 0x000000016811b6e8 esr: 0x56000080 Binary Images: 0x104140000 - 0x10421bfff +virtualization (0) /Users/USER/*/virtualization 0x10447c000 - 0x1044fbfff dyld (852.2) <38657979-1ABE-3C9A-BF64-EF3B746216AB> /usr/lib/dyld 0x18cd7a000 - 0x18cd7bfff libsystem_blocks.dylib (79) /usr/lib/system/libsystem_blocks.dylib 0x18cd7c000 - 0x18cdb3fff libxpc.dylib (2038.120.1) <0E990C5D-C4F7-304A-9714-4409647CC2EF> /usr/lib/system/libxpc.dylib 0x18cdb4000 - 0x18cdcbfff libsystem_trace.dylib (1277.120.1) <7A6B4800-8D94-3091-AC78-2D6B97A9B496> /usr/lib/system/libsystem_trace.dylib 0x18cdcc000 - 0x18ce3ffff libcorecrypto.dylib (1000.140.4) /usr/lib/system/libcorecrypto.dylib 0x18ce40000 - 0x18ce6bfff libsystem_malloc.dylib (317.140.5) /usr/lib/system/libsystem_malloc.dylib 0x18ce6c000 - 0x18ceb0fff libdispatch.dylib (1271.120.2) <4EDD5F72-2296-3891-B2A1-6741DB6C05C9> /usr/lib/system/libdispatch.dylib 0x18ceb1000 - 0x18ceeafff libobjc.A.dylib (824) <252C93CC-2D39-3C15-87F6-1336658B2F49> /usr/lib/libobjc.A.dylib 0x18ceeb000 - 0x18ceedfff libsystem_featureflags.dylib (28.60.1) <61A79E0B-1836-376D-AC24-171B40A9FAE7> /usr/lib/system/libsystem_featureflags.dylib 0x18ceee000 - 0x18cf6ffff libsystem_c.dylib (1439.141.1) <9B3C0AD0-1E0B-39D1-BE25-B97F8EA7E623> /usr/lib/system/libsystem_c.dylib 0x18cf70000 - 0x18cfcbfff libc++.1.dylib (905.6) /usr/lib/libc++.1.dylib 0x18cfcc000 - 0x18cfe3fff libc++abi.dylib (905.6) <3C5176E2-CE48-312B-97F6-23D4E7AFA43F> /usr/lib/libc++abi.dylib 0x18cfe4000 - 0x18d017fff libsystem_kernel.dylib (7195.141.6) /usr/lib/system/libsystem_kernel.dylib 0x18d018000 - 0x18d024fff libsystem_pthread.dylib (454.120.2) /usr/lib/system/libsystem_pthread.dylib 0x18d025000 - 0x18d066fff libdyld.dylib (852.2) /usr/lib/system/libdyld.dylib 0x18d067000 - 0x18d06dfff libsystem_platform.dylib (254.80.2) <2CC11FAD-1E31-3533-B1D8-9CDDF5DFE595> /usr/lib/system/libsystem_platform.dylib 0x18d06e000 - 0x18d099fff libsystem_info.dylib (542.40.3) <3B5B9F97-ECFB-3F6E-9B85-D8C62A8B3205> /usr/lib/system/libsystem_info.dylib 0x18d09a000 - 0x18d548fff com.apple.CoreFoundation (6.9 - 1778.101) <1FC1BD60-DC83-3CC7-89AC-D734DC18473A> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x18d549000 - 0x18d781fff com.apple.LaunchServices (1122.44 - 1122.44) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x18d782000 - 0x18d85cfff com.apple.gpusw.MetalTools (1.0 - 1) /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools 0x18d85d000 - 0x18dac7fff libBLAS.dylib (1336.140.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x18dac8000 - 0x18db12fff com.apple.Lexicon-framework (1.0 - 86.2) /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon 0x18db13000 - 0x18db76fff libSparse.dylib (106) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib 0x18db77000 - 0x18dbfefff com.apple.SystemConfiguration (1.20 - 1.20) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x18dbff000 - 0x18dc32fff libCRFSuite.dylib (50) /usr/lib/libCRFSuite.dylib 0x18dc33000 - 0x18de61fff libmecabra.dylib (929.10) /usr/lib/libmecabra.dylib 0x18de62000 - 0x18e1eefff com.apple.Foundation (6.9 - 1778.101) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x18e1ef000 - 0x18e2defff com.apple.LanguageModeling (1.0 - 247.3) /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling 0x18e2df000 - 0x18e401fff com.apple.CoreDisplay (237.4 - 237.4) <2CC8483E-D168-3B0D-9E08-9381248D02BF> /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay 0x18e402000 - 0x18e66afff com.apple.audio.AudioToolboxCore (1.0 - 1181.72) <9427F25C-CE4F-3CC4-985F-E8968FDB2ECA> /System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore 0x18e66b000 - 0x18e83afff com.apple.CoreText (677.6.0.2 - 677.6.0.2) /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText 0x18e83b000 - 0x18ee55fff com.apple.audio.CoreAudio (5.0 - 5.0) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x18ee56000 - 0x18f1bcfff com.apple.security (7.0 - 59754.140.13) <38B23856-B7E5-3AA2-9F35-F5ACECB8E5D9> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x18f1bd000 - 0x18f42efff libicucore.A.dylib (66112) <987F240B-946D-3F96-AD1A-F3EF6752D5DB> /usr/lib/libicucore.A.dylib 0x18f42f000 - 0x18f439fff libsystem_darwin.dylib (1439.141.1) <9BF54A49-874D-3D91-B319-6B2F676FE42D> /usr/lib/system/libsystem_darwin.dylib 0x18f43a000 - 0x18f72dfff com.apple.CoreServices.CarbonCore (1307.3 - 1307.3) <2D5028C9-5466-3020-B1E6-0ACD3B80AC24> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x18f76a000 - 0x18f7a5fff com.apple.CSStore (1122.44 - 1122.44) <26E267F1-2A76-389C-9440-9F3EB0F2C1C0> /System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore 0x18f7a6000 - 0x18f871fff com.apple.framework.IOKit (2.0.2 - 1845.120.6) <861ED733-56AF-311B-949E-DC077817E257> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x18f872000 - 0x18f87dfff libsystem_notify.dylib (279.40.4) /usr/lib/system/libsystem_notify.dylib 0x18f8cc000 - 0x19060dfff com.apple.AppKit (6.9 - 2022.60.128) <53554311-BEF7-3421-8A80-EDFBEFD40209> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x19060e000 - 0x190834fff com.apple.UIFoundation (1.0 - 728.9) <7595FD16-C324-39BD-8330-9E4CF256104B> /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation 0x190835000 - 0x190847fff com.apple.UniformTypeIdentifiers (637 - 637) <7F7509B9-260B-388E-96FC-D3B2C61B48DD> /System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers 0x190c7f000 - 0x1913c7fff libnetwork.dylib (2288.140.7) <992E11C6-A4C3-344F-80F9-D49FC41F9EBB> /usr/lib/libnetwork.dylib 0x1913c8000 - 0x191850fff com.apple.CFNetwork (1240.0.4 - 1240.0.4) <9DDF924B-F7D9-3E7E-B2D0-27CF26767169> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x191851000 - 0x191860fff libsystem_networkextension.dylib (1295.140.3) <0FFACDE5-D546-306D-B9FA-06EC8FCAEEF9> /usr/lib/system/libsystem_networkextension.dylib 0x191861000 - 0x191862fff libenergytrace.dylib (22.100.1) <9175E063-EC99-3395-A576-2E7E8EFDB736> /usr/lib/libenergytrace.dylib 0x191863000 - 0x1918b5fff libMobileGestalt.dylib (978.140.1) <961DF322-11B4-3E9C-A2D6-D96EB159E0F7> /usr/lib/libMobileGestalt.dylib 0x1918b6000 - 0x1918cdfff libsystem_asl.dylib (385) <7F462B8A-541F-3195-9BAE-CDEDFA3BA8A4> /usr/lib/system/libsystem_asl.dylib 0x1918ce000 - 0x1918e7fff com.apple.TCC (1.0 - 1) <207AAC8A-1E0E-329F-B19E-BB443993C492> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC 0x1918e8000 - 0x191c56fff com.apple.SkyLight (1.600.0 - 588.7) <42D48BB2-B5B8-36EB-89B5-DEC02FAD414B> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight 0x191c57000 - 0x192244fff com.apple.CoreGraphics (2.0 - 1463.17.3) <2411F322-E2CB-3E13-B7E5-7356CDFA093C> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x192245000 - 0x19233afff com.apple.ColorSync (4.13.0 - 3473.4.3) /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x19233b000 - 0x192396fff com.apple.HIServices (1.22 - 716) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x1926f0000 - 0x192a98fff com.apple.CoreData (120 - 1048) <793DB28D-4D44-346D-84F5-2924E4C90CEA> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x192a99000 - 0x192aaffff com.apple.ProtocolBuffer (1 - 285.24.10.20.1) /System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer 0x192ab0000 - 0x192c4dfff libsqlite3.dylib (321.3) <5C9A38A7-82B6-3A73-BD16-1D32C3B978C0> /usr/lib/libsqlite3.dylib 0x192cc3000 - 0x192cd9fff com.apple.commonutilities (8.0 - 900) <8FB5F198-91AB-3C57-B304-A9EEF49FAFDB> /System/Library/PrivateFrameworks/CommonUtilities.framework/Versions/A/CommonUtilities 0x192cda000 - 0x192d5cfff com.apple.BaseBoard (526 - 526) /System/Library/PrivateFrameworks/BaseBoard.framework/Versions/A/BaseBoard 0x192d5d000 - 0x192daafff com.apple.RunningBoardServices (1.0 - 505.100.9) <651DE9C8-E7B1-3452-842D-0808F615E4D9> /System/Library/PrivateFrameworks/RunningBoardServices.framework/Versions/A/RunningBoardServices 0x192dab000 - 0x192e1efff com.apple.AE (918.6 - 918.6) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x192e1f000 - 0x192e26fff libdns_services.dylib (1310.140.1) <57E2AA69-70BC-3BC5-90C2-4E6152B2A7BB> /usr/lib/libdns_services.dylib 0x192e27000 - 0x192e2efff libsystem_symptoms.dylib (1431.140.1) <0B4FC817-CC87-31F2-872B-BD505D29F5EE> /usr/lib/system/libsystem_symptoms.dylib 0x192e2f000 - 0x192f8bfff com.apple.Network (1.0 - 1) <1CF3457C-B1F3-3643-A404-E74EC9C587A0> /System/Library/Frameworks/Network.framework/Versions/A/Network 0x192f8c000 - 0x192fbefff com.apple.analyticsd (1.0 - 1) <38259CAA-FC30-3B56-A371-3E6A6AC5D1CA> /System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics 0x192fbf000 - 0x192fc1fff libDiagnosticMessagesClient.dylib (112) <3B3CE40D-33BF-351F-B539-ACD4AF8CDF2E> /usr/lib/libDiagnosticMessagesClient.dylib 0x192fc2000 - 0x19300dfff com.apple.spotlight.metadata.utilities (1.0 - 2150.26) <7EA4F807-3DEB-3B59-9112-B632641123EA> /System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities 0x19300e000 - 0x1930a7fff com.apple.Metadata (10.7.0 - 2150.26) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x1930a8000 - 0x1930aefff com.apple.DiskArbitration (2.7 - 2.7) <03246747-F25B-3D05-B2E7-1BE69E878EF3> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x1930af000 - 0x1933b9fff com.apple.vImage (8.1 - 544.4) <88CFC382-4A40-3339-A5F2-81FDA6D902B3> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x1933ba000 - 0x193677fff com.apple.QuartzCore (1.11 - 927.24) <1077F760-1430-3263-8E32-2B273631B479> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x193678000 - 0x1936b9fff libFontRegistry.dylib (309) <4608D786-2101-39B4-8243-04EA0BDB4A5F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x1936ba000 - 0x1937d1fff com.apple.coreui (2.1 - 692.1) <71572479-4BDB-3BDD-993D-FF5202AFC8E3> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x1938b2000 - 0x1938bcfff com.apple.PerformanceAnalysis (1.278.3 - 278.3) <81A40179-1530-3EFE-B2D9-EDE9189CF854> /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis 0x1938bd000 - 0x1938cafff com.apple.OpenDirectory (11.6 - 230.40.1) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x1938cb000 - 0x1938eafff com.apple.CFOpenDirectory (11.6 - 230.40.1) <254CB692-3AF0-387D-9EAD-AA72B7F34A59> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x1938eb000 - 0x1938f7fff com.apple.CoreServices.FSEvents (1290.120.5 - 1290.120.5) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents 0x1938f8000 - 0x19391bfff com.apple.coreservices.SharedFileList (144 - 144) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList 0x19391c000 - 0x19391efff libapp_launch_measurement.dylib (14.1) /usr/lib/libapp_launch_measurement.dylib 0x19391f000 - 0x193961fff com.apple.CoreAutoLayout (1.0 - 21.10.1) <5789DEAE-4BBD-3679-964B-40D6E208E8E8> /System/Library/PrivateFrameworks/CoreAutoLayout.framework/Versions/A/CoreAutoLayout 0x193962000 - 0x193a4efff libxml2.2.dylib (34.10) <9C392F20-D487-3A66-93AD-87BA9D7E403E> /usr/lib/libxml2.2.dylib 0x193a4f000 - 0x193aa2fff com.apple.CoreVideo (1.8 - 414.7) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x193aa3000 - 0x193aa5fff com.apple.loginsupport (1.0 - 1) /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport 0x194c83000 - 0x194c94fff libsystem_containermanager.dylib (318.100.4) /usr/lib/system/libsystem_containermanager.dylib 0x194c95000 - 0x194ca6fff com.apple.IOSurface (290.8.1 - 290.8.1) <6ACC766E-E6F9-3C00-8260-8DB708F1564B> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x194ca7000 - 0x194cb0fff com.apple.IOAccelerator (442.9 - 442.9) /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator 0x194cb1000 - 0x194d9ffff com.apple.Metal (244.303 - 244.303) <6F669C63-4630-3788-871F-E53E3E01E0E1> /System/Library/Frameworks/Metal.framework/Versions/A/Metal 0x194da0000 - 0x194dbffff com.apple.audio.caulk (1.0 - 70) /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk 0x194dc0000 - 0x194eb7fff com.apple.CoreMedia (1.0 - 2780.10) /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia 0x194eb8000 - 0x195010fff libFontParser.dylib (305.6.0.4) /System/Library/PrivateFrameworks/FontServices.framework/libFontParser.dylib 0x195011000 - 0x19531bfff com.apple.HIToolbox (2.1.1 - 1062) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x19531c000 - 0x195333fff com.apple.framework.DFRFoundation (1.0 - 267) /System/Library/PrivateFrameworks/DFRFoundation.framework/Versions/A/DFRFoundation 0x195334000 - 0x195337fff com.apple.dt.XCTTargetBootstrap (1.0 - 18119.1) <812F9359-CA46-3856-AB3D-21D2998C19CB> /System/Library/PrivateFrameworks/XCTTargetBootstrap.framework/Versions/A/XCTTargetBootstrap 0x195338000 - 0x195362fff com.apple.CoreSVG (1.0 - 149) <22C3C4CF-94DD-3F9C-9332-E7F1B40B4FC2> /System/Library/PrivateFrameworks/CoreSVG.framework/Versions/A/CoreSVG 0x195363000 - 0x195582fff com.apple.ImageIO (3.3.0 - 2130.7.3) <8C7ADB80-880A-3811-BC89-3DF7F63FB8AB> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x195583000 - 0x19589bfff com.apple.CoreImage (16.3.0 - 1140.2) /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage 0x19589c000 - 0x195900fff com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSCore.framework/Versions/A/MPSCore 0x195901000 - 0x195905fff libsystem_configuration.dylib (1109.140.1) <9BC511C4-6613-3F1D-8592-7D3971B24921> /usr/lib/system/libsystem_configuration.dylib 0x195906000 - 0x19590afff libsystem_sandbox.dylib (1441.141.4) /usr/lib/system/libsystem_sandbox.dylib 0x19590b000 - 0x19590cfff com.apple.AggregateDictionary (1.0 - 1) /System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary 0x19590d000 - 0x195910fff com.apple.AppleSystemInfo (3.1.5 - 3.1.5) <30FA6080-7520-32BF-86BF-CD8AACD9E956> /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo 0x195911000 - 0x195912fff liblangid.dylib (136) /usr/lib/liblangid.dylib 0x195913000 - 0x1959a0fff com.apple.CoreNLP (1.0 - 245.2) <8D86FF1B-B90A-37FD-990D-CEA65FE35181> /System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP 0x1959a1000 - 0x1959a8fff com.apple.LinguisticData (1.0 - 399) <17E4D57B-5A70-3EC3-8BF5-82B80EFB3348> /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData 0x1959a9000 - 0x195e67fff libBNNS.dylib (288.100.5) <68DE4998-AAF1-35A2-A2F8-28A2E0CBA48C> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib 0x195e68000 - 0x195f16fff libvDSP.dylib (760.100.3) <5CB9D8BD-028D-318B-99F1-931F53997697> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x195f17000 - 0x195f29fff com.apple.CoreEmoji (1.0 - 128.4) /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji 0x195f2a000 - 0x195f34fff com.apple.IOMobileFramebuffer (343.0.0 - 343.0.0) /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/Versions/A/IOMobileFramebuffer 0x196223000 - 0x196232fff com.apple.AssertionServices (1.0 - 505.100.9) /System/Library/PrivateFrameworks/AssertionServices.framework/Versions/A/AssertionServices 0x196233000 - 0x1962b6fff com.apple.securityfoundation (6.0 - 55240.40.4) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x1962b7000 - 0x1962c0fff com.apple.coreservices.BackgroundTaskManagement (1.0 - 104) <7BC12DCA-0109-39D5-B5DE-398520550D66> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement 0x1962c1000 - 0x1962c6fff com.apple.xpc.ServiceManagement (1.0 - 1) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement 0x1962c7000 - 0x1962c9fff libquarantine.dylib (119.40.2) /usr/lib/system/libquarantine.dylib 0x1962ca000 - 0x1962d9fff libCheckFix.dylib (31) <95D7D1F7-7C6F-3517-9872-79FCCCCC9D69> /usr/lib/libCheckFix.dylib 0x1962da000 - 0x1962f0fff libcoretls.dylib (169.100.1) /usr/lib/libcoretls.dylib 0x1962f1000 - 0x196301fff libbsm.0.dylib (68.40.1) <51614EB7-9B57-3F8F-9679-DDA22278CC9F> /usr/lib/libbsm.0.dylib 0x196302000 - 0x196347fff libmecab.dylib (929.10) /usr/lib/libmecab.dylib 0x196348000 - 0x19634cfff libgermantok.dylib (24) /usr/lib/libgermantok.dylib 0x19634d000 - 0x196361fff libLinearAlgebra.dylib (1336.140.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib 0x196362000 - 0x196565fff com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) <75A63926-9BBF-3FD7-AB8F-BAD7DFF3A881> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork 0x196566000 - 0x1965affff com.apple.MetalPerformanceShaders.MPSRayIntersector (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector 0x1965b0000 - 0x196702fff com.apple.MLCompute (1.0 - 1) <3C4B7923-366A-3F89-9BE2-00D7252F59A6> /System/Library/Frameworks/MLCompute.framework/Versions/A/MLCompute 0x196703000 - 0x196731fff com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix 0x196732000 - 0x196784fff com.apple.MetalPerformanceShaders.MPSNDArray (1.0 - 1) <15018D77-2512-3FB8-A170-4DF3DF5AF90D> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSNDArray.framework/Versions/A/MPSNDArray 0x196785000 - 0x19680cfff com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) <83375879-A492-3EC8-A57A-7630E7C12D33> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/Frameworks/MPSImage.framework/Versions/A/MPSImage 0x19680d000 - 0x19681cfff com.apple.AppleFSCompression (125 - 1.0) /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression 0x19681d000 - 0x196829fff libbz2.1.0.dylib (44) /usr/lib/libbz2.1.0.dylib 0x19682a000 - 0x19682efff libsystem_coreservices.dylib (127.1) /usr/lib/system/libsystem_coreservices.dylib 0x19682f000 - 0x19685ffff com.apple.CoreServices.OSServices (1122.44 - 1122.44) <3B9B314C-8F7D-3058-9B89-6D4897868633> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x196a14000 - 0x196a25fff libz.1.dylib (76) <4838F5D2-C9BB-366A-9745-209A80BCC426> /usr/lib/libz.1.dylib 0x196a26000 - 0x196a53fff libsystem_m.dylib (3186.100.3) <092A6565-3BE3-3EEF-844E-B846793A4115> /usr/lib/system/libsystem_m.dylib 0x196a54000 - 0x196a54fff libcharset.1.dylib (59) <7A25825A-D346-3BB8-AA3F-498510B5E31F> /usr/lib/libcharset.1.dylib 0x196a55000 - 0x196a5afff libmacho.dylib (980) /usr/lib/system/libmacho.dylib 0x196a5b000 - 0x196a72fff libkxld.dylib (7195.141.6) <9C25AE8F-59E2-3963-B645-025A7661A69A> /usr/lib/system/libkxld.dylib 0x196a73000 - 0x196a80fff libcommonCrypto.dylib (60178.120.3) <146E6A52-3060-32A1-9119-C3D6F8B5C57B> /usr/lib/system/libcommonCrypto.dylib 0x196a81000 - 0x196a8bfff libunwind.dylib (201) <2A01EF92-F92D-35F7-B638-8CBC6896DCAA> /usr/lib/system/libunwind.dylib 0x196a8c000 - 0x196a93fff liboah.dylib (203.58) <6802DEC1-9ED5-3667-BFE0-3BDDE8BB40E1> /usr/lib/liboah.dylib 0x196a94000 - 0x196a9cfff libcopyfile.dylib (173.40.2) <8477DD43-56AA-3422-BF23-4ADC7B98462F> /usr/lib/system/libcopyfile.dylib 0x196a9d000 - 0x196aa0fff libcompiler_rt.dylib (102.2) <50E8F23E-3E63-31BF-BFC3-EE75D281B151> /usr/lib/system/libcompiler_rt.dylib 0x196aa1000 - 0x196aa3fff libsystem_collections.dylib (1439.141.1) /usr/lib/system/libsystem_collections.dylib 0x196aa4000 - 0x196aa6fff libsystem_secinit.dylib (87.60.1) <836B23E3-DF08-31C8-98AD-4A9B12A4B404> /usr/lib/system/libsystem_secinit.dylib 0x196aa7000 - 0x196aa9fff libremovefile.dylib (49.120.1) <687A6E36-0460-30BC-A675-7F83059AE2D9> /usr/lib/system/libremovefile.dylib 0x196aaa000 - 0x196aaafff libkeymgr.dylib (31) /usr/lib/system/libkeymgr.dylib 0x196aab000 - 0x196ab3fff libsystem_dnssd.dylib (1310.140.1) /usr/lib/system/libsystem_dnssd.dylib 0x196ab4000 - 0x196ab9fff libcache.dylib (83) <2EA812B3-0565-35FA-BF54-DF98EF3DB5DE> /usr/lib/system/libcache.dylib 0x196aba000 - 0x196abbfff libSystem.B.dylib (1292.120.1) <1E75FCDF-2357-30FE-AAAD-5290BA722464> /usr/lib/libSystem.B.dylib 0x196abc000 - 0x196abffff libfakelink.dylib (3) /usr/lib/libfakelink.dylib 0x196ac0000 - 0x196ac0fff com.apple.SoftLinking (1.0 - 1) /System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking 0x196ac1000 - 0x196afcfff libpcap.A.dylib (98.100.3) <842B3358-71DB-3219-9768-0A013DC08CEC> /usr/lib/libpcap.A.dylib 0x196afd000 - 0x196bf2fff libiconv.2.dylib (59) <99E6BB0C-73CD-3239-942A-F6DD9325B90A> /usr/lib/libiconv.2.dylib 0x196bf3000 - 0x196c05fff libcmph.dylib (8) <7E0DAF54-070D-3D42-B362-94B9138589CF> /usr/lib/libcmph.dylib 0x196c06000 - 0x196c76fff libarchive.2.dylib (83.100.2) <5F23CB65-ACED-364E-BD1D-E00247CD6FC7> /usr/lib/libarchive.2.dylib 0x196c77000 - 0x196ce7fff com.apple.SearchKit (1.4.1 - 1.4.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x196ce8000 - 0x196ce9fff libThaiTokenizer.dylib (3) /usr/lib/libThaiTokenizer.dylib 0x196cea000 - 0x196d0efff com.apple.applesauce (1.0 - 16.28) /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce 0x196d0f000 - 0x196d25fff libapple_nghttp2.dylib (1.41) <06587250-EE7C-36A1-8A78-C8409EB2ECCD> /usr/lib/libapple_nghttp2.dylib 0x196d26000 - 0x196d38fff libSparseBLAS.dylib (1336.140.1) <1FF666F8-7B71-378D-A890-A29032EC6AA4> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib 0x196d39000 - 0x196d3afff com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders 0x196d3b000 - 0x196d3ffff libpam.2.dylib (28.40.1) <8662B90D-5137-3BCC-BEC6-F7FEB6BD8F01> /usr/lib/libpam.2.dylib 0x196d40000 - 0x196d5efff libcompression.dylib (96.120.1) <6BCBE6BF-0CDD-3059-BBB9-45AF92D7EFA7> /usr/lib/libcompression.dylib 0x196d5f000 - 0x196d63fff libQuadrature.dylib (7) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib 0x196d64000 - 0x197220fff libLAPACK.dylib (1336.140.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x197221000 - 0x197273fff com.apple.DictionaryServices (1.2 - 341) <2845ABAE-8FCB-38B0-8F57-72EB3A67CF63> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x197274000 - 0x19728cfff liblzma.5.dylib (16) <20EEA2A7-C813-3D16-879E-A21431E7E72D> /usr/lib/liblzma.5.dylib 0x19728d000 - 0x19728efff libcoretls_cfhelpers.dylib (169.100.1) /usr/lib/libcoretls_cfhelpers.dylib 0x19728f000 - 0x197373fff com.apple.APFS (1677.141.2 - 1677.141.2) /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS 0x197374000 - 0x197381fff libxar.1.dylib (452) /usr/lib/libxar.1.dylib 0x197382000 - 0x197385fff libutil.dylib (58.40.2) <1650ED1F-F6F6-3018-8F7E-151162BF10E6> /usr/lib/libutil.dylib 0x197386000 - 0x1973affff libxslt.1.dylib (17.6) <0ADB40D6-F173-3865-A4DE-153889696ED5> /usr/lib/libxslt.1.dylib 0x1973b0000 - 0x1973bafff libChineseTokenizer.dylib (37.1) <0D3892E7-FEA4-3161-BAD5-26B593210AA1> /usr/lib/libChineseTokenizer.dylib 0x1973bb000 - 0x19742afff libvMisc.dylib (760.100.3) <3ABB75F1-89E8-329F-9BF4-328E2E59B27F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x19742b000 - 0x1974bcfff libate.dylib (3.0.6) <5D22D187-0024-3E0C-86F7-A5D4258D2101> /usr/lib/libate.dylib 0x1974bd000 - 0x1974c4fff libIOReport.dylib (64.100.1) /usr/lib/libIOReport.dylib 0x19764c000 - 0x197697fff com.apple.AppleVAFramework (6.1.3 - 6.1.3) /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA 0x197698000 - 0x1976b2fff libexpat.1.dylib (26.141.1) /usr/lib/libexpat.1.dylib 0x1976b3000 - 0x1976bbfff libheimdal-asn1.dylib (597.140.2) <382A3FF4-A00D-3E8A-8C7D-C4A511BBC2E3> /usr/lib/libheimdal-asn1.dylib 0x1976bc000 - 0x1976cefff com.apple.IconFoundation (479.4 - 479.4) /System/Library/PrivateFrameworks/IconFoundation.framework/Versions/A/IconFoundation 0x1976cf000 - 0x197732fff com.apple.IconServices (479.4 - 479.4) <01A40ED2-0F29-3549-A5F5-DB1E596ADD2A> /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices 0x197733000 - 0x1977d5fff com.apple.MediaExperience (1.0 - 1) /System/Library/PrivateFrameworks/MediaExperience.framework/Versions/A/MediaExperience 0x1977d6000 - 0x1977fcfff com.apple.persistentconnection (1.0 - 1.0) <5FD46B59-5D62-366A-80F1-CDE2E8F48555> /System/Library/PrivateFrameworks/PersistentConnection.framework/Versions/A/PersistentConnection 0x1977fd000 - 0x19780afff com.apple.GraphVisualizer (1.0 - 100.1) <3467C846-8CD3-3013-B4A8-827D37F7726C> /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer 0x19780b000 - 0x197c1dfff com.apple.vision.FaceCore (4.3.2 - 4.3.2) <0659DE86-99CF-33AB-A4AF-858F1E940A85> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore 0x197c1e000 - 0x197c5dfff com.apple.OTSVG (1.0 - 677.6.0.2) /System/Library/PrivateFrameworks/OTSVG.framework/Versions/A/OTSVG 0x197c5e000 - 0x197c65fff com.apple.xpc.AppServerSupport (1.0 - 2038.120.1) /System/Library/PrivateFrameworks/AppServerSupport.framework/Versions/A/AppServerSupport 0x197c66000 - 0x197c74fff libhvf.dylib (1.0 - $[CURRENT_PROJECT_VERSION]) <8346C962-1506-3A3F-A6C7-BA096F2DE20A> /System/Library/PrivateFrameworks/FontServices.framework/libhvf.dylib 0x197c75000 - 0x197c7bfff libspindump.dylib (295.2) <2BE38B0F-B9B3-3952-ADA0-A87B9B18E3AE> /usr/lib/libspindump.dylib 0x197c7c000 - 0x197d2efff com.apple.Heimdal (4.0 - 2.0) /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal 0x197ec3000 - 0x197efdfff com.apple.bom (14.0 - 235) <0F27FA57-F455-30C3-9B19-1111F24ABB6C> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom 0x197efe000 - 0x197f41fff com.apple.AppleJPEG (1.0 - 1) <9B47B12A-B064-3054-B702-203A0E18193B> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG 0x197f42000 - 0x198023fff libJP2.dylib (2130.7.3) <239163F1-8926-3DB9-A74A-BA78CE654923> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x198024000 - 0x198027fff com.apple.WatchdogClient.framework (1.0 - 98.120.2) /System/Library/PrivateFrameworks/WatchdogClient.framework/Versions/A/WatchdogClient 0x198028000 - 0x198060fff com.apple.MultitouchSupport.framework (4440.3 - 4440.3) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x198061000 - 0x198191fff com.apple.VideoToolbox (1.0 - 2780.10) /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox 0x198192000 - 0x1981c4fff libAudioToolboxUtility.dylib (1181.72) /usr/lib/libAudioToolboxUtility.dylib 0x1981c5000 - 0x1981e6fff libPng.dylib (2130.7.3) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x1981e7000 - 0x198243fff libTIFF.dylib (2130.7.3) <6FF8682B-E15C-3F53-BCAA-3F7506D001B4> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x198244000 - 0x198262fff com.apple.IOPresentment (58 - 37) /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment 0x198263000 - 0x198267fff com.apple.GPUWrangler (6.3.5 - 6.3.5) /System/Library/PrivateFrameworks/GPUWrangler.framework/Versions/A/GPUWrangler 0x198268000 - 0x19826afff libRadiance.dylib (2130.7.3) <74D02264-14F4-3558-BE8E-EA3D89394B68> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x19826b000 - 0x198270fff com.apple.DSExternalDisplay (3.1 - 380) /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay 0x198271000 - 0x198291fff libJPEG.dylib (2130.7.3) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x198292000 - 0x1982c1fff com.apple.ATSUI (1.0 - 1) <0346055A-5ACC-3E05-86F5-2C3D2E75B12E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATSUI.framework/Versions/A/ATSUI 0x1982c2000 - 0x1982c6fff libGIF.dylib (2130.7.3) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x1982c7000 - 0x1982d0fff com.apple.CMCaptureCore (1.0 - 82.6) <4830FC37-AB0B-361A-B192-0DE38613FB9E> /System/Library/PrivateFrameworks/CMCaptureCore.framework/Versions/A/CMCaptureCore 0x1982d1000 - 0x198318fff com.apple.print.framework.PrintCore (16.1 - 531.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x198319000 - 0x1983ccfff com.apple.TextureIO (3.10.9 - 3.10.9) <4B849AA8-4457-3905-B4AD-AA2C70DECD56> /System/Library/PrivateFrameworks/TextureIO.framework/Versions/A/TextureIO 0x1983cd000 - 0x1983d5fff com.apple.InternationalSupport (1.0 - 61.1) /System/Library/PrivateFrameworks/InternationalSupport.framework/Versions/A/InternationalSupport 0x1983d6000 - 0x19844afff com.apple.datadetectorscore (8.0 - 674) /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore 0x19844b000 - 0x1984aafff com.apple.UserActivity (439 - 439) /System/Library/PrivateFrameworks/UserActivity.framework/Versions/A/UserActivity 0x19918d000 - 0x1991c2fff libSessionUtility.dylib (76.69) /System/Library/PrivateFrameworks/AudioSession.framework/libSessionUtility.dylib 0x1991c3000 - 0x1992ebfff com.apple.audio.toolbox.AudioToolbox (1.14 - 1.14) <22835349-6C44-3EA8-AA41-AA43856A11D2> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x1992ec000 - 0x199353fff com.apple.audio.AudioSession (1.0 - 76.69) <5FB74E3B-F200-3FC8-AF91-9438E8C79CB6> /System/Library/PrivateFrameworks/AudioSession.framework/Versions/A/AudioSession 0x199354000 - 0x199366fff libAudioStatistics.dylib (27.64) <156A7CA4-9A1D-3FEE-AAFC-849D330FE9D4> /usr/lib/libAudioStatistics.dylib 0x199367000 - 0x19937afff com.apple.speech.synthesis.framework (9.0.66 - 9.0.66) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x19937b000 - 0x1993e9fff com.apple.ApplicationServices.ATS (377 - 516) <71316EFD-FE97-3EE6-9997-CBC11F453539> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x1993ea000 - 0x199402fff libresolv.9.dylib (68) <287B0B90-55FD-3227-B5FD-256464AA2496> /usr/lib/libresolv.9.dylib 0x19952f000 - 0x19960efff libSMC.dylib (20) /usr/lib/libSMC.dylib 0x19960f000 - 0x19966cfff libcups.2.dylib (494.3) <0B99F7B0-2190-3D6B-BCF1-C67C8BC6128F> /usr/lib/libcups.2.dylib 0x19966d000 - 0x199680fff com.apple.LangAnalysis (1.7.0 - 254) <0DA1AFE0-521E-3CF9-B75C-530303B6AC64> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x199681000 - 0x19968dfff com.apple.NetAuth (6.2 - 6.2) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth 0x19968e000 - 0x199695fff com.apple.ColorSyncLegacy (4.13.0 - 1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy 0x199696000 - 0x1996a1fff com.apple.QD (4.0 - 416) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x1996a2000 - 0x199c92fff com.apple.audio.AudioResourceArbitration (1.0 - 1) <299FA1A8-2287-35D6-BAC7-9DE3C1D74667> /System/Library/PrivateFrameworks/AudioResourceArbitration.framework/Versions/A/AudioResourceArbitration 0x199c93000 - 0x199c9efff com.apple.perfdata (1.0 - 67.40.1) /System/Library/PrivateFrameworks/perfdata.framework/Versions/A/perfdata 0x199c9f000 - 0x199cacfff libperfcheck.dylib (41) <5006BCAD-219C-31BF-B6DC-FE5D93D95D8A> /usr/lib/libperfcheck.dylib 0x199cad000 - 0x199cbdfff com.apple.Kerberos (3.0 - 1) <3E11D5D5-8F87-3FB4-94BB-CA4333C4C248> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x199cbe000 - 0x199d05fff com.apple.GSS (4.0 - 2.0) /System/Library/Frameworks/GSS.framework/Versions/A/GSS 0x199d06000 - 0x199d15fff com.apple.CommonAuth (4.0 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth 0x199ed9000 - 0x199ed9fff liblaunch.dylib (2038.120.1) /usr/lib/system/liblaunch.dylib 0x19c11f000 - 0x19c146fff com.apple.RemoteViewServices (2.0 - 163) /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices 0x19c147000 - 0x19c156fff com.apple.SpeechRecognitionCore (6.1.25 - 6.1.25) /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore 0x19c157000 - 0x19c15efff com.apple.speech.recognition.framework (6.0.3 - 6.0.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x19c38d000 - 0x19c38dfff libsystem_product_info_filter.dylib (8.40.1) <14136F56-3690-3346-90A0-31FC34DF3E1B> /usr/lib/system/libsystem_product_info_filter.dylib 0x19c460000 - 0x19c460fff com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) <372F4BDE-9AA6-3832-A25D-585683D7EFBA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x19c482000 - 0x19c482fff com.apple.CoreServices (1122.44 - 1122.44) <7CA890C2-3B87-3C10-B438-1AEB34A9E1BE> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x19c63f000 - 0x19c63ffff com.apple.Accelerate (1.11 - Accelerate 1.11) <6CA149E0-61A2-3868-9ADF-A4AA815F3D24> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x19f2a9000 - 0x19f2a9fff com.apple.ApplicationServices (48 - 50) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x19f599000 - 0x19f599fff libHeimdalProxy.dylib (79) <7CC40013-93B4-3E9C-A96D-D2ABB02E9D2E> /System/Library/Frameworks/Kerberos.framework/Versions/A/Libraries/libHeimdalProxy.dylib 0x19ffae000 - 0x19ffb4fff com.apple.ASEProcessing (1.26.0 - 1.26.0) <3D723C7F-BCD1-30AA-995E-A8296550F6A9> /System/Library/PrivateFrameworks/ASEProcessing.framework/Versions/A/ASEProcessing 0x1a1474000 - 0x1a1477fff com.apple.IOSurfaceAccelerator (1.0.0 - 1.0.0) <8891C31D-C3A6-30B5-9CE8-DA5421F36718> /System/Library/PrivateFrameworks/IOSurfaceAccelerator.framework/Versions/A/IOSurfaceAccelerator 0x1a8ac1000 - 0x1a8addfff com.apple.private.SystemPolicy (1.0 - 1) /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy 0x1a944e000 - 0x1a9460fff libmis.dylib (274.140.2) <9AB0F36D-3AF3-3802-A2DA-C7C682498655> /usr/lib/libmis.dylib 0x1bce5c000 - 0x1bce62fff com.apple.framework.netrb (1.0 - 1) <91BE035E-EEB9-3574-91EF-9FECB9902F8B> /System/Library/PrivateFrameworks/Netrb.framework/Versions/A/Netrb 0x1c359d000 - 0x1c35b8fff libJapaneseConverter.dylib (90) <8C361A6E-08DA-3ECF-A5AF-55895D122288> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x1cf0d4000 - 0x1cf0dafff libCoreFSCache.dylib (200.11) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib 0x1cf0db000 - 0x1cf0e0fff libCoreVMClient.dylib (200.11) <1A2DD0B4-1C56-3C7B-B5B7-06AF9F73D3D7> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x1cf0e1000 - 0x1cf0f0fff com.apple.opengl (18.5.9 - 18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x1cf0f1000 - 0x1cf0f3fff libCVMSPluginSupport.dylib (18.5.9) <75509F55-33A5-3A15-8A37-6EE18C772015> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib 0x1cf0f4000 - 0x1cf0fcfff libGFXShared.dylib (18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x1cf0fd000 - 0x1cf135fff libGLImage.dylib (18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x1cf136000 - 0x1cf16efff libGLU.dylib (18.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x1cf2dc000 - 0x1cf2e6fff libGL.dylib (18.5.9) <6B5127DA-3097-3979-BF12-0DC83771C8D0> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x1cf477000 - 0x1cf4d6fff com.apple.opencl (4.6 - 4.6) <95665FCE-A143-3B7B-B011-37AC651C03A2> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x1d073b000 - 0x1d073efff com.apple.Hypervisor (1.0 - 1) <22165452-B7BD-38FF-B3B5-2C9C72AFC9DE> /System/Library/Frameworks/Hypervisor.framework/Versions/A/Hypervisor 0x1d147f000 - 0x1d14e7fff com.apple.Virtualization (1.0 - 25.9) <53C76BF1-EFE3-3BE2-BB5C-F5CD3752126C> /System/Library/Frameworks/Virtualization.framework/Versions/A/Virtualization 0x1d185a000 - 0x1d1861fff com.apple.framework.vmnet (1.0 - 1) /System/Library/Frameworks/vmnet.framework/Versions/A/vmnet External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=652.4M resident=0K(0%) swapped_out_or_unallocated=652.4M(100%) Writable regions: Total=304.8M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=304.8M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 1 Dispatch continuations 64.0M 1 Kernel Alloc Once 32K 1 MALLOC 62.1M 19 MALLOC guard page 96K 5 MALLOC_MEDIUM (reserved) 120.0M 1 reserved VM address space (unallocated) STACK GUARD 56.2M 11 Stack 13.3M 11 VM_ALLOCATE 1.7G 24 __AUTH 515K 112 __AUTH_CONST 7706K 244 __DATA 4871K 235 __DATA_CONST 8977K 242 __DATA_DIRTY 562K 89 __FONT_DATA 4K 1 __LINKEDIT 490.4M 4 __OBJC_CONST 1038K 92 __OBJC_RO 75.1M 1 __OBJC_RW 2576K 1 __TEXT 162.0M 256 __UNICODE 588K 1 shared memory 32K 2 =========== ======= ======= TOTAL 2.7G 1354 TOTAL, minus reserved VM space 2.6G 1354 ```
Code-Hex commented 2 years ago

Guest disk information

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            952M     0  952M   0% /dev
tmpfs           197M  740K  197M   1% /run
/dev/vda         11G  3.0G  8.1G  27% /
tmpfs           985M     0  985M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           985M     0  985M   0% /sys/fs/cgroup
/dev/loop1       58M   58M     0 100% /snap/core20/1171
/dev/loop3       49M   49M     0 100% /snap/core18/2127
/dev/loop0       49M   49M     0 100% /snap/core18/2252
/dev/loop2       58M   58M     0 100% /snap/core20/1274
/dev/loop5       61M   61M     0 100% /snap/lxd/21544
/dev/loop4       38M   38M     0 100% /snap/snapd/14296
/dev/loop6       29M   29M     0 100% /snap/snapd/13643
/dev/loop7       61M   61M     0 100% /snap/lxd/21843
tmpfs           197M     0  197M   0% /run/user/0
Code-Hex commented 2 years ago

current my opinion https://github.com/Code-Hex/vz/pull/12#issuecomment-992072181

I think this is caused by the thread between libdispatch (which is handled by Objective-C) and Go, or a problem on the VM side.

cfergeau commented 2 years ago

Would be worth building/running with go build -race ... to see if the go runtime has anything to report. With go routines and macOS dispatch queues involved, it's going to be more or less required to protect these from concurrent access:

socket.go:var connectionHandlers = map[string]func(conn *VirtioSocketConnection, err error){}
socket.go:var shouldAcceptNewConnectionHandlers = map[unsafe.Pointer]func(conn *VirtioSocketConnection) bool{}

Had done something like this in an experimental branch which is now obsolete :) https://github.com/cfergeau/vz/commit/1aa2c8c36f59d1bc9125e30c0f972991977cd59e

aoxn commented 2 years ago

I am also not able to close the VirtioSocketConnection, close return nil, but io.Copy does not return.

func NewProxyVSOCK(p *Publish, vso *vz.VirtioSocketDevice, port uint32) func(conn net.Conn) {
    return func(conn net.Conn) {
        klog.Infof("[MAC_OS]prepare to connect to vm port: %d", port)
        onConnect := func(vzconn *vz.VirtioSocketConnection, err error) {
            defer Close(conn, "MAC_OS: unix  --> vsock")
            klog.Infof("[MAC_OS][%s]remote connection to vm established: %s",p,vzconn)
            //defer Close(vzconn, "MAC_OS: vsock --> unix")

            //stop := make(chan struct{}, 1)
            grp := &sync.WaitGroup{}
            grp.Add(2)
            //go copyStream(grp,vzconn, conn, "MAC_OS: unix  --> vsock",false)

            go func() {
                msg := "MAC_OS: unix  --> vsock"
                defer Close(conn, msg)
                n, err := io.Copy(vzconn, conn)
                if err != nil {
                    klog.Errorf("[%s]copy to vm: %d bytes copied, %s",msg, n, err.Error())
                }
                klog.Infof("local conn done")
                grp.Done()
                Close(vzconn,"")
            }()
            //go copyStream(nil,conn, vzconn, "MAC_OS: vsock  --> unix",false)
            go func() {
                msg := "MAC_OS: vsock  --> unix"
                n, err := io.Copy(conn, vzconn)
                if err != nil {
                    klog.Errorf("[%s]copy to vm: %d bytes copied, %s",msg, n, err.Error())
                }
                klog.Infof("vzconn: done")
                grp.Done()
            }()
            klog.Infof("[MAC_OS][%s]unix --> vsock started, wait done: ", p)
            grp.Wait()
            klog.Infof("[MAC_OS][%s]receive goroutine sig 1",p)
            //<-closer
        }
        if vso == nil {
            klog.Errorf("[MAC_OS]Attention, nil vso:  [%v]", vso)
        }
        klog.Infof("[MAC_OS] do connect to port")
        vso.ConnectToPort(port, onConnect)

        klog.Infof("[MAC_OS][%s]connection complete: %s",p, conn.RemoteAddr())
    }
}

here is the output


podman login: I0113 21:34:45.277146   25120 publish.go:112] new connection:
I0113 21:34:45.277207   25120 proxy_darwin.go:16] [MAC_OS]prepare to connect to vm port: 2375
I0113 21:34:45.277216   25120 proxy_darwin.go:56] [MAC_OS] do connect to port
I0113 21:34:45.278198   25120 proxy_darwin.go:59] [MAC_OS][unix@/tmp/aoxn.sock:vsock@2375]connection complete:
I0113 21:34:45.279323   25120 proxy_darwin.go:19] [MAC_OS][unix@/tmp/aoxn.sock:vsock@2375]remote connection to vm established: &{c7g2ktdmk1u64864pt80 %!s(uint32=3283772544) %!s(uint32=2375) %!s(uintptr=10) %!s(*os.File=&{0xc0004ce120}) %!s(*vz.Addr=&{2 2375}) %!s(*vz.Addr=&{0 3283772544})}
I0113 21:34:45.279654   25120 proxy_darwin.go:48] [MAC_OS][unix@/tmp/aoxn.sock:vsock@2375]unix --> vsock started, wait done:
I0113 21:34:49.783454   25120 proxy_darwin.go:34] local conn done
I0113 21:34:49.783544   25120 publish.go:185] []close connection
I0113 21:34:49.783559   25120 publish.go:185] [MAC_OS: unix  --> vsock]close connection
aoxn commented 2 years ago

vzconn.Read() does not return after vzconn.Close().

the sequence to reproduce.

       vzconn := Connect2Port()
        grp := sync.WaitGroup{}
    grp.Add(1)
    go func() {
        bb := make([]byte,1024)
        n, err := vzconn.Read(bb)
        if err != nil {
            t.Logf("read error: %s", err.Error())
        }
        t.Logf("read %d byte: xxx", n)
        grp.Done()
    }()
    t.Logf("sleep 5s")
    time.Sleep(5*time.Second)

    vzconn.Close()

    t.Logf("sleep 3")
    time.Sleep(3*time.Second)
    t.Logf("wait")
    grp.Wait()
    t.Logf("finishe")
aoxn commented 2 years ago

need to setNoneBlock mode for the descriptor.

func newVirtioSocketConnection(ptr unsafe.Pointer) *VirtioSocketConnection {
    id := xid.New().String()
    vzVirtioSocketConnection := C.convertVZVirtioSocketConnection2Flat(ptr)
    err := unix.SetNonblock(int(vzVirtioSocketConnection.fileDescriptor), true)
    if err != nil {
        panic(fmt.Sprintf("set nonblock: %s", err.Error()))
    }
    conn := &VirtioSocketConnection{
        id:              id,
        sourcePort:      (uint32)(vzVirtioSocketConnection.sourcePort),
        destinationPort: (uint32)(vzVirtioSocketConnection.destinationPort),
        fileDescriptor:  (uintptr)(vzVirtioSocketConnection.fileDescriptor),
        file:            os.NewFile((uintptr)(vzVirtioSocketConnection.fileDescriptor), id),
        laddr: &Addr{
            CID:  unix.VMADDR_CID_HOST,
            Port: (uint32)(vzVirtioSocketConnection.destinationPort),
        },
        raddr: &Addr{
            CID:  unix.VMADDR_CID_HYPERVISOR,
            Port: (uint32)(vzVirtioSocketConnection.sourcePort),
        },
    }
    return conn
}
aoxn commented 2 years ago

fixed.

Code-Hex commented 2 years ago

I don't know why need to setNoneBlock mode for the descriptor? could you tell me if possible. thanks relates: https://github.com/Code-Hex/vz/pull/23

aoxn commented 2 years ago

golang lib use epoll to implement synchronized Read and Write. This requires a non-block socket. see golang implementation for more details, https://github.com/golang/go/blob/4f04e1d99fac7abf067b6bd3a299f1fbc9a59414/src/net/sock_cloexec.go#L45

Code-Hex commented 2 years ago

23 does not seem to be fixed https://github.com/Code-Hex/vz/issues/13#issue-1078031796.

I don't think non blocking is related

aoxn commented 2 years ago

@Code-Hex Sorry for the miss-leading, #23 does not intended to solve #13, it fix the problem of copyStream blocks on reading forever.

aoxn commented 2 years ago

issue #24 might related with the crash scenario. remove code runtime.SetFinalizer(socketDevice, func(self *VirtioSocketDevice) { self.Release() }) seems fixed.