Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Apple Silicon (2nd try) #4110

Closed

Conversation

mpilman
Copy link
Contributor

@mpilman mpilman commented Nov 26, 2020

This PR is resolves #4111

Changes in this PR:

  • Make CMake ARM aware
  • Port FlowCoro to boost coroutine2
  • Use ucontext for coroutines on Apple Silicon (as fcontext is not supported yet)

General guideline:

  • If this PR is ready to be merged (and all checkboxes below are either ticked or not applicable), make this a regular PR
  • If this PR still needs work, please make this a draft PR
    • If you wish to get feedback/code-review, please add the label RFC to this PR

Please verify that all things listed below were considered and check them. If an item doesn't apply to this type of PR (for example a documentation change doesn't need to be performance tested), you should make a strikethrough (markdown syntax: ~~strikethrough~~). More infos on the guidlines can be found here.

Style

  • All variable and function names make sense.
  • The code is properly formatted (consider running git clang-format).

Performance

  • All CPU-hot paths are well optimized.
  • The proper containers are used (for example std::vector vs VectorRef).
  • There are no new known SlowTask traces.

Testing

  • The code was sufficiently tested in simulation.
  • If there are new parameters or knobs, different values are tested in simulation.
  • ASSERT, ASSERT_WE_THINK, and TEST macros are added in appropriate places.
  • Unit tests were added for new algorithms and data structure that make sense to unit-test
  • If this is a bugfix: there is a test that can easily reproduce the bug.

