wolfcw / libfaketime

libfaketime modifies the system time for a single application
https://github.com/wolfcw/libfaketime
GNU General Public License v2.0
2.72k stars 326 forks source link

Segmentation fault on OS X #129

Closed leonklingele closed 3 years ago

leonklingele commented 6 years ago
$ $(brew --prefix)/bin/faketime
# Works fine

$ $(brew --prefix)/bin/faketime '00:30:00' man
Caught Segmentation fault: 11
# Oh noes!

I'm using libfaketime from Homebrew, installed via brew install libfaketime --build-from-source.

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.6
BuildVersion:   15G17023
wolfcw commented 6 years ago

does faketime 'now' /bin/bash -c 'echo $DYLD_INSERT_LIBRARIES'give any output?

leonklingele commented 6 years ago
$ faketime 'now' /bin/bash -c 'echo $DYLD_INSERT_LIBRARIES'
Caught Segmentation fault: 11

It seems to segfault every time, regardless of which binary is executed.

leonklingele commented 6 years ago

strace:

$ sudo dtruss -e faketime 'now' ls
Caught Segmentation fault: 11
 ELAPSD SYSCALL(args)        = return
      3 thread_selfid(0x0, 0x0, 0x0)         = 2814972 0
      3 csops(0x0, 0x0, 0x7FFF5418FA50)      = 0 0
      1 issetugid(0x0, 0x0, 0x7FFF5418FA50)      = 0 0
      2 shared_region_check_np(0x7FFF5418D958, 0x0, 0x7FFF5418FA50)      = 0 0
     96 stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF5418EEE8, 0x7FFF5418FA50)         = 0 0
    744 open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0)         = 3 0
    313 pread(0x3, "\312\376\272\276\0", 0x1000, 0x0)        = 4096 0
      4 pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x7000)       = 4096 0
    160 fcntl(0x3, 0x61, 0x7FFF5418D230)         = 0 0
     21 mmap(0x0, 0x670, 0x5, 0x1, 0x3, 0x7000)      = 0x10BA76000 0
      3 munmap(0x10BA76000, 0x670)       = 0 0
     17 mmap(0x10BA76000, 0x2000, 0x5, 0x12, 0x3, 0x7000)        = 0x10BA76000 0
      4 mmap(0x10BA78000, 0x1000, 0x3, 0x12, 0x3, 0x9000)        = 0x10BA78000 0
      3 mmap(0x10BA79000, 0x2F40, 0x1, 0x12, 0x3, 0xA000)        = 0x10BA79000 0
      3 close(0x3)       = 0 0
      4 stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF5418F468, 0x1)        = 0 0
      3 stat64("/usr/lib/libSystem.B.dylib\0", 0x7FFF5418ED18, 0x1)      = 0 0
      3 stat64("/usr/lib/system/libcache.dylib\0", 0x7FFF5418E928, 0x1)      = 0 0
      2 stat64("/usr/lib/system/libcommonCrypto.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libcompiler_rt.dylib\0", 0x7FFF5418E928, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libcopyfile.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libcorecrypto.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libdispatch.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libdyld.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libkeymgr.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/liblaunch.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libmacho.dylib\0", 0x7FFF5418E928, 0x1)      = 0 0
      2 stat64("/usr/lib/system/libquarantine.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libremovefile.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_asl.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_blocks.dylib\0", 0x7FFF5418E928, 0x1)      = 0 0
      2 stat64("/usr/lib/system/libsystem_c.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libsystem_configuration.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libsystem_coreservices.dylib\0", 0x7FFF5418E928, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libsystem_coretls.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_dnssd.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libsystem_info.dylib\0", 0x7FFF5418E928, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libsystem_kernel.dylib\0", 0x7FFF5418E928, 0x1)      = 0 0
      2 stat64("/usr/lib/system/libsystem_m.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libsystem_malloc.dylib\0", 0x7FFF5418E928, 0x1)      = 0 0
      2 stat64("/usr/lib/system/libsystem_network.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_networkextension.dylib\0", 0x7FFF5418E928, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libsystem_notify.dylib\0", 0x7FFF5418E928, 0x1)      = 0 0
      2 stat64("/usr/lib/system/libsystem_platform.dylib\0", 0x7FFF5418E928, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libsystem_pthread.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_sandbox.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_secinit.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_trace.dylib\0", 0x7FFF5418E928, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libunc.dylib\0", 0x7FFF5418E928, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libunwind.dylib\0", 0x7FFF5418E928, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libxpc.dylib\0", 0x7FFF5418E928, 0x1)        = 0 0
      2 stat64("/usr/lib/libobjc.A.dylib\0", 0x7FFF5418DC08, 0x1)        = 0 0
      2 stat64("/usr/lib/libauto.dylib\0", 0x7FFF5418DC08, 0x1)      = 0 0
      2 stat64("/usr/lib/libc++abi.dylib\0", 0x7FFF5418DAE8, 0x1)        = 0 0
      2 stat64("/usr/lib/libc++.1.dylib\0", 0x7FFF5418DAE8, 0x1)         = 0 0
      4 stat64("/usr/lib/libDiagnosticMessagesClient.dylib\0", 0x7FFF5418D9D8, 0x1)      = 0 0
      1 getpid(0x7FFF935ED740, 0x7FFF5418D9D8, 0x1)      = 85325 0
     44 open("/dev/dtracehelper\0", 0x2, 0x7FFF5418F910)         = 3 0
 173272 ioctl(0x3, 0x80086804, 0x7FFF5418F898)       = 0 0
      8 close(0x3)       = 0 0
      8 sysctl(0x7FFF5418EF80, 0x2, 0x7FFF5418EF90)      = 0 0
      1 thread_selfid(0x7FFF5418EF80, 0x2, 0x7FFF5418EF90)       = 2814972 0
      2 bsdthread_register(0x7FFF95725344, 0x7FFF95725334, 0x2000)       = 1073741887 0
      3 mprotect(0x10BA7D000, 0x88, 0x1)         = 0 0
      2 mprotect(0x10BA7F000, 0x1000, 0x0)       = 0 0
      2 mprotect(0x10BA95000, 0x1000, 0x0)       = 0 0
      1 mprotect(0x10BA96000, 0x1000, 0x0)       = 0 0
      1 mprotect(0x10BAAC000, 0x1000, 0x0)       = 0 0
      1 mprotect(0x10BAAD000, 0x1000, 0x1)       = 0 0
      3 mprotect(0x10BA7D000, 0x88, 0x3)         = 0 0
      2 mprotect(0x10BA7D000, 0x88, 0x1)         = 0 0
      1 issetugid(0x10BA7D000, 0x88, 0x1)        = 0 0
      1 getpid(0x10BA7D000, 0x88, 0x1)       = 85325 0
      3 stat64("/AppleInternal/XBS/.isChrooted\0", 0x7FFF5418EEE8, 0x1)      = -1 Err#2
      1 stat64("/AppleInternal\0", 0x7FFF5418EE58, 0x1)      = -1 Err#2
      2 csops(0x14D4D, 0x7, 0x7FFF5418E970)      = -1 Err#22
     36 sysctl(0x7FFF5418ED30, 0x4, 0x7FFF5418EAA8)      = 0 0
      1 csops(0x14D4D, 0x7, 0x7FFF5418E260)      = -1 Err#22
      2 proc_info(0x2, 0x14D4D, 0x11)        = 56 0
      6 pipe(0x2, 0x14D4D, 0x11)         = 3 0
 165764 fork()       = 85327 0
      4 close(0x4)       = 0 0
 228758 read(0x3, "1511392510\n\0", 0x100)       = 11 0
   1775 wait4(0x14D4F, 0x7FFF5418FADC, 0x0)      = 85327 0
      5 close(0x3)       = 0 0
      4 pipe(0x3, 0x7FFF5418FADC, 0x0)       = 3 0
      6 sem_open(0x10BA71130, 0xA00, 0x180)      = 5 0
      3 shm_open(0x10BA72130, 0xA02, 0x180)      = 6 0
      2 ftruncate(0x6, 0x8, 0x180)       = 0 0
      6 mmap(0x0, 0x40, 0x3, 0x1, 0x6, 0x0)      = 0x10BCAE000 0
      1 sem_wait(0x5, 0x1000, 0x3)       = 0 0
      2 munmap(0x10BCAE000, 0x40)        = 0 0
      1 sem_post(0x5, 0x40, 0x3)         = 0 0
      2 sem_close(0x5, 0x40, 0x3)        = 0 0
      1 getrlimit(0x1008, 0x7FFF5418F888, 0x3)       = 0 0
      7 open_nocancel("/usr/local/Cellar/libfaketime/0.9.7/libfaketime.1.dylib\0", 0x0, 0x1B6)       = -1 Err#2
 191786 fork()       = 85328 0
      3 close(0x4)       = 0 0
 177282 wait4(0x14D50, 0x7FFF5418FAE0, 0x0)      = 85328 0
      3 read(0x3, "\0", 0x1)         = 0 0
      4 sem_unlink(0x10BA71130, 0x7FFF5418FADC, 0x1)         = 0 0
      2 shm_unlink(0x10BA72130, 0x7FFF5418FADC, 0x1)         = 0 0
      8 write_nocancel(0x2, "Caught Segmentation fault: 11\n\0", 0x1E)       = 30 0
wolfcw commented 6 years ago

Could you please try building from source on macOS 10.11?

Actually, libfaketime 0.9.7 is supposed to run on Sierra (10.12) and High Sierra (10.13), but if it compiles cleanly on your El Capitan (10.11), it should work there also. Otherwise, v0.9.6 is recommended for El Capitan.

I've just seen that the official Homebrew build requires Lion only, while the brew formula we provide here requires Sierra. I guess we need to get that fixed if it doesn't work properly on El Capitan.

leonklingele commented 6 years ago

Sorry for the late response. Unfortunately, neither latest master, v0.9.7 nor v0.9.6 (compiled from source on OS X 10.11) produced a different result.

wolfcw commented 5 years ago

please try latest HEAD and reopen if it persists

leonklingele commented 5 years ago

Latest master (aa091db2867318693192fe72a6e404ca4f9ebc48) still crashes:

$ sudo dtruss -e ./src/faketime 'now' ls
 ELAPSD SYSCALL(args)        = return
      2 thread_selfid(0x0, 0x0, 0x0)         = 1416308 0
     22 open(".\0", 0x0, 0x1)        = 3 0
      3 fstat64(0x3, 0x7FFF59ED5780, 0x1)        = 0 0
      4 fcntl(0x3, 0x32, 0x7FFF59ED5A20)         = 0 0
      4 close(0x3)       = 0 0
     10 stat64("/path/to/libfaketime\0", 0x7FFF59ED56F0, 0x7FFF59ED5A20)         = 0 0
      3 csops(0x0, 0x0, 0x7FFF59ED5A20)      = 0 0
      0 issetugid(0x0, 0x0, 0x7FFF59ED5A20)      = 0 0
      2 shared_region_check_np(0x7FFF59ED3928, 0x0, 0x7FFF59ED5A20)      = 0 0
      7 stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF59ED4EB8, 0x7FFF59ED5A20)         = 0 0
     14 open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0)         = 3 0
      8 pread(0x3, "\312\376\272\276\0", 0x1000, 0x0)        = 4096 0
      3 pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x1000)       = 4096 0
      1 fcntl(0x3, 0x61, 0x7FFF59ED3200)         = 0 0
     25 mmap(0x0, 0x670, 0x5, 0x1, 0x3, 0x1000)      = 0x105D30000 0
      6 munmap(0x105D30000, 0x670)       = 0 0
     19 mmap(0x105D32000, 0x2000, 0x5, 0x12, 0x3, 0x1000)        = 0x105D32000 0
      4 mmap(0x105D34000, 0x1000, 0x3, 0x12, 0x3, 0x3000)        = 0x105D34000 0
      4 mmap(0x105D35000, 0x2F40, 0x1, 0x12, 0x3, 0x4000)        = 0x105D35000 0
      2 close(0x3)       = 0 0
      3 stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF59ED5438, 0x1)        = 0 0
      5 stat64("/usr/lib/libSystem.B.dylib\0", 0x7FFF59ED4CE8, 0x1)      = 0 0
      4 stat64("/usr/lib/system/libcache.dylib\0", 0x7FFF59ED48F8, 0x1)      = 0 0
      3 stat64("/usr/lib/system/libcommonCrypto.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      3 stat64("/usr/lib/system/libcompiler_rt.dylib\0", 0x7FFF59ED48F8, 0x1)        = 0 0
      3 stat64("/usr/lib/system/libcopyfile.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      4 stat64("/usr/lib/system/libcorecrypto.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libdispatch.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
Caught Segmentation fault: 11
      3 stat64("/usr/lib/system/libdyld.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      3 stat64("/usr/lib/system/libkeymgr.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/liblaunch.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libmacho.dylib\0", 0x7FFF59ED48F8, 0x1)      = 0 0
      3 stat64("/usr/lib/system/libquarantine.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libremovefile.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_asl.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libsystem_blocks.dylib\0", 0x7FFF59ED48F8, 0x1)      = 0 0
      3 stat64("/usr/lib/system/libsystem_c.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      3 stat64("/usr/lib/system/libsystem_configuration.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      3 stat64("/usr/lib/system/libsystem_coreservices.dylib\0", 0x7FFF59ED48F8, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libsystem_coretls.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libsystem_dnssd.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      3 stat64("/usr/lib/system/libsystem_info.dylib\0", 0x7FFF59ED48F8, 0x1)        = 0 0
      3 stat64("/usr/lib/system/libsystem_kernel.dylib\0", 0x7FFF59ED48F8, 0x1)      = 0 0
      3 stat64("/usr/lib/system/libsystem_m.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      2 stat64("/usr/lib/system/libsystem_malloc.dylib\0", 0x7FFF59ED48F8, 0x1)      = 0 0
      3 stat64("/usr/lib/system/libsystem_network.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libsystem_networkextension.dylib\0", 0x7FFF59ED48F8, 0x1)        = 0 0
      3 stat64("/usr/lib/system/libsystem_notify.dylib\0", 0x7FFF59ED48F8, 0x1)      = 0 0
      2 stat64("/usr/lib/system/libsystem_platform.dylib\0", 0x7FFF59ED48F8, 0x1)        = 0 0
      3 stat64("/usr/lib/system/libsystem_pthread.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      2 stat64("/usr/lib/system/libsystem_sandbox.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libsystem_secinit.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libsystem_trace.dylib\0", 0x7FFF59ED48F8, 0x1)       = 0 0
      3 stat64("/usr/lib/system/libunc.dylib\0", 0x7FFF59ED48F8, 0x1)        = 0 0
      2 stat64("/usr/lib/system/libunwind.dylib\0", 0x7FFF59ED48F8, 0x1)         = 0 0
      3 stat64("/usr/lib/system/libxpc.dylib\0", 0x7FFF59ED48F8, 0x1)        = 0 0
      3 stat64("/usr/lib/libobjc.A.dylib\0", 0x7FFF59ED3BD8, 0x1)        = 0 0
      2 stat64("/usr/lib/libauto.dylib\0", 0x7FFF59ED3BD8, 0x1)      = 0 0
      3 stat64("/usr/lib/libc++abi.dylib\0", 0x7FFF59ED3AB8, 0x1)        = 0 0
      2 stat64("/usr/lib/libc++.1.dylib\0", 0x7FFF59ED3AB8, 0x1)         = 0 0
      3 stat64("/usr/lib/libDiagnosticMessagesClient.dylib\0", 0x7FFF59ED39A8, 0x1)      = 0 0
      1 getpid(0x7FFF820ED740, 0x7FFF59ED39A8, 0x1)      = 54885 0
     21 open("/dev/dtracehelper\0", 0x2, 0x7FFF59ED58E0)         = 3 0
 142434 ioctl(0x3, 0x80086804, 0x7FFF59ED5868)       = 0 0
      9 close(0x3)       = 0 0
      7 sysctl(0x7FFF59ED4F50, 0x2, 0x7FFF59ED4F60)      = 0 0
      1 thread_selfid(0x7FFF59ED4F50, 0x2, 0x7FFF59ED4F60)       = 1416308 0
      2 bsdthread_register(0x7FFF84874344, 0x7FFF84874334, 0x2000)       = 1073741887 0
      3 mprotect(0x105D38000, 0x88, 0x1)         = 0 0
      1 mprotect(0x105D3A000, 0x1000, 0x0)       = 0 0
      2 mprotect(0x105D50000, 0x1000, 0x0)       = 0 0
      1 mprotect(0x105D51000, 0x1000, 0x0)       = 0 0
      1 mprotect(0x105D67000, 0x1000, 0x0)       = 0 0
      2 mprotect(0x105D31000, 0x1000, 0x1)       = 0 0
      2 mprotect(0x105D38000, 0x88, 0x3)         = 0 0
      2 mprotect(0x105D38000, 0x88, 0x1)         = 0 0
      1 issetugid(0x105D38000, 0x88, 0x1)        = 0 0
      1 getpid(0x105D38000, 0x88, 0x1)       = 54885 0
      3 stat64("/AppleInternal/XBS/.isChrooted\0", 0x7FFF59ED4EB8, 0x1)      = -1 Err#2
      1 stat64("/AppleInternal\0", 0x7FFF59ED4E28, 0x1)      = -1 Err#2
      2 csops(0xD665, 0x7, 0x7FFF59ED4940)       = -1 Err#22
     35 sysctl(0x7FFF59ED4D00, 0x4, 0x7FFF59ED4A78)      = 0 0
      1 csops(0xD665, 0x7, 0x7FFF59ED4230)       = -1 Err#22
      2 proc_info(0x2, 0xD665, 0x11)         = 56 0
      5 pipe(0x2, 0xD665, 0x11)      = 3 0
 135867 fork()       = 54886 0
      3 close(0x4)       = 0 0
 327624 read(0x3, "1565630549\n\0", 0x100)       = 11 0
    209 wait4(0xD666, 0x7FFF59ED49D4, 0x0)       = 54886 0
      4 close(0x3)       = 0 0
      4 pipe(0x3, 0x7FFF59ED49D4, 0x0)       = 3 0
      8 sem_open(0x105D2B130, 0xA00, 0x180)      = 5 0
      4 shm_open(0x105D2C130, 0xA02, 0x180)      = 6 0
      3 ftruncate(0x6, 0x8, 0x180)       = 0 0
      7 mmap(0x0, 0x40, 0x3, 0x1, 0x6, 0x0)      = 0x105F68000 0
      2 sem_wait(0x5, 0x1000, 0x3)       = 0 0
      3 munmap(0x105F68000, 0x40)        = 0 0
      1 sem_post(0x5, 0x40, 0x3)         = 0 0
      2 sem_close(0x5, 0x40, 0x3)        = 0 0
      1 getrlimit(0x1008, 0x7FFF59ED4698, 0x3)       = 0 0
      5 open_nocancel("/usr/local/libfaketime.1.dylib\0", 0x0, 0x1B6)        = -1 Err#2
 186205 fork()       = 54887 0
      5 close(0x4)       = 0 0
 309181 wait4(0xD667, 0x7FFF59ED49AC, 0x0)       = 54887 0
      4 read(0x3, "\0", 0x1)         = 0 0
      6 sem_unlink(0x105D2B130, 0x7FFF59ED49AB, 0x1)         = 0 0
      3 shm_unlink(0x105D2C130, 0x7FFF59ED49AB, 0x1)         = 0 0
   3340 write_nocancel(0x2, "Caught Segmentation fault: 11\n\0", 0x1E)       = 30 0
   3617 thread_selfid(0x1, 0x7FFF59ED4290, 0x1E)         = 1416387 0
leonklingele commented 4 years ago

@wolfcw can you reopen this please?

wolfcw commented 4 years ago

stat64("/path/to/libfaketime\0", 0x7FFF59ED56F0, 0x7FFF59ED5A20) seems strange in your dtruss output and it's unclear where that comes from.

Unfortunately, I have no test environment for OS X 10.11, and I cannot reproduce the problem on newer macOS versions.

leonklingele commented 4 years ago

/path/to/libfaketime is the path to where the libfaketime repo resides.

Is there any debug patch available so we can pinpoint the issue?

wolfcw commented 4 years ago

You can pass -DDEBUG when building libfaketime, but I doubt it will help much, as it seems to crash before anything from libfaketime is executed at all.

Maybe you could try to DYLD_INSERT_LIBRARIES libfaketime directly (see README.OSX) instead of using the faketime wrapper. If we're lucky, it's just the wrapper crashing but libfaketime itself working.

Otherwise, maybe a diff between a dtruss run with and a dtruss run without libfaketime inserted might give a clue.

wolfcw commented 3 years ago

sorry, giving up on this.

DanielSmedegaardBuus commented 3 years ago

This seems like it's upstream, as I'm having the same issue with MacPorts-provided faketime on 10.10

EDIT: Oh, wait, this IS the upstream place :D

@leonklingele — did you find a previous version that works?