unblob
unblob copied to clipboard
Installation issues on MacOS/ARM64
Thanks for the intriguing project, as someone who's always looking for reverse-engineering tools.
For what it's worth, it's probably a good idea to update the https://unblob.org/installation/#from-source section, to mention that it's necessary to install "git-lfs" (using "brew", or some other method), when trying to check out the repository, to build this, on MacOS 12.x, since it's not included by-default.
For some reason, installation, using Poetry (I haven't used this tool, before, so I'm unfamiliar with debugging issues involving it) fails, since it somehow believes it's being ran under Windows:
tyson@Tysons-MacBook-Air unblob % $HOME/.poetry/bin/poetry install --no-dev
Creating virtualenv unblob-1VQAUw7M-py3.9 in /Users/tyson/Library/Caches/pypoetry/virtualenvs
Installing dependencies from lock file
EnvCommandError
Command ['/Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-1VQAUw7M-py3.9/bin/python', '-'] errored with the following return code 1, and output:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 73, in <module>
import msvcrt
ModuleNotFoundError: No module named 'msvcrt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tyson/u/unblob/unblob/math.py", line 2, in <module>
from ._rust import shannon_entropy
ImportError: attempted relative import with no known parent package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/platform.py", line 119, in <module>
import subprocess
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 80, in <module>
import selectors
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/selectors.py", line 11, in <module>
import math
File "/Users/tyson/u/unblob/unblob/math.py", line 4, in <module>
from ._py.math import shannon_entropy # noqa: F401
ImportError: attempted relative import with no known parent package
input was : import json
import os
import platform
import sys
import sysconfig
INTERPRETER_SHORT_NAMES = {
"python": "py",
"cpython": "cp",
"pypy": "pp",
"ironpython": "ip",
"jython": "jy",
}
def interpreter_version():
version = sysconfig.get_config_var("interpreter_version")
if version:
version = str(version)
else:
version = _version_nodot(sys.version_info[:2])
return version
def _version_nodot(version):
# type: (PythonVersion) -> str
if any(v >= 10 for v in version):
sep = "_"
else:
sep = ""
return sep.join(map(str, version))
if hasattr(sys, "implementation"):
info = sys.implementation.version
iver = "{0.major}.{0.minor}.{0.micro}".format(info)
kind = info.releaselevel
if kind != "final":
iver += kind[0] + str(info.serial)
implementation_name = sys.implementation.name
else:
iver = "0"
implementation_name = platform.python_implementation().lower()
env = {
"implementation_name": implementation_name,
"implementation_version": iver,
"os_name": os.name,
"platform_machine": platform.machine(),
"platform_release": platform.release(),
"platform_system": platform.system(),
"platform_version": platform.version(),
"python_full_version": platform.python_version(),
"platform_python_implementation": platform.python_implementation(),
"python_version": ".".join(platform.python_version_tuple()[:2]),
"sys_platform": sys.platform,
"version_info": tuple(sys.version_info),
# Extra information
"interpreter_name": INTERPRETER_SHORT_NAMES.get(implementation_name, implementation_name),
"interpreter_version": interpreter_version(),
}
print(json.dumps(env))
at ~/.poetry/lib/poetry/utils/env.py:1195 in _run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input_)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs):
Apologies if this issue has already been reported, or if there's no plans, to officially support MacOS, otherwise.
Using the latest checkout of the repository, on MacOS 12.5 (21G72), on an ARM64 system.
That msvcrt issue is a red herring, the subprocess module actually tries to import it and falls back to the posix implementation:
try:
import msvcrt
import _winapi
_mswindows = True
except ModuleNotFoundError:
_mswindows = False
import _posixsubprocess
import select
import selectors
Then it will goes into the selectors module, which will import math. Somehow that math will collide with our own module from inside the unblob package. I am a bit baffled how it could have happened. Do you have PYTHONPATH set to the source directory? You shouldn't need that.
Looks like PYTHONPATH doesn't get set, at all (by design?):
tyson@Tysons-MacBook-Air unblob % ~/.poetry/bin/poetry run echo $PYTHONPATH
tyson@Tysons-MacBook-Air unblob % echo $PYTHONPATH
Doing a poetry update gives me the same result, too:
tyson@Tysons-MacBook-Air unblob % ~/.poetry/bin/poetry update
Updating dependencies
Resolving dependencies... (5.0s)
Writing lock file
EnvCommandError
Command ['/Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-_UiaRMFf-py3.9/bin/python', '-'] errored with the following return code 1, and output:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 73, in <module>
import msvcrt
ModuleNotFoundError: No module named 'msvcrt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tyson/u2/unblob/unblob/math.py", line 2, in <module>
from ._rust import shannon_entropy
ImportError: attempted relative import with no known parent package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/platform.py", line 119, in <module>
import subprocess
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 80, in <module>
import selectors
File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/selectors.py", line 11, in <module>
import math
File "/Users/tyson/u2/unblob/unblob/math.py", line 4, in <module>
from ._py.math import shannon_entropy # noqa: F401
ImportError: attempted relative import with no known parent package
input was : import json
import os
import platform
import sys
import sysconfig
INTERPRETER_SHORT_NAMES = {
"python": "py",
"cpython": "cp",
"pypy": "pp",
"ironpython": "ip",
"jython": "jy",
}
def interpreter_version():
version = sysconfig.get_config_var("interpreter_version")
if version:
version = str(version)
else:
version = _version_nodot(sys.version_info[:2])
return version
def _version_nodot(version):
# type: (PythonVersion) -> str
if any(v >= 10 for v in version):
sep = "_"
else:
sep = ""
return sep.join(map(str, version))
if hasattr(sys, "implementation"):
info = sys.implementation.version
iver = "{0.major}.{0.minor}.{0.micro}".format(info)
kind = info.releaselevel
if kind != "final":
iver += kind[0] + str(info.serial)
implementation_name = sys.implementation.name
else:
iver = "0"
implementation_name = platform.python_implementation().lower()
env = {
"implementation_name": implementation_name,
"implementation_version": iver,
"os_name": os.name,
"platform_machine": platform.machine(),
"platform_release": platform.release(),
"platform_system": platform.system(),
"platform_version": platform.version(),
"python_full_version": platform.python_version(),
"platform_python_implementation": platform.python_implementation(),
"python_version": ".".join(platform.python_version_tuple()[:2]),
"sys_platform": sys.platform,
"version_info": tuple(sys.version_info),
# Extra information
"interpreter_name": INTERPRETER_SHORT_NAMES.get(implementation_name, implementation_name),
"interpreter_version": interpreter_version(),
}
print(json.dumps(env))
at ~/.poetry/lib/poetry/utils/env.py:1195 in _run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input_)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs):
Trying to get the version of Python, in the Poetry environment, gives me this debugging output, FWIW:
tyson@Tysons-MacBook-Air unblob % ~/.poetry/bin/poetry run python -v
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
# installing zipimport hook
import 'time' # <class '_frozen_importlib.BuiltinImporter'>
import 'zipimport' # <class '_frozen_importlib.FrozenImporter'>
# installed zipimport hook
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/__init__.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__init__.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/__init__.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/codecs.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codecs.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/codecs.cpython-39.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x10125ae50>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/aliases.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/aliases.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/aliases.cpython-39.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x101282430>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x10125ac70>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/utf_8.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/utf_8.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/utf_8.cpython-39.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x10125ab50>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/latin_1.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/latin_1.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/encodings/__pycache__/latin_1.cpython-39.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x1012824f0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/io.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/io.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/io.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/abc.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/abc.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/abc.cpython-39.pyc'
import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x1012829a0>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x1012826d0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/site.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/site.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/os.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/os.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/stat.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/stat.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/stat.cpython-39.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x1012bb250>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/_collections_abc.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_collections_abc.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/_collections_abc.cpython-39.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x1012bb2e0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/posixpath.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/posixpath.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/posixpath.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/genericpath.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/genericpath.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/genericpath.cpython-39.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x1012e3910>
import 'posixpath' # <_frozen_importlib_external.SourceFileLoader object at 0x1012bba00>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x10129e940>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/_sitebuiltins.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_sitebuiltins.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/_sitebuiltins.cpython-39.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x1012b4e50>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/_bootlocale.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_bootlocale.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/_bootlocale.cpython-39.pyc'
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x1012e3e50>
# /Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-_UiaRMFf-py3.9/lib/python3.9/site-packages/__pycache__/_virtualenv.cpython-39.pyc matches /Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-_UiaRMFf-py3.9/lib/python3.9/site-packages/_virtualenv.py
# code object from '/Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-_UiaRMFf-py3.9/lib/python3.9/site-packages/__pycache__/_virtualenv.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/functools.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/functools.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/__pycache__/__init__.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/__init__.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/__pycache__/__init__.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/heapq.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/heapq.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/heapq.cpython-39.pyc'
# extension module '_heapq' loaded from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_heapq.cpython-39-darwin.so'
# extension module '_heapq' executed from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_heapq.cpython-39-darwin.so'
import '_heapq' # <_frozen_importlib_external.ExtensionFileLoader object at 0x101331f40>
import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at 0x101331a30>
import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/keyword.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/keyword.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/keyword.cpython-39.pyc'
import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x101331f70>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/operator.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/operator.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/operator.cpython-39.pyc'
import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x101342130>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/reprlib.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/reprlib.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/reprlib.cpython-39.pyc'
import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x1013421f0>
import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x101308eb0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/types.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/types.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/types.cpython-39.pyc'
import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x101316250>
import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x1012fa700>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/__init__.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/__init__.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/warnings.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/warnings.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/warnings.cpython-39.pyc'
import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x101342c40>
import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x101308b20>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/abc.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/abc.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/abc.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/machinery.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/machinery.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/machinery.cpython-39.pyc'
import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x1013497f0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/typing.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/typing.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/__pycache__/abc.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/abc.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/collections/__pycache__/abc.cpython-39.pyc'
import 'collections.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x10138b9d0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/contextlib.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/contextlib.cpython-39.pyc'
import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x10138bac0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/re.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/re.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/re.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/enum.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/enum.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/enum.cpython-39.pyc'
import 'enum' # <_frozen_importlib_external.SourceFileLoader object at 0x10139eb80>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sre_compile.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/sre_compile.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sre_compile.cpython-39.pyc'
import '_sre' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sre_parse.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/sre_parse.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sre_parse.cpython-39.pyc'
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sre_constants.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/sre_constants.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sre_constants.cpython-39.pyc'
import 'sre_constants' # <_frozen_importlib_external.SourceFileLoader object at 0x1013c7670>
import 'sre_parse' # <_frozen_importlib_external.SourceFileLoader object at 0x1013b7c40>
import 'sre_compile' # <_frozen_importlib_external.SourceFileLoader object at 0x1013b73d0>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/copyreg.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/copyreg.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/copyreg.cpython-39.pyc'
import 'copyreg' # <_frozen_importlib_external.SourceFileLoader object at 0x1013d8dc0>
import 're' # <_frozen_importlib_external.SourceFileLoader object at 0x10138bdf0>
import 'typing' # <_frozen_importlib_external.SourceFileLoader object at 0x1013498b0>
import 'importlib.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x101308400>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/util.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/util.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__pycache__/util.cpython-39.pyc'
import 'importlib.util' # <_frozen_importlib_external.SourceFileLoader object at 0x101349cd0>
import '_virtualenv' # <_frozen_importlib_external.SourceFileLoader object at 0x1012fa2b0>
# /Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-_UiaRMFf-py3.9/lib/python3.9/site-packages/_distutils_hack/__pycache__/__init__.cpython-39.pyc matches /Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-_UiaRMFf-py3.9/lib/python3.9/site-packages/_distutils_hack/__init__.py
# code object from '/Users/tyson/Library/Caches/pypoetry/virtualenvs/unblob-_UiaRMFf-py3.9/lib/python3.9/site-packages/_distutils_hack/__pycache__/__init__.cpython-39.pyc'
import '_distutils_hack' # <_frozen_importlib_external.SourceFileLoader object at 0x1012e3d30>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sitecustomize.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/sitecustomize.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/sitecustomize.cpython-39.pyc'
import 'sitecustomize' # <_frozen_importlib_external.SourceFileLoader object at 0x101400460>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x1012829d0>
Python 3.9.10 (main, Jan 15 2022, 11:40:53)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
# extension module 'readline' loaded from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/readline.cpython-39-darwin.so'
# extension module 'readline' executed from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/readline.cpython-39-darwin.so'
import 'readline' # <_frozen_importlib_external.ExtensionFileLoader object at 0x1014004f0>
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/rlcompleter.cpython-39.pyc matches /opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/rlcompleter.py
# code object from '/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/__pycache__/rlcompleter.cpython-39.pyc'
import 'rlcompleter' # <_frozen_importlib_external.SourceFileLoader object at 0x101400580>
>>> version
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'version' is not defined
>>> quit()
# clear builtins._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.__interactivehook__
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup[2] removing sys
# cleanup[2] removing builtins
# cleanup[2] removing _frozen_importlib
# cleanup[2] removing _imp
# cleanup[2] removing _thread
# cleanup[2] removing _warnings
# cleanup[2] removing _weakref
# cleanup[2] removing _io
# cleanup[2] removing marshal
# cleanup[2] removing posix
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing time
# cleanup[2] removing zipimport
# destroy zipimport
# cleanup[2] removing _codecs
# cleanup[2] removing codecs
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings
# destroy encodings
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing _signal
# cleanup[2] removing encodings.latin_1
# cleanup[2] removing _abc
# cleanup[2] removing abc
# cleanup[2] removing io
# cleanup[2] removing __main__
# cleanup[2] removing _stat
# cleanup[2] removing stat
# cleanup[2] removing _collections_abc
# cleanup[2] removing genericpath
# cleanup[2] removing posixpath
# cleanup[2] removing os.path
# cleanup[2] removing os
# cleanup[2] removing _sitebuiltins
# cleanup[2] removing _locale
# cleanup[2] removing _bootlocale
# destroy _bootlocale
# cleanup[2] removing _heapq
# cleanup[2] removing heapq
# cleanup[2] removing itertools
# cleanup[2] removing keyword
# destroy keyword
# cleanup[2] removing _operator
# cleanup[2] removing operator
# cleanup[2] removing reprlib
# destroy reprlib
# cleanup[2] removing _collections
# cleanup[2] removing collections
# cleanup[2] removing types
# cleanup[2] removing _functools
# cleanup[2] removing functools
# cleanup[2] removing importlib._bootstrap
# cleanup[2] removing importlib._bootstrap_external
# cleanup[2] removing warnings
# cleanup[2] removing importlib
# destroy importlib
# cleanup[2] removing importlib.machinery
# cleanup[2] removing collections.abc
# cleanup[2] removing contextlib
# cleanup[2] removing enum
# cleanup[2] removing _sre
# cleanup[2] removing sre_constants
# destroy sre_constants
# cleanup[2] removing sre_parse
# cleanup[2] removing sre_compile
# cleanup[2] removing copyreg
# cleanup[2] removing re
# cleanup[2] removing typing
# destroy typing
# cleanup[2] removing importlib.abc
# cleanup[2] removing importlib.util
# cleanup[2] removing _virtualenv
# destroy _virtualenv
# cleanup[2] removing _distutils_hack
# destroy _distutils_hack
# cleanup[2] removing sitecustomize
# destroy sitecustomize
# cleanup[2] removing site
# destroy site
# cleanup[2] removing readline
# cleanup[2] removing atexit
# cleanup[2] removing rlcompleter
# destroy rlcompleter
# destroy time
# destroy _sitebuiltins
# destroy io
# destroy posixpath
# destroy _stat
# destroy genericpath
# destroy stat
# destroy _abc
# destroy heapq
# destroy collections.abc
# destroy _heapq
# destroy itertools
# destroy _operator
# destroy _collections
# destroy atexit
# destroy __main__
# destroy _functools
# destroy importlib.util
# destroy importlib.machinery
# destroy collections
# destroy contextlib
# destroy operator
# destroy re
# destroy abc
# destroy _collections_abc
# destroy enum
# destroy sre_compile
# destroy _locale
# destroy copyreg
# destroy sre_parse
# destroy importlib.abc
# destroy functools
# destroy types
# destroy warnings
# destroy os
# cleanup[3] wiping readline
# cleanup[3] wiping _sre
# cleanup[3] wiping importlib._bootstrap_external
# cleanup[3] wiping importlib._bootstrap
# destroy _frozen_importlib_external
# cleanup[3] wiping encodings.latin_1
# cleanup[3] wiping _signal
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping encodings.aliases
# cleanup[3] wiping codecs
# cleanup[3] wiping _codecs
# cleanup[3] wiping posix
# cleanup[3] wiping marshal
# cleanup[3] wiping _io
# cleanup[3] wiping _weakref
# destroy _weakref
# cleanup[3] wiping _warnings
# cleanup[3] wiping _thread
# cleanup[3] wiping _imp
# destroy _imp
# cleanup[3] wiping _frozen_importlib
# cleanup[3] wiping sys
# cleanup[3] wiping builtins
# destroy readline
# destroy _sre
# destroy _signal
# destroy marshal
# destroy io
# destroy _warnings
# destroy _thread
# destroy posix
# destroy _frozen_importlib
# clear sys.audit hooks
Going to see what DTruss says (it's a roulette game, as to if it causes a kernel panic, so I'll follow-up with the outcome, shortly).
You shouldn't have it set. It would be nice to figure out how the collision happens. We could for sure rename this module if it can cause problems to others...
I see. I'd probably try the Docker image, eventually, but being a creature of habit, I end up doing things the Traditional UNIX Way(TM), most of the time...
Looks like DTrace/DTruss is a no-go, at the moment, on this version of MacOS, even with SIP disabled (seems that Apple have progressively broken it, over time), given that the Terminal app locks up, and stdio seems to break, when trying to trace Poetry. Not sure if having Apple Music running, has something to do with it, but a fun failure mode, to say the least (I'm used to just receiving a Purple Screen of Death, a kernel panic, and my machine rebooting, when I try to use it, usually).
And, after a hard reboot, and quitting anything that might even remotely involve DRM, it looks like you just can't trace something that involves chroots:
root@Tysons-MacBook-Air unblob # dtruss -f $HOME/.poetry/bin/poetry install --no-dev
PID/THRD SYSCALL(args) = return
1132/0x287f: fork() = 0 0
1132/0x287f: access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) = -1 Err#2
1132/0x287f: bsdthread_register(0x1D4F800196E4F084, 0xF162800196E4F078, 0x4000) = 1073742303 0
1132/0x287f: shm_open(0x196D13F5D, 0x0, 0x40F4000) = 3 0
1132/0x287f: fstat64(0x3, 0x16BD09FD0, 0x0) = 0 0
1132/0x287f: mmap(0x0, 0x4000, 0x1, 0x40001, 0x3, 0x0) = 0x104210000 0
1132/0x287f: close(0x3) = 0 0
1132/0x287f: ioctl(0x2, 0x4004667A, 0x16BD0A07C) = 0 0
1132/0x287f: mprotect(0x10421C000, 0x4000, 0x0) = 0 0
1132/0x287f: mprotect(0x104228000, 0x4000, 0x0) = 0 0
1132/0x287f: mprotect(0x10422C000, 0x4000, 0x0) = 0 0
1132/0x287f: mprotect(0x104238000, 0x4000, 0x0) = 0 0
1132/0x287f: mprotect(0x10423C000, 0x4000, 0x0) = 0 0
1132/0x287f: mprotect(0x104248000, 0x4000, 0x0) = 0 0
1132/0x287f: mprotect(0x104214000, 0x90, 0x1) = 0 0
1132/0x287f: mprotect(0x104214000, 0x90, 0x3) = 0 0
1132/0x287f: mprotect(0x104214000, 0x90, 0x1) = 0 0
1132/0x287f: mprotect(0x10424C000, 0x4000, 0x1) = 0 0
1132/0x287f: mprotect(0x104250000, 0x90, 0x1) = 0 0
1132/0x287f: mprotect(0x104250000, 0x90, 0x3) = 0 0
1132/0x287f: mprotect(0x104250000, 0x90, 0x1) = 0 0
1132/0x287f: mprotect(0x104214000, 0x90, 0x3) = 0 0
1132/0x287f: mprotect(0x104214000, 0x90, 0x1) = 0 0
1132/0x287f: mprotect(0x10424C000, 0x4000, 0x3) = 0 0
1132/0x287f: mprotect(0x10424C000, 0x4000, 0x1) = 0 0
1132/0x287f: objc_bp_assist_cfg_np(0x196CDA580, 0x8000000000201048, 0x0) = -1 Err#5
1132/0x287f: issetugid(0x0, 0x0, 0x0) = 0 0
1132/0x287f: getentropy(0x16BD09F28, 0x20, 0x0) = 0 0
1132/0x287f: getentropy(0x16BD09F78, 0x40, 0x0) = 0 0
1132/0x287f: getpid(0x0, 0x0, 0x0) = 1132 0
1132/0x287f: stat64("/AppleInternal\0", 0x16BD0A5E0, 0x0) = -1 Err#2
1132/0x287f: csops_audittoken(0x46C, 0x10, 0x16BD0A110) = 0 0
1132/0x287f: proc_info(0x2, 0x46C, 0xD) = 64 0
1132/0x287f: csops_audittoken(0x46C, 0x10, 0x16BD0A1D0) = 0 0
1132/0x287f: sysctlbyname(kern.osvariant_status, 0x15, 0x16BD0A648, 0x16BD0A640, 0x0) = 0 0
1132/0x287f: csops(0x46C, 0x0, 0x16BD0A66C) = 0 0
1132/0x287f: mprotect(0x104108000, 0x100000, 0x1) = 0 0
1132/0x287f: execve("/opt/local/bin/python3\0", 0x16BD0B9C0, 0x16BD0B9E8) = -1 Err#2
1132/0x287f: execve("/opt/local/sbin/python3\0", 0x16BD0B9C0, 0x16BD0B9E8) = -1 Err#2
dtrace: error on enabled probe ID 1676 (ID 283: syscall::execve:return): invalid address (0x16bd0b320) in action #12 at DIF offset 12
1132/0x288c: fork() = 0 0
1132/0x288c: thread_selfid(0x0, 0x0, 0x0) = 10380 0
1132/0x288c: getpid(0x0, 0x0, 0x0) = 1132 0
1132/0x288c: fsgetpath(0x16B46AF58, 0x400, 0x16B46AF38) = 94 0
1132/0x288c: fsgetpath(0x16B46B378, 0x400, 0x16B46B358) = 14 0
1132/0x288c: csrctl(0x0, 0x16B46B7CC, 0x4) = -1 Err#1
1132/0x288c: __mac_syscall(0x104AE0D2F, 0x5A, 0x16B46B760) = 0 0
root@Tysons-MacBook-Air unblob #
root@Tysons-MacBook-Air unblob # dtruss $HOME/.poetry/bin/poetry install --no-dev
SYSCALL(args) = return
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) = -1 Err#2
bsdthread_register(0x1D4F800196E4F084, 0xF162800196E4F078, 0x4000) = 1073742303 0
shm_open(0x196D13F5D, 0x0, 0x4668000) = 3 0
fstat64(0x3, 0x16B795FD0, 0x0) = 0 0
mmap(0x0, 0x4000, 0x1, 0x40001, 0x3, 0x0) = 0x104784000 0
close(0x3) = 0 0
ioctl(0x2, 0x4004667A, 0x16B79607C) = 0 0
mprotect(0x104790000, 0x4000, 0x0) = 0 0
mprotect(0x10479C000, 0x4000, 0x0) = 0 0
mprotect(0x1047A0000, 0x4000, 0x0) = 0 0
mprotect(0x1047AC000, 0x4000, 0x0) = 0 0
mprotect(0x1047B0000, 0x4000, 0x0) = 0 0
mprotect(0x1047BC000, 0x4000, 0x0) = 0 0
mprotect(0x104788000, 0x90, 0x1) = 0 0
mprotect(0x104788000, 0x90, 0x3) = 0 0
mprotect(0x104788000, 0x90, 0x1) = 0 0
mprotect(0x1047C0000, 0x4000, 0x1) = 0 0
mprotect(0x1047C4000, 0x90, 0x1) = 0 0
mprotect(0x1047C4000, 0x90, 0x3) = 0 0
mprotect(0x1047C4000, 0x90, 0x1) = 0 0
mprotect(0x104788000, 0x90, 0x3) = 0 0
mprotect(0x104788000, 0x90, 0x1) = 0 0
mprotect(0x1047C0000, 0x4000, 0x3) = 0 0
mprotect(0x1047C0000, 0x4000, 0x1) = 0 0
objc_bp_assist_cfg_np(0x196CDA580, 0x8000000000201048, 0x0) = -1 Err#5
issetugid(0x0, 0x0, 0x0) = 0 0
getentropy(0x16B795F28, 0x20, 0x0) = 0 0
getentropy(0x16B795F78, 0x40, 0x0) = 0 0
getpid(0x0, 0x0, 0x0) = 1102 0
stat64("/AppleInternal\0", 0x16B7965E0, 0x0) = -1 Err#2
csops_audittoken(0x44E, 0x10, 0x16B796110) = 0 0
proc_info(0x2, 0x44E, 0xD) = 64 0
csops_audittoken(0x44E, 0x10, 0x16B7961D0) = 0 0
sysctlbyname(kern.osvariant_status, 0x15, 0x16B796648, 0x16B796640, 0x0) = 0 0
csops(0x44E, 0x0, 0x16B79666C) = 0 0
mprotect(0x10467C000, 0x100000, 0x1) = 0 0
execve("/opt/local/bin/python3\0", 0x16B7979C0, 0x16B7979E8) = -1 Err#2
execve("/opt/local/sbin/python3\0", 0x16B7979C0, 0x16B7979E8) = -1 Err#2
dtrace: error on enabled probe ID 1676 (ID 283: syscall::execve:return): invalid address (0x16b797320) in action #11 at DIF offset 12
thread_selfid(0x0, 0x0, 0x0) = 9540 0
getpid(0x0, 0x0, 0x0) = 1102 0
fsgetpath(0x16B96EF58, 0x400, 0x16B96EF38) = 94 0
Not massively surprising, but makes things slightly harder to debug, than I would have liked. :(
Not even sure if it's the chroots, in fairness - I wanted to say that "tracing anything, that's not the system Python is broken", but it turns out, that you can't even trace the system Python, presumably because of some memory management/JIT-related issues:
root@Tysons-MacBook-Air unblob # dtruss python3
SYSCALL(args) = return
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) = -1 Err#2
bsdthread_register(0x196E4F084, 0x196E4F078, 0x4000) = 1073742303 0
shm_open(0x196D13F5D, 0x0, 0xFFFFFFFF96C8C000) = 3 0
fstat64(0x3, 0x16D48DFC0, 0x0) = 0 0
mmap(0x0, 0x4000, 0x1, 0x40001, 0x3, 0x0) = 0x102A8C000 0
close(0x3) = 0 0
ioctl(0x2, 0x4004667A, 0x16D48E06C) = 0 0
mprotect(0x102A98000, 0x4000, 0x0) = 0 0
mprotect(0x102AA4000, 0x4000, 0x0) = 0 0
mprotect(0x102B60000, 0x4000, 0x0) = 0 0
mprotect(0x102B6C000, 0x4000, 0x0) = 0 0
mprotect(0x102B70000, 0x4000, 0x0) = 0 0
mprotect(0x102B7C000, 0x4000, 0x0) = 0 0
mprotect(0x102A90000, 0x90, 0x1) = 0 0
mprotect(0x102A90000, 0x90, 0x3) = 0 0
mprotect(0x102A90000, 0x90, 0x1) = 0 0
mprotect(0x102AA8000, 0x4000, 0x1) = 0 0
mprotect(0x102B80000, 0x90, 0x1) = 0 0
mprotect(0x102B80000, 0x90, 0x3) = 0 0
mprotect(0x102B80000, 0x90, 0x1) = 0 0
mprotect(0x102A90000, 0x90, 0x3) = 0 0
mprotect(0x102A90000, 0x90, 0x1) = 0 0
mprotect(0x102AA8000, 0x4000, 0x3) = 0 0
mprotect(0x102AA8000, 0x4000, 0x1) = 0 0
objc_bp_assist_cfg_np(0x196CDA580, 0x8000000000201048, 0x0) = -1 Err#5
issetugid(0x0, 0x0, 0x0) = 0 0
getentropy(0x16D48DEC8, 0x20, 0x0) = 0 0
getentropy(0x16D48DF18, 0x40, 0x0) = 0 0
getpid(0x0, 0x0, 0x0) = 1366 0
stat64("/AppleInternal\0", 0x16D48E5D0, 0x0) = -1 Err#2
csops_audittoken(0x556, 0x10, 0x16D48E100) = 0 0
proc_info(0x2, 0x556, 0xD) = 64 0
csops_audittoken(0x556, 0x10, 0x16D48E1C0) = 0 0
sysctlbyname(kern.osvariant_status, 0x15, 0x16D48E638, 0x16D48E630, 0x0) = 0 0
csops(0x556, 0x0, 0x16D48E65C) = 0 0
geteuid(0x0, 0x0, 0x0) = 0 0
getuid(0x0, 0x0, 0x0) = 0 0
sysctl([CTL_KERN, 14, 1, 1366, 0, 0] (4), 0x16D48CB30, 0x16D48CB18, 0x0, 0x0) = 0 0
gettid(0x16D48CE20, 0x16D48CE24, 0x0) = -1 Err#3
geteuid(0x0, 0x0, 0x0) = 0 0
getegid(0x0, 0x0, 0x0) = 0 0
csops(0x556, 0x0, 0x16D48DB74) = 0 0
gettid(0x16D48CDF0, 0x16D48CDF4, 0x0) = -1 Err#3
geteuid(0x0, 0x0, 0x0) = 0 0
getegid(0x0, 0x0, 0x0) = 0 0
mprotect(0x102984000, 0x100000, 0x1) = 0 0
stat64("/\0", 0x16D48DA80, 0x0) = 0 0
getattrlist("/opt\0", 0x196D910EC, 0x16D48F390) = 0 0
getattrlist("/opt/homebrew\0", 0x196D910EC, 0x16D48F390) = 0 0
getattrlist("/opt/homebrew/bin\0", 0x196D910EC, 0x16D48F390) = 0 0
posix_spawn(0x0, 0x60000324C000, 0x16D48F750) = 0 0
thread_selfid(0x0, 0x0, 0x0) = 14859 0
getpid(0x0, 0x0, 0x0) = 1366 0