From: merch-redmine@... Date: 2019-07-03T21:57:42+00:00 Subject: [ruby-core:93521] [Ruby master Bug#11468] Two mutexes leaked in Init_Thread Issue #11468 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed `Init_Thread` is only called once on Ruby startup. There are 3 mutexes initialized in `Init_Thread` in the master branch. It appears that these mutexes are used, so I wouldn't consider them leaked. 2 of the mutexes appear to be destroyed on shutdown in `rb_vm_gvl_destroy`. I think the third may be destroyed on shutdown in `thread_cleanup_func`, but I couldn't confirm that. Anyway, this doesn't appear to be an actual memory leak. ---------------------------------------- Bug #11468: Two mutexes leaked in Init_Thread https://bugs.ruby-lang.org/issues/11468#change-79082 * Author: scorpion007 (Alex Budovski) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- 48 bytes each. ~~~ native_mutex_initialize(&th->vm->thread_destruct_lock); native_mutex_initialize(&th->interrupt_lock); ~~~ ~~~ + 48 ( 48 - 0) 1 allocs BackTrace9CB2F14B + 1 ( 1 - 0) BackTrace9CB2F14B allocations ntdll!RtlpCallInterceptRoutine+40 (d:\blue\minkernel\ntos\rtl\heappriv.h, 3625) ntdll!RtlAllocateHeap+79836 (d:\blue\minkernel\ntos\rtl\heap.c, 1892) ntdll!RtlpAddDebugInfoToCriticalSection+12 (d:\blue\minkernel\ntdll\resource.c, 2518) ntdll!RtlInitializeCriticalSection+5656D (d:\blue\minkernel\ntdll\resource.c, 2107) rubyprov!native_mutex_initialize+17 (e:\dev\ruby\thread_win32.c, 385) rubyprov!Init_Thread+8BD (e:\dev\ruby\thread.c, 5142) rubyprov!rb_call_inits+C7 (e:\dev\ruby\inits.c, 58) rubyprov!ruby_setup+C6 (e:\dev\ruby\eval.c, 63) ~~~ ~~~ + 48 ( 48 - 0) 1 allocs BackTrace9CB2F00B + 1 ( 1 - 0) BackTrace9CB2F00B allocations ntdll!RtlpCallInterceptRoutine+40 (d:\blue\minkernel\ntos\rtl\heappriv.h, 3625) ntdll!RtlAllocateHeap+79836 (d:\blue\minkernel\ntos\rtl\heap.c, 1892) ntdll!RtlpAddDebugInfoToCriticalSection+12 (d:\blue\minkernel\ntdll\resource.c, 2518) ntdll!RtlInitializeCriticalSection+5656D (d:\blue\minkernel\ntdll\resource.c, 2107) rubyprov!native_mutex_initialize+17 (e:\dev\ruby\thread_win32.c, 385) rubyprov!Init_Thread+8AA (e:\dev\ruby\thread.c, 5140) rubyprov!rb_call_inits+C7 (e:\dev\ruby\inits.c, 58) rubyprov!ruby_setup+C6 (e:\dev\ruby\eval.c, 63) ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: