Closed pablo-mendoza closed 5 years ago
openlog() is hanging:
__psynch_mutexwait + 10 frame #1: 0x00007fff6a548b9d libsystem_pthread.dylib
_pthread_mutex_lock_wait + 83
frame #2: 0x00007fff6a5464c8 libsystem_pthread.dylib_pthread_mutex_lock_slow + 253 frame #3: 0x00007fff6a53932b libsystem_notify.dylib
registration_node_find + 38
frame #4: 0x00007fff6a53a7d9 libsystem_notify.dylibnotify_check + 96 frame #5: 0x00007fff6a2d2cec libsystem_c.dylib
notify_check_tz + 32
frame #6: 0x00007fff6a2d28d7 libsystem_c.dylibtzsetwall_basic + 43 frame #7: 0x00007fff6a2d483d libsystem_c.dylib
localtime_r + 41
frame #8: 0x00007fff6a2d496d libsystem_c.dylibctime_r + 21 frame #9: 0x00000001000add73 libretrace_v2.0.dylib
retrace_logger_log_json(module=4, sev=1, msg_value=0x000000010045eed0) at logger.c:284
frame #10: 0x00000001000adc57 libretrace_v2.0.dylibretrace_logger_log(module=4, sev=1, fmt="Running action %s, for %s:%p, tpid 0x%llx...") at logger.c:253 frame #11: 0x00000001000a4e02 libretrace_v2.0.dylib
retrace_engine_wrapper(func_name="calloc", arch_spec_ctx=0x00007ffeefbff738) at engine.c:332
frame #12: 0x00000001000b19af libretrace_v2.0.dylibcalloc_retrace_wrapper at funcs_symbols.S:195 frame #13: 0x00007fff6a53892d libsystem_notify.dylib
name_node_for_name + 129
frame #14: 0x00007fff6a539801 libsystem_notify.dylibclient_registration_create + 185 frame #15: 0x00007fff6a53963d libsystem_notify.dylib
notify_register_check + 572
frame #16: 0x00007fff6a26835f libsystem_asl.dylib_asl_notify_open + 104 frame #17: 0x00007fff6a2682eb libsystem_asl.dylib
asl_open + 52
frame #18: 0x00007fff6a27c063 libsystem_asl.dylibopenlog + 164 frame #19: 0x0000000100000ec5 log
main at log.c:15
frame #20: 0x00007fff6a230015 libdyld.dylib`start + 1Fixed by #389. I had to remove a bit of funcionality (report time as a timestamp rathern than a local time string) as the convertion to localtime in macOS creates all sort of problems. Now all tests seem to be passing in v2 for macOS.
If the traced program calls putenv(char *) under retrace it crashes with this stack:
_os_unfair_lock_recursive_abort + 23 frame #1: 0x00007fff6a541710 libsystem_platform.dylib
_os_unfair_lock_lock_slow + 226 frame #2: 0x00007fff6a2dd341 libsystem_c.dylibgetenv + 34 frame #3: 0x00007fff6a2d2a6a libsystem_c.dylib
_st_tzset_basic + 47 frame #4: 0x00007fff6a2d483d libsystem_c.dyliblocaltime_r + 41 frame #5: 0x00007fff6a2d496d libsystem_c.dylib
ctime_r + 21 frame #6: 0x00000001000add73 libretrace_v2.0.dylibretrace_logger_log_json(module=4, sev=1, msg_value=0x000000010020da30) at logger.c:284 frame #7: 0x00000001000adc57 libretrace_v2.0.dylib
retrace_logger_log(module=4, sev=1, fmt="Running action %s, for %s:%p, tpid 0x%llx...") at logger.c:253 frame #8: 0x00000001000a4e02 libretrace_v2.0.dylibretrace_engine_wrapper(func_name="malloc", arch_spec_ctx=0x00007ffeefbff368) at engine.c:332 frame #9: 0x00000001000b1a6f libretrace_v2.0.dylib
malloc_retrace_wrapper at funcs_symbols.S:197 frame #10: 0x00007fff6a2e1f27 libsystem_c.dylib_owned_ptr_alloc + 17 frame #11: 0x00007fff6a2e1fa0 libsystem_c.dylib
initenv_owned_locked + 38 frame #12: 0x00007fff6a2df0b2 libsystem_c.dylibputenv + 52 frame #13: 0x0000000100000f3f env
main at env.c:35 frame #14: 0x00007fff6a230015 libdyld.dylib`start + 1