A machine gets frozen when installing a LWF driver - c

everyone. I am developing the LWF version WinPcap. It is already finished and under internal test currently. A colleague shared a Win7 x64 virtual machine with me remotely. Then I tried to install my new WinPcap installer on it and the machine just got frozen when installing the driver. The strange thing is that only this machine has this problem. I tested my own Win7 x86/x64 and Win8 x86/x64, no this issue.
I seem to encounter an alike problem before, but it is a debug version. My machine got recovered when a kernel debugger like WinDbg or VS2012 was attached. I thought this is a "int 3" problem. But the driver in this installer is a release version. So I don't know if this is because of the same issue. It is difficult to attach that remote machine becasue we are from different countries.
Also this should not be a deadlock issue like NdisWaitEvent waiting for an impossible event. Because I encountered that deadlock before, it only blocked the network part of Windows. Like froze the network properties window, stopped you from rebooting and so on. You can still use the other part of Windows.
So why this frozen problem occurs?
Here is all the code of my driver if you like to read:
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/packetWin7/npf/npf/
The installer and other info are as below:
(Revision 32149)
Entire code base:
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF
The installer only:
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/installer/winpcap-nmap-4.1.3-NDIS6-1.2.0.exe
Build instructions:
https://svn.nmap.org/nmap-exp/yang/NPcap-LWF/README-builds.txt

Related

Gatekeeper fatal problems when building on macOS Big sur

I have serious problems with the "security" stuff. First, there is an installer package (PKG).
Works without problems on all (most?) macOS with catalina and newer (probably). But trying it on 10.11 and older results in macOS saying that it is corrupted or signature is invalid, and console contains this:
03.12.20 17:32:42,194 CoreServicesUIAgent[331]: Error -60005 creating authorization
It has been signed and notarized, so this looks like a bug in macOS.
And then there's another software we make, this time it is installed using an APP. Again, codesigned and notarized and works on most macOS systems, including the older ones, but this time there are rare machines, which end up with the exact same message and the console contains:
com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x10000006.setup.bin[2242]): removing service since it exited with consistent failurae - OSREASONEXEC | Gatekeeper policy blocked execution
Any ideas what is wrong exactly?
So it seems that Apple f*** up again - when you create installers on the new revolutionary awesome macOS Big sur, on some computers your installers won't pass Gatekeeper. Doing the same thing on Catalina -> everything fine. Damn you Apple...

WDK Driver load issue (The service cannot be started, either because it is disabled)

I have used windows 8.1 to write many drivers with no issues when loading what so ever. There seems to be some sort of issue when I try to load a new basic KMDF driver that I built in visual studio. I am able to edit source and compile new versions of driver projects built while on previous versions of windows and I assume WDK would be the true culprit here. I am able to load drivers that the original project was generated in Windows 8.1 even if I edit the source and recompile, but specifically If I try to create a new driver project through visual studio, namely the example base for Kernel Mode Driver, it fails to load with the error :
"The service cannot be started, either because it is disabled or because it has no enabled devices associated with it"
A couple points :
The driver fails to load with the same error every time, I have my own certified trusted certificate from digicert and I have tried disabling driver signature enforcement, both with the same error. So it is safe to say that certificates is not the issue.
The only main difference I can tell between the old and new WDK sources is the old version specifically has versions of windows to build from, but the new has "universal" although through settings it looks like it will just build for Windows 10.
I am not doing any stupid errors meaning, I am compiling x64, etc...
I'm starting to think that the WDK KMDF basic template may have some sort of issue with it.
I would rather not have to gut an old project (driver) to get a successful "new" driver to load.
Can you please specify is it a legacy driver or a pnp driver.
I faced a similar issue, but the mistake I was doing was compiling a pnp driver and trying to load it as a legacy driver.
To specify the difference for completion sake pnp would be a driver that comes with a AddDevice routine. Such driver are expected to have a start type as 0 and are loaded at boot time. Need to attach the driver to a specific device object in the add device routine.
The legacy drivers are one with no AddDevice routine and we call IoCreateDevice from DriverEntry itself.

Unable to remotely debug a Silverlight application (Mac <-> PC)

