Open flferretti opened 1 month ago
Argh, I had no idea a mjpython executable was installed in macos at all. Do other mujoco executables work on Mac?
Argh, I had no idea a mjpython executable was installed in macos at all. Do other mujoco executables work on Mac?
python -m mujoco.viewer
works correctly, but when I try to launch the passive viewer from a script I get a runtime error as I'd need to launch the script with mjpython some_script.py
:
handle = mujoco.viewer.launch_passive(
^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: `launch_passive` requires that the Python script be run under `mjpython` on macOS
But then I get SIGKILL immediately.
mujoco-simulate
from mujoco-simulate
package works?
Yes, mujoco-simulate
, mujoco-basic
, mujoco-record
, mujoco-testspeed
, mujoco-compile
and mujoco_plugin
work correctly
Possibly related issue: https://github.com/google-deepmind/mujoco/issues/1923 .
Solution to issue cannot be found in the documentation.
Issue
The
mjpython
(version 3.2.0) executable in the Mujoco environment crashes immediately upon launch due to a code signing validation error, resulting in a SIGKILL signal. After checking the code signature withcodesign --verify --deep $(which mjpython)
, I get:Translated Report
```yaml Incident Identifier: 404B9CA7-D59D-4C05-88F4-E058AC8E67F1 CrashReporter Key: 5D3FABD9-F098-B403-B043-D8CBE9964F43 Hardware Model: Macmini9,1 Process: mjpython [55412] Path: /Users/USER/*/MuJoCo (mjpython).app/Contents/MacOS/mjpython Identifier: org.mujoco.mjpython Version: 3.2.0 (3.2.0) Code Type: ARM-64 (Native) Role: Unspecified Parent Process: zsh [54238] Coalition: com.apple.Terminal [6864] Responsible Process: Terminal [46050] Date/Time: 2024-10-16 16:21:28.3124 +0200 Launch Time: 2024-10-16 16:21:26.7155 +0200 OS Version: macOS 15.1 (24B5070a) Release Type: User Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid)) Exception Subtype: UNKNOWN_0x32 at 0x0000000102170000 Exception Codes: 0x0000000000000032, 0x0000000102170000 VM Region Info: 0x102170000 is in 0x102170000-0x102174000; bytes after start: 0 bytes before end: 16383 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 102170000-102174000 [ 16K] r-x/r-x SM=COW /main_executable_path_missing __DATA_CONST 102174000-102178000 [ 16K] rw-/rw- SM=COW /main_executable_path_missing Termination Reason: CODESIGNING 2 Invalid Page Triggered by Thread: 0 Thread 0 Crashed: 0 dyld_path_missing 0x10237e1e4 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 52 1 dyld_path_missing 0x10238026c dyld3::MachOFile::forEachSupportedPlatform(void (dyld3::Platform, unsigned int, unsigned int) block_pointer) const + 160 2 dyld_path_missing 0x1023ca810 dyld3::MachOFile::isBuiltForSimulator() const + 124 3 dyld_path_missing 0x102381e3c start + 1760 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000102170000 x1: 0x000000016dc8f0d8 x2: 0x000000016dc8f080 x3: 0x000000010237de24 x4: 0x0000000000000001 x5: 0x0000000000000073 x6: 0x0000000000000000 x7: 0x0000000000000d10 x8: 0x000000016dc8f0b8 x9: 0x0000000102403458 x10: 0x00000001023ed000 x11: 0x00000001023faba6 x12: 0x0000000000000065 x13: 0x0000000000000073 x14: 0x000000000004bca0 x15: 0x0000000000000000 x16: 0x000000010238030c x17: 0x6ae100016dc8f080 x18: 0x0000000000000000 x19: 0x000000016dc8f0d8 x20: 0x0000000102170000 x21: 0x000000016dc8f080 x22: 0x000000016dc8f3c8 x23: 0x0000000000000000 x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000000000000 fp: 0x000000016dc8f070 lr: 0x000000010238026c sp: 0x000000016dc8efe0 pc: 0x000000010237e1e4 cpsr: 0x80001000 far: 0x0000000102170000 esr: 0x92000007 (Data Abort) byte read Translation fault Binary Images: 0x10237c000 - 0x1023fffff dyld_path_missing (*) <30a1d1f9-6c45-33af-99f5-6899bded46ab> /dyld_path_missing 0x102170000 - 0x102173fff main_executable_path_missing (*) <4ba80ae6-96ad-30fe-8cc7-06c125f58689> /main_executable_path_missing 0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ??? Error Formulating Crash Report: dyld_process_snapshot_get_shared_cache failed ```
Full Report JSON
```json {"app_name":"mjpython","timestamp":"2024-10-16 16:21:28.00 +0200","app_version":"3.2.0","slice_uuid":"4ba80ae6-96ad-30fe-8cc7-06c125f58689","build_version":"3.2.0","platform":0,"bundleID":"org.mujoco.mjpython","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 15.1 (24B5070a)","roots_installed":0,"name":"mjpython","incident_id":"404B9CA7-D59D-4C05-88F4-E058AC8E67F1"} { "uptime" : 20000, "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "Macmini9,1", "coalitionID" : 6864, "osVersion" : { "train" : "macOS 15.1", "build" : "24B5070a", "releaseType" : "User" }, "captureTime" : "2024-10-16 16:21:28.3124 +0200", "codeSigningMonitor" : 1, "incident" : "404B9CA7-D59D-4C05-88F4-E058AC8E67F1", "pid" : 55412, "translated" : false, "cpuType" : "ARM-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2024-10-16 16:21:26.7155 +0200", "procStartAbsTime" : 482057279739, "procExitAbsTime" : 482093024906, "procName" : "mjpython", "procPath" : "\/Users\/USER\/*\/MuJoCo (mjpython).app\/Contents\/MacOS\/mjpython", "bundleInfo" : {"CFBundleShortVersionString":"3.2.0","CFBundleVersion":"3.2.0","CFBundleIdentifier":"org.mujoco.mjpython"}, "storeInfo" : {"deviceIdentifierForVendor":"F060D8CB-21B5-5998-9088-E9B381D8D414","thirdParty":true}, "parentProc" : "zsh", "parentPid" : 54238, "coalitionName" : "com.apple.Terminal", "crashReporterKey" : "5D3FABD9-F098-B403-B043-D8CBE9964F43", "responsiblePid" : 46050, "responsibleProc" : "Terminal", "codeSigningID" : "", "codeSigningTeamID" : "", "codeSigningFlags" : 16777728, "codeSigningValidationCategory" : 0, "codeSigningTrustLevel" : 4294967295, "instructionByteStream" : {"beforePC":"+mcFqfhfBqn2Vwep9E8Iqf17Can9QwKR9QMCqvMDAar0AwCq\/\/8AOQ==","atPC":"CABAuelZn1Kp3b9yHwEJa+AAAFTJWZ9Sqd2\/ch8BCWthAQBUiQOAUg=="}, "bootSessionUUID" : "0E7FD772-2EA7-408F-9497-940DD6239FA0", "sip" : "enabled", "vmRegionInfo" : "0x102170000 is in 0x102170000-0x102174000; bytes after start: 0 bytes before end: 16383\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> __TEXT 102170000-102174000 [ 16K] r-x\/r-x SM=COW \/main_executable_path_missing\n __DATA_CONST 102174000-102178000 [ 16K] rw-\/rw- SM=COW \/main_executable_path_missing", "exception" : {"codes":"0x0000000000000032, 0x0000000102170000","rawCodes":[50,4330029056],"type":"EXC_BAD_ACCESS","signal":"SIGKILL (Code Signature Invalid)","subtype":"UNKNOWN_0x32 at 0x0000000102170000"}, "termination" : {"flags":0,"code":2,"namespace":"CODESIGNING","indicator":"Invalid Page"}, "vmregioninfo" : "0x102170000 is in 0x102170000-0x102174000; bytes after start: 0 bytes before end: 16383\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> __TEXT 102170000-102174000 [ 16K] r-x\/r-x SM=COW \/main_executable_path_missing\n __DATA_CONST 102174000-102178000 [ 16K] rw-\/rw- SM=COW \/main_executable_path_missing", "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":447441,"threadState":{"x":[{"value":4330029056},{"value":6136852696},{"value":6136852608},{"value":4332183076},{"value":1},{"value":115},{"value":0},{"value":3344},{"value":6136852664},{"value":4332729432,"symbolLocation":0,"symbol":"__block_descriptor_tmp.70"},{"value":4332638208,"symbolLocation":24,"symbol":"dyld4::Atlas::ProcessSnapshot::Serializer::emitMappedFileInfo(unsigned long long, lsl::UUID const&, dyld4::FileRecord const&, lsl::Vector&) (.cold.2)"},{"value":4332694438},{"value":101},{"value":115},{"value":310432},{"value":0},{"value":4332192524,"symbolLocation":0,"symbol":"invocation function for block in dyld3::MachOFile::forEachSupportedPlatform(void (dyld3::Platform, unsigned int, unsigned int) block_pointer) const"},{"value":7701436843917111424},{"value":0},{"value":6136852696},{"value":4330029056},{"value":6136852608},{"value":6136853448},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4332192364},"cpsr":{"value":2147487744},"fp":{"value":6136852592},"sp":{"value":6136852448},"esr":{"value":2449473543,"description":"(Data Abort) byte read Translation fault"},"pc":{"value":4332184036,"matchesCrashFrame":1},"far":{"value":4330029056}},"frames":[{"imageOffset":8676,"symbol":"dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const","symbolLocation":52,"imageIndex":0},{"imageOffset":17004,"symbol":"dyld3::MachOFile::forEachSupportedPlatform(void (dyld3::Platform, unsigned int, unsigned int) block_pointer) const","symbolLocation":160,"imageIndex":0},{"imageOffset":321552,"symbol":"dyld3::MachOFile::isBuiltForSimulator() const","symbolLocation":124,"imageIndex":0},{"imageOffset":24124,"symbol":"start","symbolLocation":1760,"imageIndex":0}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64e",
"base" : 4332175360,
"size" : 540672,
"uuid" : "30a1d1f9-6c45-33af-99f5-6899bded46ab",
"path" : "\/dyld_path_missing",
"name" : "dyld_path_missing"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4330029056,
"size" : 16384,
"uuid" : "4ba80ae6-96ad-30fe-8cc7-06c125f58689",
"path" : "\/main_executable_path_missing",
"name" : "main_executable_path_missing"
},
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
}
],
"vmSummary" : "ReadOnly portion of Libraries: Total=864K resident=0K(0%) swapped_out_or_unallocated=864K(100%)\nWritable regions: Total=8240K written=64K(1%) resident=64K(1%) swapped_out=0K(0%) unallocated=8176K(99%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8176K 1 \nVM_ALLOCATE 16K 1 \n__DATA 32K 2 \n__DATA_CONST 48K 2 \n__DATA_DIRTY 16K 1 \n__LINKEDIT 320K 2 \n__TEXT 544K 2 \n__TPRO_CONST 288K 1 \nmapped file 4.3G 14 \npage table in kernel 64K 1 \nshared memory 16K 1 \n=========== ======= ======= \nTOTAL 4.4G 29 \n",
"legacyInfo" : {
"threadTriggered" : {
}
},
"logWritingSignature" : "75d40bae3fd5b5b856dcb2d011a2541c4b14e442",
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "5ffde50ce2aacd000d47a95f",
"factorPackIds" : {
},
"deploymentId" : 250000432
},
{
"rolloutId" : "64628732bf2f5257dedc8988",
"factorPackIds" : {
},
"deploymentId" : 250000003
}
],
"experiments" : [
{
"treatmentId" : "c47ab4cc-c9c3-4b5d-a87c-e2433ce02597",
"experimentId" : "6639bc6ba73d460582162323",
"deploymentId" : 400000006
}
]
},
"reportNotes" : [
"dyld_process_snapshot_get_shared_cache failed"
]
}
```
Installed packages