Re: Using AppVerifier with ASP.NET

From: Ivan Brugiolo [MSFT] (ivanbrug_at_online.microsoft.com)
Date: 12/18/04


Date: Fri, 17 Dec 2004 22:53:04 -0800

Assuming you have the latest debugger package installed
the Heaps, Locks, and Handles verification layers can be enabled in this
very simple way
c:\debuggers>gflags -v image /enable aspnet_wp.exe FULL_PAGE_HEAP
HANDLE_CHECKS LOCK_CHECKS
without using the Appcompat Toolkit.

The above listed verification layer are non supposed to generate any kind of
logs.
Instead, they are supposed to generate Access Violation,
Invalid Handle Exceptions, and/or to trigger hard-coded breakpoints.

Using appverif.exe may cause the shim engine to inject extra code in the
process.

For the debugger from ImageFileExecutionOptions,
you should consider the remoting infrastrucutre of ntsd/windbg/cdb.

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\aspnet_wp.exe
    Debugger = REG_SZ "c:\debuggers\ntsd.exe -noio -server
tcp:port=5500:5600 -g -G"

and then you can connect to the (invisible) debugger via
c:\debuggers>cdb.exe -remote tcp:server=localhost,port=5500

The debugger should have a message like this in the debugger

Page heap: pid 0x138: page heap enabled with flags 0x3.
AVRF: calc.exe: pid 0x138: flags 0x40005: application verifier enabled
ModLoad: 5a610000 5a626000 D:\WINDOWS\system32\verifier.dll
AVRF: verifier.dll provider initialized for calc.exe with flags 0x40005

when verifier is enabled.

And, you should consider using Win2003 as a platform for the test.

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Christian Laforte" <claforte@dakis.com> wrote in message
news:#0lNlwG5EHA.2452@TK2MSFTNGP14.phx.gbl...
> Hello,
>
>     Our company is trying to pass Microsoft Platform certifications our
core
> product. Our product uses a web service implemented with ASP.NET 1.1.
> According to the requirements for the certification, we need to use
> AppVerifier on the product and verify that no heap, handles or locks are
> leaked. I have been unable to do so despite three days of trial and error.
> Here are the steps I have followed so far:
>
>     1. I have read all of the available documentation I could find:
"Testing
> Applications with AppVerifier" [1] and "Debugging Services for Application
> Compatibility Testing" [2]. I have installed WinDbg, and I have been able
to
> use AppVerifier on regular applications.
>     2. On Windows XP Pro, I have added the 1.1 version of the
aspnet_wp.exe
> process, to the list in AppVerifier.
>     3. I then had to increase the permissions on the ASPNET user so it
would
> run again (I made it a power user for the duration of the test). Otherwise
> the process would never start, and the event viewer showed that there was
no
> permission for aspnet_wp.exe to run some of the AppVerifier-specific
> libraries.
>     3. I tried changing the registry as described in [2], to ensure that
> windbg runs aspnet_wp.exe.
>     4. I then killed aspnet_wp.exe and waited a bit for it to restart,
which
> it did.
>     5. I ran a client application that uses the web service. The web
service
> works perfectly.
>     6. The problem I have, is that no log seems to be produced by
> AppVerifier. Even if I select "`Show all" in the Logs window, I only see
> other application that I ran earlier.
>
>     Also, on this machine I have the latest Whidbey beta installed... but
I
> have made sure that IIS and other applications I am testing are using
> ASP.NET 1.1.
>
>    Can anybody confirm that it is possible to use AppVerifier on an
ASP.NET
> application or web service? Could anyone guide me through the necessary
> steps? Considering that Microsoft is encouraging web services and asp.net,
I
> find the absence of documentation on exactly how to get this stuff
certified
> quite disappointing.
>
>     Thanks,
>
> Christian Laforte
> Director of R&D, Dakis Decision Systems
>
>


Relevant Pages

  • Re: trap in malloc on 2000 terminal server
    ... For the error in the debugger extension, looks like you have an old debugger ... some operation that has an undefined behavior beforehand. ... On average, heap corruption shows up as crashes in random places, ... What is the logic of malloc? ...
    (microsoft.public.win32.programmer.kernel)
  • Re: trap in malloc on 2000 terminal server
    ... For the error in the debugger extension, looks like you have an old debugger ... some operation that has an undefined behavior beforehand. ... On average, heap corruption shows up as crashes in random places, ... What is the logic of malloc? ...
    (microsoft.public.win32.programmer.tools)
  • Re: Debuggers Kill Printing.
    ... debugger is attached I only see the crash after a break point ... Maybe you have some latent heap corruption that is exposed ... is this hypothesis consistent with the observation that when the debugger is attached I only see the crash after a break point? ... Does GDI make temporary allocations on the application's heap? ...
    (microsoft.public.development.device.drivers)
  • Re: Debug OK! Release Wrong! - ntdll.dll heap manager
    ... which indicates the ntdll.dll is detecting some ... > the heap manager in ntdll.dll is checkin for the debugger and acts ... ModLoad: 7c940000 7c9dd000 ntdll.dll ...
    (microsoft.public.vc.language)
  • Re: AppVerifier without Debugger?
    ... You are able to run AppVerifier without breaking into the debugger. ... alter the verifier stop properties (UI: ... I would like to run a 24-hour load test with AppVerifier. ...
    (microsoft.public.win32.programmer.tools)

Loading