Having set up my Mac and PC per these instructions, I am nevertheless unable to attach to the process running in OS X.
"Unable to attach to the process. A debug component is not installed."
Anyone seen this before? I've Googled it, turned up nothing.
I got the exact same error message on my machine after I had windows update install a security update for Silverlight on windows. I think the root cause is different versions of the silverlight runtime. I recommend doing the following:
Make sure that both windows and mac have the developer runtime installed, and that it is the same version. The latest ones are here:
http://www.microsoft.com/en-us/download/details.aspx?id=36946
After doing that, relaunch the configuration generating program on OSX, generate a new configuration (top button), and then generate a new PC configuration (bottom button).
Close visual studio, run the configuration exe on windows, and open visual studio.
I followed these steps and was able to get remote debugging working again.

Why does a WPF app in a VM perform better than one running direct in the OS?

We have a higher-end Win7-64 Dell precision workstation notebook with an i7, 8 gigs of ram, tons of hd space and running dedicated AMD graphics. The machine is about a month old. It was one of the highest-end we could get at the time.
What we're experiencing is when we run our WPF/SQL Server (local) app, it tends to hang and stall, sometimes completely crashing, but mostly just hanging until we force it to close. However, the exact same installer running in a VMware virtual machine running on that same machine runs flawlessly. Actually, the VM install runs better than a lot of native installs on other machines. It's very snappy with no hangs or hesitations at all. But again, same app, same installer running direct in the OS, and we're back to the issues above.
We've ran all Windows updates.... we've tried completely reinstalling everything... .NET frameworks, SQL Server, video drivers, even updated the BIOS and checked for rogue services but it still happens.
At first we thought it was Symantec AV's real-time protection because when we first shut that off, things started getting snappy again (and slowed down and froze when it auto-re-enabled itself furthering this hypothesis) but then it just started slowing down again, and more surprising, that same AV is running in the VM without issue! Checked the exceptions but there weren't any.
We even tried forcing WPF to run in software-render mode but again, nothing.
Now the odd thing is this only seems to be happening on this and a few other machines, but we can't seem to find anything in common except they're all running Win7 64-bit. As such, we have absolutely no idea where to start. And since most are hangs, not crashes, we can't even look at the crash reports.
So can anyone give us any idea what else we can look at? This is holding up us shipping a three-years-in-the-making major release of our software so to say this is a show-stopper would be an understatement. We've been stumped for about a month now and getting nowhere fast.
Found it!! Turns out there's a bug in .NET 4.0 regarding UI Automation and the changes MS introduced. Here's the info, and the fix! (Note: Even if you call MS, they will send you a link, but it's always a broken link. I managed to track this down manually.)
Note: Their article talks about a specific case that causes this behavior, but if you google around, you'll see tons of issues around hangs related to those DLLs. The latest is they're promising a fix in the .NET 4.5 runtime (from a MS post on this issue.)
Here's the KB article...
http://support.microsoft.com/kb/2484841/en-us
...and here is the actual hotfix.
http://archive.msdn.microsoft.com/KB2484841/Release/ProjectReleases.aspx?ReleaseId=5583
Apparently the VM didn't suffer from this. We weren't sure if the VM had the hotfix applied or not or if this only happens on non-virtualized machines. Still, this solved all of the issues and the app is now snappy again. (Man, was this fun to track down! Ugh!!)

WPF d3d9.dll crash

I have several applications in WPF that periodically crash on 2 different servers (a dell poweredge and a HP proliant). The problem is that the WPF applications both crash within d3d9.dll. Rebooting the servers always fixes the problem. The problem only occurs a few times a month. Both servers are running Windows XP instead of Windows 2003.
Here is the event viewer application log entry for the crash
Faulting application iqlayer.exe, version 5.3.1.14, stamp 4a9d0d63, faulting module d3d9.dll, version 5.3.2600.2180, stamp 41109693, debug? 0, fault address 0x0003a756.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Once this problem occurs, all further WPF applications will not run until I reboot. I even tried running a test application which showed a blank window. The test app crashed immediately on start at d3d9.dll.
I found this KB which i think is related to my problem. However, i didnt install directX SDK on my server and dont know where to uncheck "Break on D3D9 Error".
Did you upgrade your video card drivers to the latest version?
I reckon there is no answer. I have rebooted the server and cant reproduce the problem :(

Resources