DifxApp hungs when assigning Tag for Group thus making msiexec.exe to hung forever

Hello everyone,

It seems like I’ve found an issue with DifxApp related to assigning Tags for Groups. At particular cases DifxApp makes the msiexec.exe to hung.

To make long story short. I am using msi + difxapp to install my driver (mydriver). Recently some customer complained that they can’t install my driver becase MSI hungs, and the driver registry key (HKLM/CurrentControlSet/Services/mydriver - contains no values (no ImagePath, no Tag, no Group, etc).

Short info: I need to assign my driver in PNP_TDI group to load before netbt.sys. I use latest difxapp from WDK 7. I run Windows 7 x32.

I started to research on this, and I noticed that PNP_TDI group contains a huge amount of Tags on that machine while there are only a few drivers referring to it. For example, number of drivers registered in PNP_TDI: 5, but the number of Tags in group is 16.

I decided to play around this and I wrote a tool which fills PNP_TDI with fake values and then run msiexec and see if it hungs. At some point, I was able to reproduce the problem and I attached with OllyDbg to hunging msiexec.exe process.

After I attached I picked up the most time consuming thread and analyzed the stack. The thread was spining somewhere near place when accessing registry for mydriver/Tag.

I assume that difxapp was enumerating all drivers which belong to PNP_TDI and was searching for a “free Tag” to assign to mine driver. But because my PNP_TDI was full of fake values (I am able to repro the problem with 16 Tags) it went crazy.

I exported my registry settings for PNP_TDI and so now I can reproduce the problem on any Windows 7 machine. I install fresh Windows 7, import my PNP_TDI tags, I fire my MSI and it hungs in DifxApp code :slight_smile:

If I clean PNP_TDI, i.e. all irreleval tags it works :). Does anyone encounter such problem?

The most funny thing is that I have no error entries in installation log (I run msiexec with /l*v). Is there any way to enable extra debug logs for difxapp?

Thanks.

AFAIK DIFxAPP does not care one hoot about anything to do with service entry
provisioning but instead just relies on the class installers to do the work.

Are you sure this is ‘hung’ in DIFxAPP code and not the class installer?

By any chance is this a NetService class INF? (What class of driver are you
installing)

Well there you go! An answer. You can probably write that as a Custom
Action in an hour or two. Heck, you can even do it in VBScript if you don’t
want to deal with a DLL based CA.

Good Luck,
Dave Cattley

Hello David,

>Are you sure this is ‘hung’ in DIFxAPP code and not the class installer? By any chance is this a NetService class INF? (What class of driver are you installing)<<

Yes, this is NetService class I am installing. The only thing I am sure is that it hungs somewhere in difxapp code - I decompiled afterwards the dll which msiexec was loading and running as it seems from call stack. It was difxapp …

>Well there you go! An answer. You can probably write that as a Custom Action in an hour or two. Heck, you can even do it in VBScript if you don’t want to deal with a DLL based CA.<<

It is already written. The thing is that I feel bad about this. It is a workaround, and I would like someone from Microsoft to fix it so that in future people would not loose “men-hours” of work, trying to debug weird difxapp issues.

In fact, if difxapp would be an open source, things would go a way much more easier in terms of troubleshooting.

My story has a continuation.

On my Windows 7 snapshot with PNP_TDI group with fake Tags I can reproduce the case even using depinst and a generic inf file from WDK example directory (i.e., WinDDK\7600.16385.1\src\setup\infs\clasfilt\ClasFilt.inf )

The funny thing is that depinst does not fail, everything is said to be successfull but the driver registry key is empty.

I can reproduce this problem in Vista and 7.

The second funny thing is that I was trying to go debug msiexec and so I decided to run it under Application Verifier with minimalistic checks. It just crashes in no time with checks without low memory simulation.

Is there anyone I can contact regarding difxapp framework regarding this issue? Or it is better to let it go like this? :slight_smile:

DIFxAPP is a WDK component. I think that qualifies for the bug-bash.
Submit it and see…

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@shcherbyna.com
Sent: Wednesday, November 10, 2010 10:27 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] DifxApp hungs when assigning Tag for Group thus making
msiexec.exe to hung forever

My story has a continuation.

On my Windows 7 snapshot with PNP_TDI group with fake Tags I can reproduce
the case even using depinst and a generic inf file from WDK example
directory (i.e., WinDDK\7600.16385.1\src\setup\infs\clasfilt\ClasFilt.inf )

The funny thing is that depinst does not fail, everything is said to be
successfull but the driver registry key is empty.

I can reproduce this problem in Vista and 7.

The second funny thing is that I was trying to go debug msiexec and so I
decided to run it under Application Verifier with minimalistic checks. It
just crashes in no time with checks without low memory simulation.

Is there anyone I can contact regarding difxapp framework regarding this
issue? Or it is better to let it go like this? :slight_smile:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer