Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in RtlAllocateActivationContextStack/LdrInitializeThunk #369

Open
derekbruening opened this issue Nov 28, 2014 · 5 comments
Open

Comments

@derekbruening
Copy link
Contributor

From timurrrr@google.com on April 28, 2011 09:45:24

On the code from issue #360 and Win7 (not XP32), I see the following memory leak:

Error #1: LEAK 24 direct bytes 0x004fcdb8-0x004fcdd0 + 0 indirect bytes
0x77459fcb <ntdll.dll+0x39fcb> ntdll.dll!RtlAllocateActivationContextStack
??:0
0x7745a084 <ntdll.dll+0x3a084> ntdll.dll!RtlAllocateActivationContextStack
??:0
0x77459e5c <ntdll.dll+0x39e5c> ntdll.dll!RtlDecodePointer
??:0
0x77459e89 <ntdll.dll+0x39e89> ntdll.dll!LdrInitializeThunk
??:0

Derek, have you seen this leak before?

I'll re-run with symbols

Original issue: http://code.google.com/p/drmemory/issues/detail?id=369

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on April 28, 2011 06:55:27

Running
_NT_SYMBOL_PATH=C:\src\symbols ./bin/drmemory.exe -batch -- threads_win.exe
with "wntdll.pdb" in C:\src\symbols haven't changed a thing.

@derekbruening
Copy link
Contributor Author

From bruen...@google.com on April 28, 2011 07:10:45

xref issue #249 : RtlAllocateActivationContextStack leak auto-suppressed when
called from createthread but was not analyzed enough, should be revisited

xref issue #352 : RtlCreateActivationContext allocated by csrss

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on May 05, 2011 05:24:12

Also seen on our Win7 bot http://build.chromium.org/p/client.drmemory/builders/win-7_x64-drm/builds/1077/steps/Run%20TSan%20tests/logs/summary%3A%202%20report%28s%29 together with a probably-related stack:
Error #2: LEAK 44 direct bytes 0x002ae878-0x002ae8a4 + 44 indirect bytes
0x77ea1c1e <ntdll.dll+0x61c1e> ntdll.dll!EtwGetTraceEnableFlags
0x77e7a06d <ntdll.dll+0x3a06d> ntdll.dll!RtlAllocateActivationContextStack
0x77e79e2c <ntdll.dll+0x39e2c> ntdll.dll!RtlDecodePointer
0x77e79e59 <ntdll.dll+0x39e59> ntdll.dll!LdrInitializeThunk

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on May 05, 2011 06:42:59

... and these Vista guys are probably related too http://build.chromium.org/p/client.drmemory/builders/win-vista_x64-drm/builds/947/steps/Run%20TSan%20tests/logs/summary%3A%204%20report%28s%29 Error #2: LEAK 28 direct bytes 0x0c714260-0x0c71427c + 44 indirect bytes
0x77c6caae <ntdll.dll+0x3caae> ntdll.dll!RtlQueryAtomInAtomTable
0x77c637c7 <ntdll.dll+0x337c7> ntdll.dll!RtlAllocateActivationContextStack
0x77c9f6df <ntdll.dll+0x6f6df> ntdll.dll!LdrInitShimEngineDynamic
0x77c63603 <ntdll.dll+0x33603> ntdll.dll!LdrInitializeThunk

Error #4: LEAK 24 direct bytes 0x0c70fd88-0x0c70fda0 + 0 indirect bytes
0x77c6369a <ntdll.dll+0x3369a> ntdll.dll!RtlAllocateActivationContextStack
0x77c85e31 <ntdll.dll+0x55e31> ntdll.dll!RtlAllocateHeap
0x77c9f6df <ntdll.dll+0x6f6df> ntdll.dll!LdrInitShimEngineDynamic
0x77c63603 <ntdll.dll+0x33603> ntdll.dll!LdrInitializeThunk

@chuckleplant
Copy link

Hi there, not sure this helps but I just got these errors from ntdll.dll

Error #20: POSSIBLE LEAK 4096 direct bytes 0x0683f2b8-0x068402b8 + 0 indirect bytes
# 0 replace_RtlAllocateHeap                         [d:\drmemory_package\common\alloc_replace.c:3770]
# 1 KERNELBASE.dll!TlsSetValue                     +0x4e     (0x75c24730 <KERNELBASE.dll+0x14730>)
# 2 mdnsNSP.dll!NSPStartup                         +0x2d25   (0x052659f6 <mdnsNSP.dll+0x59f6>)
# 3 mdnsNSP.dll!NSPStartup                         +0x21a8   (0x05264e79 <mdnsNSP.dll+0x4e79>)
# 4 mdnsNSP.dll!NSPStartup                         +0x2263   (0x05264f34 <mdnsNSP.dll+0x4f34>)
# 5 ntdll.dll!RtlQueryEnvironmentVariable          +0x244    (0x77b49364 <ntdll.dll+0x39364>)
# 6 ntdll.dll!RtlAllocateActivationContextStack    +0x1ce    (0x77b49b72 <ntdll.dll+0x39b72>)
# 7 ntdll.dll!RtlDecodePointer                     +0xf6     (0x77b4985c <ntdll.dll+0x3985c>)
# 8 ntdll.dll!LdrInitializeThunk                   +0xf      (0x77b49889 <ntdll.dll+0x39889>)

Error #21: LEAK 4096 direct bytes 0x06845660-0x06846660 + 0 indirect bytes
# 0 replace_RtlAllocateHeap                         [d:\drmemory_package\common\alloc_replace.c:3770]
# 1 KERNELBASE.dll!TlsSetValue                     +0x4e     (0x75c24730 <KERNELBASE.dll+0x14730>)
# 2 mdnsNSP.dll!NSPStartup                         +0x2d25   (0x052659f6 <mdnsNSP.dll+0x59f6>)
# 3 mdnsNSP.dll!NSPStartup                         +0x21a8   (0x05264e79 <mdnsNSP.dll+0x4e79>)
# 4 mdnsNSP.dll!NSPStartup                         +0x2263   (0x05264f34 <mdnsNSP.dll+0x4f34>)
# 5 ntdll.dll!RtlQueryEnvironmentVariable          +0x244    (0x77b49364 <ntdll.dll+0x39364>)
# 6 ntdll.dll!RtlAllocateActivationContextStack    +0x1ce    (0x77b49b72 <ntdll.dll+0x39b72>)
# 7 ntdll.dll!RtlDecodePointer                     +0xf6     (0x77b4985c <ntdll.dll+0x3985c>)
# 8 ntdll.dll!LdrInitializeThunk                   +0xf      (0x77b49889 <ntdll.dll+0x39889>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants