Re: accumulating handles problem on machine running postgresql

From: Adam Bruss <abruss(at)awrcorp(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: accumulating handles problem on machine running postgresql
Date: 2012-03-01 17:20:48
Message-ID: D81DB5ADDC5C3B4484C581AF3D8EFF9D1A6263C4@ex2a.awr.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

After doing some more work with Process Monitor I found the leaks to be stemming from a driver associated with a License Manager from SafeNet Inc. which runs on the machine.

Adam Bruss
Senior Development Engineer
AWR Corporation
11520 N. Port Washington Rd., Suite 201
Mequon, WI  53092  USA
P: 1.262.240.0291 x104
F: 1.262.240.0294
E: abruss(at)awrcorp(dot)com
W: http://www.awrcorp.com

-----Original Message-----
From: dennis jenkins [mailto:dennis(dot)jenkins(dot)75(at)gmail(dot)com]
Sent: Wednesday, February 29, 2012 12:25 PM
To: Adam Bruss
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] accumulating handles problem on machine running postgresql

On Wed, Feb 29, 2012 at 8:54 AM, Adam Bruss <abruss(at)awrcorp(dot)com> wrote:
> I ran process explorer and looked at the handles for the System process. The vast majority of the handles are of type "Key". I can find them in the registry. I took two at random from process explorer and exported the registry branch for them below.
>
> ## EXAMPLE  1: ##
>
> Key Name:          HKEY_CLASSES_ROOT\CLSID\{9F074EE2-E6E9-4d8a-A047-EB5B5C3C55DA}
> Class Name:        <NO CLASS>
> Last Write Time:   2/28/2012 - 1:26 AM
> Value 0
>  Name:            <NO NAME>
>  Type:            REG_SZ
>  Data:            HwTextInsertion Class
>
>
> Key Name:          HKEY_CLASSES_ROOT\CLSID\{9F074EE2-E6E9-4d8a-A047-EB5B5C3C55DA}\InprocServer32
> Class Name:        <NO CLASS>
> Last Write Time:   2/29/2012 - 4:05 AM
> Value 0
>  Name:            <NO NAME>
>  Type:            REG_EXPAND_SZ
>  Data:            %CommonProgramFiles%\microsoft shared\ink\tiptsf.dll
>
> Value 1
>  Name:            ThreadingModel
>  Type:            REG_SZ
>  Data:            Apartment

Seems like your web server is leaking registry keys used when loading
COM objects. The sample that you posted is for the "Tablet PC Input
Panel Text Services Framework" [1]. However, I find it strange that
a) IIS needs this and b) that it would leak it.

Are you able to obtain a large statistical sample of the leaked
registry keys? 2 out of 130,000 seems like a small sample.

Try the command line "handle.exe" tool [2]. It can dump to a text
file that you can then analyze with perl, python, grep, etc... or your
own eyeballs. :) See if the handle list is dominated by a specific
set of registry keys.

[1] http://systemexplorer.net/filereviews.php?fid=515344
[2] http://technet.microsoft.com/en-us/sysinternals/bb896655

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2012-03-01 17:25:58 Re: Ident authentication failed for user
Previous Message Ruben Blanco 2012-03-01 17:02:58 Ident authentication failed for user