@mpilman mpilman changed the title Use boost coroutine2 and add ARM support for osx Support for Apple Silicon (2nd try) Nov 26, 2020
@mpilman mpilman marked this pull request as draft November 26, 2020 06:36
@@ -0,0 +1,16 @@
set(SRCS pthread/thread.cpp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should pthread/thread.cpp be included for WIN32?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not... Though I copied this code from the boost-cmake repository. I think a cleaner way of doing this is to change the cmake code to compile thread and context in ExternalProject_add (copying the files into the repository seems dangerous and painful)

@sfc-gh-abeamon
Copy link
Collaborator

One thing to be careful about here is that the run loop profiler had a bad interaction with our existing coroutine implementation that had to be resolved by temporarily disabling the profiler when context switching:

setProfilingEnabled(0);

It seems possible that you could have a similar problem with a new library.

@sfc-gh-anoyes
Copy link
Collaborator

One thing to be careful about here is that the run loop profiler had a bad interaction with our existing coroutine implementation that had to be resolved by temporarily disabling the profiler when context switching:

setProfilingEnabled(0);

It seems possible that you could have a similar problem with a new library.

@sfc-gh-ajbeamon do you know why it's only disabling profiling for the ucontext implementation? I would imagine that other implementations would have this problem. It makes sense that trying to capture a backtrace in the middle of changing stacks wouldn't work

@sfc-gh-abeamon
Copy link
Collaborator

do you know why it's only disabling profiling for the ucontext implementation?

I don't remember off the top of my head, possibly checking old commit logs might have something. It could also just be that the ucontext implementation was the relevant one to our usage.

@sfc-gh-mpilman
Copy link
Collaborator

@fdb-build run ctest please

if(APPLE)
# Boost coroutine currently doesn't support Apple Silicon, so we have to fall
# back to the slower ucontext implementation
add_compile_definitions(BOOST_USE_UCONTEXT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I am not quite clear is that, previously we just use this code to download and deploy a local boost library:

find_package(Boost 1.72)

if(Boost_FOUND)
  add_library(boost_target INTERFACE)
  target_link_libraries(boost_target INTERFACE Boost::boost)
else()
  include(ExternalProject)
  ExternalProject_add(boostProject
    URL "https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2"
    URL_HASH SHA256=59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    BUILD_IN_SOURCE ON
    INSTALL_COMMAND ""
    UPDATE_COMMAND ""
    BUILD_BYPRODUCTS <SOURCE_DIR>/boost/config.hpp)

  ExternalProject_Get_property(boostProject SOURCE_DIR)

  set(BOOST_INCLUDE_DIR ${SOURCE_DIR})
  message(STATUS "Boost include dir ${BOOST_INCLUDE_DIR}")

  add_library(boost_target INTERFACE)
  add_dependencies(boost_target boostProject)
  target_include_directories(boost_target SYSTEM INTERFACE ${BOOST_INCLUDE_DIR})
endif()

Can we switch to this strategy rather than just injecting boost code into our code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that boost coroutine2 depends on boost context - which is a library that needs to be compiled (so far we have only used header-only libraries). I agree that building this through ExternalProject_Add is preferable, but this will need some more effort (I might still do this - but I am working on this in my free time so this is more a "I'll do it when I feel like it" kind of situation ;) )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make this even worse, it doesn't seem that boost compiles on my machine if I use the boost build system... Overall it might be easier to just wait for other stuff to support Apple Silicon (before I continue down the path of patching all of our dependencies...)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gotcha... I agree BJam is indeed hard to use -- I always use Debian prebuilt binaries.

@sfc-gh-almiller
Copy link
Collaborator

The boost.coroutine thing might also unblock the #2235 musl work.

@sfc-gh-mpilman
Copy link
Collaborator

Yes, I think we should merge this - even if it doesn't run on M1 macs. It seems that the only things missing are:

  • Fix Windows build
  • Build boost.coroutine2 dependencies through ExternalProject_Add (I have something that should work but is not compiling on macOS ARM)

@zackangelo
Copy link

Tried using the C bindings from Rust produced by this branch and I'm getting a SIGBUS crash. I'm curious if anyone else was able to use them.

Here's the dump:

Process:               fdbtest [89301]
Path:                  /Users/USER/*/fdbtest
Identifier:            fdbtest
Version:               0
Code Type:             ARM-64 (Native)
Parent Process:        zsh [7517]
Responsible:           iTerm2 [7089]
User ID:               501

Date/Time:             2021-04-04 11:24:25.392 -0500
OS Version:            macOS 11.2.3 (20D91)
Report Version:        12
Anonymous UUID:        5F353D64-01A0-1A4F-2891-9436E1604D4C

Sleep/Wake UUID:       F04A7C5D-198F-41D1-AD6C-BD33863A03E8

Time Awake Since Boot: 100000 seconds
Time Since Wake:       2300 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x0000000101360a88
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Bus error: 10
Termination Reason:    Namespace SIGNAL, Code 0xa
Terminating Process:   exc handler [89301]

VM Regions Near 0x101360a88:
    __DATA_CONST                101314000-101360000    [  304K] r--/rwx SM=COW  /Users/*/*.dylib
--> __DATA                      101360000-101364000    [   16K] rw-/rwx SM=COW  /Users/*/*.dylib
    __DATA                      101364000-101368000    [   16K] rw-/rwx SM=PRV  /Users/*/*.dylib

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                           	0x0000000101360a88 fdb_setup_network + 0

Thread 1:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f486c54 kevent + 8
1   fdbtest                       	0x000000010078874c mio::sys::unix::selector::kqueue::Selector::select::hf8d122ad46fc37eb + 276 (kqueue.rs:115)
2   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 2:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f484488 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000019f4ba568 _pthread_cond_wait + 1192
2   fdbtest                       	0x0000000100796b10 _$LT$parking_lot_core..thread_parker..imp..ThreadParker$u20$as$u20$parking_lot_core..thread_parker..ThreadParkerT$GT$::park::h8b6f10c6d5d0d0f6 + 248 (unix.rs:77)
3   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 3:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f484488 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000019f4ba568 _pthread_cond_wait + 1192
2   fdbtest                       	0x0000000100796b10 _$LT$parking_lot_core..thread_parker..imp..ThreadParker$u20$as$u20$parking_lot_core..thread_parker..ThreadParkerT$GT$::park::h8b6f10c6d5d0d0f6 + 248 (unix.rs:77)
3   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 4:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f484488 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000019f4ba568 _pthread_cond_wait + 1192
2   fdbtest                       	0x0000000100796b10 _$LT$parking_lot_core..thread_parker..imp..ThreadParker$u20$as$u20$parking_lot_core..thread_parker..ThreadParkerT$GT$::park::h8b6f10c6d5d0d0f6 + 248 (unix.rs:77)
3   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 5:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f484488 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000019f4ba568 _pthread_cond_wait + 1192
2   fdbtest                       	0x0000000100796b10 _$LT$parking_lot_core..thread_parker..imp..ThreadParker$u20$as$u20$parking_lot_core..thread_parker..ThreadParkerT$GT$::park::h8b6f10c6d5d0d0f6 + 248 (unix.rs:77)
3   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 6:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f484488 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000019f4ba568 _pthread_cond_wait + 1192
2   fdbtest                       	0x0000000100796b10 _$LT$parking_lot_core..thread_parker..imp..ThreadParker$u20$as$u20$parking_lot_core..thread_parker..ThreadParkerT$GT$::park::h8b6f10c6d5d0d0f6 + 248 (unix.rs:77)
3   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 7:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f484488 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000019f4ba568 _pthread_cond_wait + 1192
2   fdbtest                       	0x0000000100796b10 _$LT$parking_lot_core..thread_parker..imp..ThreadParker$u20$as$u20$parking_lot_core..thread_parker..ThreadParkerT$GT$::park::h8b6f10c6d5d0d0f6 + 248 (unix.rs:77)
3   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 8:: tokio-runtime-worker
0   libsystem_kernel.dylib        	0x000000019f484488 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	0x000000019f4ba568 _pthread_cond_wait + 1192
2   fdbtest                       	0x0000000100796b10 _$LT$parking_lot_core..thread_parker..imp..ThreadParker$u20$as$u20$parking_lot_core..thread_parker..ThreadParkerT$GT$::park::h8b6f10c6d5d0d0f6 + 248 (unix.rs:77)
3   libsystem_pthread.dylib       	0x000000019f4b4da0 thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000001   x2: 0x00000001007db35a   x3: 0x0000000000000022
    x4: 0x0000000100824460   x5: 0x0000000000000020   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x000000016f7067d8   x9: 0x0000000100c79b00  x10: 0x0000000000000008  x11: 0x0000000101370b70
   x12: 0x0000000101370b70  x13: 0x0000000000000003  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0x0000000101360a88  x17: 0x0000000100b90f74  x18: 0x0000000000000000  x19: 0x000000016f707700
   x20: 0x0000000100824180  x21: 0x0000000000000001  x22: 0x000000016ef0c000  x23: 0x000000016ef10000
   x24: 0x0000000000004000  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x0000000000000000
   x28: 0x000000016f707768   fp: 0x000000016f707750   lr: 0x00000001007003a0
    sp: 0x000000016f706690   pc: 0x0000000101360a88 cpsr: 0x80000000
   far: 0x0000000101360a88  esr: 0x8200000f


Binary Images:
       0x1006f8000 -        0x100823fff +fdbtest (0) <A71F25F2-FCBC-336E-AF02-BA3A4781A21D> /Users/USER/*/fdbtest
       0x100b70000 -        0x100bebfff  dyld (832.7.3) <4AB185B3-DC20-3C03-A193-67C0E6C589D7> /usr/lib/dyld
       0x100c74000 -        0x101313fff +libfdb_c.dylib (0) <6DA807B9-DE7E-3470-9209-3AE7F7A738C4> /Users/USER/*/libfdb_c.dylib
       0x19f216000 -        0x19f217fff  libsystem_blocks.dylib (78) <9B6D4883-03E9-3785-851E-EA79FA64ADC1> /usr/lib/system/libsystem_blocks.dylib
       0x19f218000 -        0x19f24ffff  libxpc.dylib (2038.80.3) <BD0DFD42-0DC3-3F3D-9C04-5A2B3D93794D> /usr/lib/system/libxpc.dylib
       0x19f250000 -        0x19f267fff  libsystem_trace.dylib (1277.80.2) <4A466196-D2DD-367B-80AB-988F281EC3B8> /usr/lib/system/libsystem_trace.dylib
       0x19f268000 -        0x19f2dcfff  libcorecrypto.dylib (1000.80.5) <9BD8FED7-2A36-3602-A5A7-0CA87C03FB84> /usr/lib/system/libcorecrypto.dylib
       0x19f2dd000 -        0x19f308fff  libsystem_malloc.dylib (317.40.8) <21120432-52C1-34E4-BF01-623722FA3A41> /usr/lib/system/libsystem_malloc.dylib
       0x19f309000 -        0x19f34cfff  libdispatch.dylib (1271.40.12) <F5BFBD55-EF70-3659-854D-9061325EB26D> /usr/lib/system/libdispatch.dylib
       0x19f34d000 -        0x19f385fff  libobjc.A.dylib (818.2) <B03625B0-501E-3AC1-8E16-08B621120EAD> /usr/lib/libobjc.A.dylib
       0x19f386000 -        0x19f388fff  libsystem_featureflags.dylib (28.60.1) <297CC4DD-AFA4-3BA3-B4E1-0DF47E49C21E> /usr/lib/system/libsystem_featureflags.dylib
       0x19f389000 -        0x19f409fff  libsystem_c.dylib (1439.40.11) <A7147E08-E7C0-3842-916E-F2270A689F47> /usr/lib/system/libsystem_c.dylib
       0x19f40a000 -        0x19f465fff  libc++.1.dylib (904.4) <B139607F-1E80-3A8E-870D-0AC022069EA1> /usr/lib/libc++.1.dylib
       0x19f466000 -        0x19f47ffff  libc++abi.dylib (904.4) <1DD3A1C9-D765-34FB-B8C1-87BF52CE49C0> /usr/lib/libc++abi.dylib
       0x19f480000 -        0x19f4b2fff  libsystem_kernel.dylib (7195.81.3) <55FCA547-4877-3075-8A08-FE1620BFC682> /usr/lib/system/libsystem_kernel.dylib
       0x19f4b3000 -        0x19f4befff  libsystem_pthread.dylib (454.80.2) <8E907E6C-C227-312E-944C-767093692AFF> /usr/lib/system/libsystem_pthread.dylib
       0x19f4bf000 -        0x19f4fdfff  libdyld.dylib (832.7.3) <EF759BF3-97FA-30EA-A1CA-EDECFEA726FE> /usr/lib/system/libdyld.dylib
       0x19f4fe000 -        0x19f504fff  libsystem_platform.dylib (254.80.2) <8633A39C-10A2-3B44-93F7-617AB09FF640> /usr/lib/system/libsystem_platform.dylib
       0x19f505000 -        0x19f530fff  libsystem_info.dylib (542.40.3) <4CC96CFC-7198-3F26-8C8C-20FB010CDF98> /usr/lib/system/libsystem_info.dylib
       0x19f531000 -        0x19f9dafff  com.apple.CoreFoundation (6.9 - 1774.101) <EA76C90A-23ED-3791-8FBC-8292916F0B16> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x1a1643000 -        0x1a18b4fff  libicucore.A.dylib (66109) <3CE58F97-7FC3-37D8-BB99-D6BECFC86DD2> /usr/lib/libicucore.A.dylib
       0x1a18b5000 -        0x1a18bffff  libsystem_darwin.dylib (1439.40.11) <B790A863-2D74-300E-9698-A25B5602B32F> /usr/lib/system/libsystem_darwin.dylib
       0x1a1c27000 -        0x1a1cf1fff  com.apple.framework.IOKit (2.0.2 - 1845.81.1) <516911DA-18D7-3D17-8646-BBF7C75CD070> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
       0x1a1cf2000 -        0x1a1cfdfff  libsystem_notify.dylib (279.40.4) <A7B6BDA8-5371-352E-8A36-95D46C4B07F1> /usr/lib/system/libsystem_notify.dylib
       0x1a3cad000 -        0x1a3cbcfff  libsystem_networkextension.dylib (1295.80.3) <B6BD1267-BE59-3E42-B2B5-2BF13F17D02D> /usr/lib/system/libsystem_networkextension.dylib
       0x1a3cbd000 -        0x1a3cbefff  libenergytrace.dylib (22) <C5CFEF87-BB69-3351-A0C8-9B601383A45C> /usr/lib/libenergytrace.dylib
       0x1a3d14000 -        0x1a3d2bfff  libsystem_asl.dylib (385) <31E28E59-1CDD-3B83-8BF0-56C675227FA2> /usr/lib/system/libsystem_asl.dylib
       0x1a529c000 -        0x1a52a3fff  libsystem_symptoms.dylib (1431.40.36) <0657E539-C0CE-30F8-B630-FBAE36109542> /usr/lib/system/libsystem_symptoms.dylib
       0x1a5427000 -        0x1a5429fff  libDiagnosticMessagesClient.dylib (112) <20AD555E-DF00-3C91-A95B-AB2AD23780AA> /usr/lib/libDiagnosticMessagesClient.dylib
       0x1a6d11000 -        0x1a6d22fff  libsystem_containermanager.dylib (318.80.2) <0B742EA4-AFA2-36B6-AB4B-2F8ACA7211AA> /usr/lib/system/libsystem_containermanager.dylib
       0x1a7994000 -        0x1a7998fff  libsystem_configuration.dylib (1109.60.2) <AEC5E654-A5B8-343E-80B7-27D5D0D856D9> /usr/lib/system/libsystem_configuration.dylib
       0x1a7999000 -        0x1a799dfff  libsystem_sandbox.dylib (1441.60.4) <D7CDDE27-978E-3511-AE6F-296D901290B2> /usr/lib/system/libsystem_sandbox.dylib
       0x1a8359000 -        0x1a835bfff  libquarantine.dylib (119.40.2) <66942A5C-57B3-3524-BA49-0F2DA4A584D1> /usr/lib/system/libquarantine.dylib
       0x1a8383000 -        0x1a8393fff  libbsm.0.dylib (68.40.1) <CE32C4E7-4F74-3ACC-99B8-16AFE4A23E03> /usr/lib/libbsm.0.dylib
       0x1a8891000 -        0x1a8895fff  libsystem_coreservices.dylib (127) <A9BDB37A-3E00-3FD0-AE92-7ED6FB63DD3B> /usr/lib/system/libsystem_coreservices.dylib
       0x1a8a84000 -        0x1a8a95fff  libz.1.dylib (76) <9005FC69-0FEF-375F-AB09-DF5CEBAD5D14> /usr/lib/libz.1.dylib
       0x1a8a96000 -        0x1a8ac3fff  libsystem_m.dylib (3186.40.2) <8FADC1D2-0B61-34C7-9F1C-19D85CB07E16> /usr/lib/system/libsystem_m.dylib
       0x1a8ac4000 -        0x1a8ac4fff  libcharset.1.dylib (59) <F0B25393-7B06-3499-A62E-51398A22E835> /usr/lib/libcharset.1.dylib
       0x1a8ac5000 -        0x1a8acafff  libmacho.dylib (973.4) <8146EF75-0B83-3A8D-A1DA-1D49AD62DE88> /usr/lib/system/libmacho.dylib
       0x1a8acb000 -        0x1a8ae6fff  libkxld.dylib (7195.81.3) <A984A8FB-D44F-31B3-863E-A4947B3E20AE> /usr/lib/system/libkxld.dylib
       0x1a8ae7000 -        0x1a8af4fff  libcommonCrypto.dylib (60178.40.2) <49528AE3-1376-376C-BE61-31393A50850D> /usr/lib/system/libcommonCrypto.dylib
       0x1a8af5000 -        0x1a8afffff  libunwind.dylib (200.10) <017E8A02-B5EA-36DB-BB73-9EDD72F1229A> /usr/lib/system/libunwind.dylib
       0x1a8b00000 -        0x1a8b07fff  liboah.dylib (203.30) <46D9195A-40F2-3CD5-AE73-2F6EF52ECCEC> /usr/lib/liboah.dylib
       0x1a8b08000 -        0x1a8b10fff  libcopyfile.dylib (173.40.2) <B123D3D2-7B17-3A85-AFC6-37D7AD1C5E78> /usr/lib/system/libcopyfile.dylib
       0x1a8b11000 -        0x1a8b14fff  libcompiler_rt.dylib (102.2) <EDB437BA-9775-3761-A646-58086BD12C4D> /usr/lib/system/libcompiler_rt.dylib
       0x1a8b15000 -        0x1a8b17fff  libsystem_collections.dylib (1439.40.11) <B252D66F-979E-3ABA-83AC-0BDED154A9A7> /usr/lib/system/libsystem_collections.dylib
       0x1a8b18000 -        0x1a8b1afff  libsystem_secinit.dylib (87.60.1) <F250D007-BE32-3C94-86DD-33598CF6D3E3> /usr/lib/system/libsystem_secinit.dylib
       0x1a8b1b000 -        0x1a8b1dfff  libremovefile.dylib (49.40.3) <FE46F050-5062-3117-88B2-E727C8AFABA6> /usr/lib/system/libremovefile.dylib
       0x1a8b1e000 -        0x1a8b1efff  libkeymgr.dylib (31) <1EE40BB9-C661-3FB2-8409-44E93D2820DA> /usr/lib/system/libkeymgr.dylib
       0x1a8b1f000 -        0x1a8b27fff  libsystem_dnssd.dylib (1310.80.1) <7F309D4C-1FE5-3C27-8403-9F305D7D8725> /usr/lib/system/libsystem_dnssd.dylib
       0x1a8b28000 -        0x1a8b2dfff  libcache.dylib (83) <C8504CA2-F42B-312F-B79D-2B1C7E64FA4D> /usr/lib/system/libcache.dylib
       0x1a8b2e000 -        0x1a8b2ffff  libSystem.B.dylib (1292.60.1) <CF348B98-3432-3B5A-920B-2C7AFE89000D> /usr/lib/libSystem.B.dylib
       0x1a8b30000 -        0x1a8b33fff  libfakelink.dylib (3) <398932A6-EE2F-3C11-8255-AEB91EF9069D> /usr/lib/libfakelink.dylib
       0x1a8b34000 -        0x1a8b34fff  com.apple.SoftLinking (1.0 - 1) <B609E3D2-B652-38E2-A5E0-4985185E9F69> /System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking
       0x1a8b70000 -        0x1a8c62fff  libiconv.2.dylib (59) <36178571-5C2D-3429-9D94-B0E956AE4B2C> /usr/lib/libiconv.2.dylib
       0x1ab438000 -        0x1ab450fff  libresolv.9.dylib (68) <CE79097D-0B90-3F04-9D5E-6325C235AB8D> /usr/lib/libresolv.9.dylib
       0x1abf42000 -        0x1abf42fff  liblaunch.dylib (2038.80.3) <327A64BF-8C2C-303D-91E4-70A168C5D87F> /usr/lib/system/liblaunch.dylib
       0x1ae40c000 -        0x1ae40cfff  libsystem_product_info_filter.dylib (8.40.1) <616C96CE-226D-3719-B37F-A3FCAA32591A> /usr/lib/system/libsystem_product_info_filter.dylib

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: 10465866
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=503.6M resident=0K(0%) swapped_out_or_unallocated=503.6M(100%)
Writable regions: Total=54.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=54.5M(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
Kernel Alloc Once                   32K        1 
MALLOC                            28.1M       13 
MALLOC guard page                   96K        5 
STACK GUARD                        128K        8 
Stack                             24.2M        9 
Stack Guard                       56.0M        1 
VM_ALLOCATE                        800K       15 
VM_ALLOCATE (reserved)            1024K        8         reserved VM address space (unallocated)
__AUTH                              53K       13 
__AUTH_CONST                      1087K       51 
__DATA                             417K       50 
__DATA_CONST                      2642K       51 
__DATA_DIRTY                        95K       25 
__LINKEDIT                       482.1M        5 
__OBJC_CONST                        38K        7 
__OBJC_RO                         64.5M        1 
__OBJC_RW                         2544K        1 
__TEXT                            21.5M       58 
__UNICODE                          588K        1 
shared memory                       32K        2 
===========                     =======  ======= 
TOTAL                            686.1M      326 
TOTAL, minus reserved VM space   685.1M      326 

@xozzslip
Copy link

xozzslip commented Mar 6, 2022

Tried using the C bindings from Rust produced by this branch and I'm getting a SIGBUS crash. I'm curious if anyone else was able to use them.

I have the same SIGBUS crash when trying to run my golang application with go bindings

@jzhou77 jzhou77 closed this Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Apple Silicon
9 participants