Project

General

Profile

Actions

Bug #11468

closed

Two mutexes leaked in Init_Thread

Added by scorpion007 (Alex Budovski) over 9 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

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)

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #11467: Memory leak in win32 signal initClosedActions

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • 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.

Actions #2

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • Related to Bug #11467: Memory leak in win32 signal init added
Actions

Also available in: Atom PDF

Like0
Like0Like0