Sto cercando di creare un ambiente chroot con Mac OS X 10.6 su Mac OS X 10.8.4. Ho creato l'immagine del disco, installato Mac OS X 10.6.3 e l'aggiornamento combo su 10.6.8 su di esso. Quando eseguo chroot /path/to/mounted/image /bin/echo test
all'interno della macchina virtuale che esegue 10.6.8 (che ho usato per eseguire l'installer) funziona bene, ma se faccio lo stesso in host OS (10.8.4) riceve SIGBUS e si blocca.
Ecco il rapporto di arresto anomalo:
Process: echo [29464]
Path: /Volumes/VOLUME/bin/echo
Identifier: echo
Version: 170
Code Type: X86-64 (Native)
Parent Process: zsh [27539]
User ID: 0
Date/Time: 2013-09-01 21:00:40.910 +0100
OS Version: Mac OS X 10.8.4 (12E55)
Report Version: 10
Crashed Thread: 0
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fffffe00600
VM Regions Near 0x7fffffe00600:
Submap 00007fffc0000000-00007fffffe00000 r--/rwx process-only submap
--> Submap 00007fffffe00000-00007fffffe01000 r--/r-- process-only submap
shared memory 00007fffffe00000-00007fffffe01000 [ 4K] r--/r-- SM=SHM
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
Thread 0 Crashed:
0 ??? 0x00007fffffe00600 0 + 140737486259712
1 libSystem.B.dylib 0x000000010cb3f10d mach_init_doit + 81
2 libSystem.B.dylib 0x000000010cb3f076 libSystem_initializer + 19
3 dyld 0x00007fff6c748378 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 236
4 dyld 0x00007fff6c748762 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 46
5 dyld 0x00007fff6c74506e ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 380
6 dyld 0x00007fff6c744fc4 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 210
7 dyld 0x00007fff6c744eba ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 54
8 dyld 0x00007fff6c736fc0 dyld::initializeMainExecutable() + 207
9 dyld 0x00007fff6c73ab04 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 3060
10 dyld 0x00007fff6c736397 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 761
11 dyld 0x00007fff6c73605e _dyld_start + 54
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007fffffe00600 rbx: 0x0000000000000000 rcx: 0x000000010cb3ed6e rdx: 0x00007fff530cab00
rdi: 0x000000010cd18cc0 rsi: 0x0000000000001908 rbp: 0x00007fff530ca270 rsp: 0x00007fff530ca268
r8: 0x00007fff6c76a1a8 r9: 0x0000000000000001 r10: 0x000000010cd42a28 r11: 0x000000010cb3f000
r12: 0x0000000000000d07 r13: 0x0000000000000001 r14: 0x00007fff6c771b38 r15: 0x0000000000000000
rip: 0x00007fffffe00600 rfl: 0x0000000000010202 cr2: 0x00007fffffe00600
Logical CPU: 2
Binary Images:
0x10cb35000 - 0x10cb35ff7 echo (170) <A9BC6D8D-19CF-3DF3-8EB4-9677BA9F265D> /bin/echo
0x10cb3e000 - 0x10ccfffef libSystem.B.dylib (125.2.11) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib
0x10cd93000 - 0x10cd97ff7 libmathCommon.A.dylib (315) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff6c735000 - 0x7fff6c76993f dyld (210.2.3) <A40597AA-5529-3337-8C09-D8A014EB1578> /usr/lib/dyld
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: 41894
thread_create: 1
thread_set_state: 2793
VM Region Summary:
ReadOnly portion of Libraries: Total=2568K resident=2396K(93%) swapped_out_or_unallocated=172K(7%)
Writable regions: Total=8508K written=24K(0%) resident=68K(1%) swapped_out=0K(0%) unallocated=8440K(99%)
REGION TYPE VIRTUAL
=========== =======
STACK GUARD 56.0M
Stack 8192K
__DATA 384K
__LINKEDIT 532K
__TEXT 2036K
shared memory 12K
=========== =======
TOTAL 66.9M
Allo stesso tempo /path/to/mounted/image/bin/echo test
funziona bene.
Cosa mi sono perso? Come far funzionare tutto correttamente?
AGGIORNAMENTO: mi sto arrendendo. Apparentemente, chroot su Mac OS X è completamente rotto. Anche dopo aver ottenuto alcuni binari in esecuzione all'interno di chroot (installando la stessa versione del sistema operativo in chroot come sull'host), le ricerche dei nomi di dominio hanno esito negativo e sembra che anche se potessi risolverlo in qualche modo, molto probabilmente ci saranno altri problemi.