Quantcast
Channel: Backup – Windows and Windows Server forum
Viewing all articles
Browse latest Browse all 1854

VSS restore steps leaking a couple of semaphore handles

$
0
0

This is a leak for semaphore, the stack was identified using htrace

Handle = 0x0000000000000df8 - OPEN

Thread ID = 0x00000000000015ec, Process ID = 0x0000000000000e94

0x0000000077ade41a: ntdll!ZwCreateSemaphore+0x000000000000000a
0x000007fefdae697a: KERNELBASE!CreateSemaphoreExW+0x000000000000005a
0x0000000077878e39: kernel32!CreateSemaphoreW+0x0000000000000019
0x000007fefa937233: VSSAPI!CVssBackupComponents::BasicInit+0x00000000000000cf
0x000007fefa9386c9: VSSAPI!CVssBackupComponents::InitializeForRestore+0x0000000000000329

..

----

This is a registry handle leak

Handle = 0x0000000000000eb0 - OPEN
Thread ID = 0x00000000000015ec, Process ID = 0x0000000000000e94

0x0000000077ade90a: ntdll!NtOpenKeyEx+0x000000000000000a
0x0000000077883692: kernel32!LocalBaseRegOpenKey+0x00000000000001f5
0x00000000778839d5: kernel32!RegOpenKeyExInternalW+0x0000000000000123
0x0000000077883a9d: kernel32!RegOpenKeyExW+0x000000000000001d
0x000007fefa914d83: VSSAPI!CVssRegistryKey::Open+0x00000000000001b6
0x000007fefa914fee: VSSAPI!CVssDiag::Initialize+0x0000000000000220
0x000007fefa9372ec: VSSAPI!CVssBackupComponents::BasicInit+0x0000000000000188
0x000007fefa9386c9: VSSAPI!CVssBackupComponents::InitializeForRestore+0x0000000000000329

I end my program with .release and routine calls. When I close my program, I do not want any leaks.

Any suggestions if these leaks could be eliminated?

The flow is pretty standard

InitializeForRestore

GatherWriterMetadata

SetSelectedForRestore

PreRestore

SetFileRestoreStatus

PostRestore

Release

thanks all,

-Vikrantl

<input id="c20ebec2-70d2-437f-aa18-da068e5285bb_attachments" type="hidden" />  

.dev


Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>