Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Assert in TlsObjectDestructor #2480

@christianscheuer

Description

@christianscheuer

I'm hitting an assert in [PalRedhawkUnix.cpp line 420]:(

ASSERT(data == pthread_getspecific(g_threadKey));
)

// Destructor of the thread local object represented by the g_threadKey,
// called when a thread is shut down
void TlsObjectDestructor(void* data)
{
    ASSERT(data == pthread_getspecific(g_threadKey));

    RuntimeThreadShutdown(data);
}

Stacktraces:

  2712 Thread_1001544   DispatchQueue_1: com.apple.main-thread  (serial)
    + 2712 start  (in libdyld.dylib) + 1  [0x7fff9472b5c9]
    +   2712 main  (in demoapp) + 258  [0x100014242]
    +     2712 __managed__Main  (in demoapp) + 87  [0x100128893]
    +       2712 src_DemoApp_Program__Main  (in demoapp) + 106  [0x10013006e]
    +         2712 src_Mac_CoreFoundation_CFRunLoop__CFRunLoopRun  (in demoapp) + 33  [0x10013083d]
    +           2712 CFRunLoopRun  (in CoreFoundation) + 97  [0x7fff8e62c671]
    +             2712 CFRunLoopRunSpecific  (in CoreFoundation) + 296  [0x7fff8e574bd8]
    +               2712 __CFRunLoopRun  (in CoreFoundation) + 1371  [0x7fff8e57537b]
    +                 2712 __CFRunLoopServiceMachPort  (in CoreFoundation) + 212  [0x7fff8e575eb4]
    +                   2712 mach_msg  (in libsystem_kernel.dylib) + 55  [0x7fff987bd64f]
    +                     2712 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff987be4de]
    5424 Thread_<multiple>   DispatchQueue_10: com.apple.root.default-qos  (serial)
    + 5424 start_wqthread  (in libsystem_pthread.dylib) + 13  [0x7fff919f03dd]
    +   5424 _pthread_wqthread  (in libsystem_pthread.dylib) + 729  [0x7fff919f2a9d]
    +     5424 _dispatch_worker_thread3  (in libdispatch.dylib) + 91  [0x7fff8c24ea1c]
    +       5424 _dispatch_root_queue_drain  (in libdispatch.dylib) + 935  [0x7fff8c24edc7]
    +         5424 _dispatch_client_callout  (in libdispatch.dylib) + 8  [0x7fff8c24be73]
    +           5424 src_Mac_CoreFoundation_DispatchQueue__static_dispatcher_to_managed  (in demoapp) + 137  [0x100176ad1]
    +             2712 src_DemoApp_CommunicationService__ConsoleReader  (in demoapp) + 16  [0x10014cfc0]
    +               2712 System_Console_System_IO_SyncTextReader__ReadLine  (in demoapp) + 61  [0x100201705]
    +                 2712 System_Console_System_IO_StdInReader__ReadLine_0  (in demoapp) + 122  [0x10024107a]
    +                   2712 System_Console_System_IO_StdInReader__ReadKey  (in demoapp) + 256  [0x10027c31c]
    +                     2712 System_Console_Interop_Sys__ReadStdin  (in demoapp) + 66  [0x10029c4e2]
    +                       2712 read  (in libsystem_kernel.dylib) + 10  [0x7fff987c4682]
    2712 Thread_1001575   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
    + 2712 _dispatch_mgr_thread  (in libdispatch.dylib) + 52  [0x7fff8c25026e]
    +   2712 kevent64  (in libsystem_kernel.dylib) + 10  [0x7fff987c4232]
    2712 Thread_1001576
    + 2712 start_wqthread  (in libsystem_pthread.dylib) + 13  [0x7fff919f03dd]
    +   2712 _pthread_wqthread  (in libsystem_pthread.dylib) + 879  [0x7fff919f2b33]
    +     2712 _pthread_exit  (in libsystem_pthread.dylib) + 117  [0x7fff919f2460]
    +       2712 _pthread_tsd_cleanup  (in libsystem_pthread.dylib) + 86  [0x7fff919f2739]
    +         2712 TlsObjectDestructor(void*)  (in demoapp) + 76  [0x10010b80c]
    +           2712 Assert(char const*, char const*, unsigned int, char const*)  (in demoapp) + 19  [0x100016163]
    2712 Thread_1001579
    + 2712 start_wqthread  (in libsystem_pthread.dylib) + 13  [0x7fff919f03dd]
    +   2712 __workq_kernreturn  (in libsystem_kernel.dylib) + 10  [0x7fff987c394a]
    2712 Thread_1001580
    + 2712 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff919f03ed]
    +   2712 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x7fff919f2fd7]
    +     2712 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x7fff919f305a]
    +       2712 FinalizerStart(void*)  (in demoapp) + 170  [0x10001d15a]
    +         2712 ProcessFinalizers  (in demoapp) + 52  [0x1001294f0]
    +           2712 RhpWaitForFinalizerRequest  (in demoapp) + 45  [0x100018d2d]
    +             2712 PalWaitForSingleObjectEx(void*, unsigned int, unsigned int)  (in demoapp) + 33  [0x10001e3a1]
    +               2712 WaitForSingleObjectEx  (in demoapp) + 105  [0x10010cd29]
    +                 2712 UnixEvent::Wait(unsigned int)  (in demoapp) + 207  [0x10010e38f]
    +                   2712 __psynch_cvwait  (in libsystem_kernel.dylib) + 10  [0x7fff987c3136]
    2712 Thread_1001585
    + 2712 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff919f03ed]
    +   2712 _pthread_start  (in libsystem_pthread.dylib) + 176  [0x7fff919f2fd7]
    +     2712 _pthread_body  (in libsystem_pthread.dylib) + 131  [0x7fff919f305a]
    +       2712 read  (in libsystem_kernel.dylib) + 10  [0x7fff987c4682]
    2712 Thread_1001748
      2712 start_wqthread  (in libsystem_pthread.dylib) + 13  [0x7fff919f03dd]
        2712 __workq_kernreturn  (in libsystem_kernel.dylib) + 10  [0x7fff987c394a]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions