Unkillable processes often hang for a long time - process

Since re-installing Windows 7 Ultimate 64-bit SP1, sometimes processes take a long time to close. This happens most frequently when launching them from VS2010, but it's not limited to that. A common case is a Windows app with a console (/SUBSYSTEM:console) that appears to close correctly, but the console remains open for seconds or minutes. Eventually the "press any key to close" message appears on the console, and the process can be terminated.
How can I diagnose this problem?
I installed Windows 7 Ultimate 64-bit SP1, but this time the vanilla (not N) version
The only driver I manually installed is the NVIDIA display driver, but I've tried multiple WHQL versions
The symptoms closely match the question at
Visual studio debug console sometimes stays open and is impossible to close Even non-console apps are affected, however.
Both native and managed applications suffer from this.
WRONG: I believed only 32-bit processes were affected, but 64-bit ones also suffer.
if a debugger is already attached, and I break while the process is waiting, the debugger
says:
The process appears to be deadlocked (or is not running any
user-mode code). All threads have been stopped.
I can't attach a debugger to a process while its in this state
I can't kill these zombie processes from Task Manager or
ProcessExplorer, even when closing all handles that refer to said
processes. (I can't close lsass.exe's handles, though)
ProcessExplorer says that the hanging function of the only thread
that the each hung process has is ntdll!RtlDosSearchPath_Ustr.
Most of the time I have to close Visual Studio completely to allow
the zombie processes to close.
The last event that Process Monitor sees at the hang in each case is
a Thread Exit, which succeeds, and it looks like the exit takes the
normal amount of time. When the process finally closes, no events
show up.
LiveKd doesn't show anything when I follow the steps outlined at
http://blogs.technet.com/b/markrussinovich/archive/2005/08/17/unkillable-processes.aspx
It seems like a bad driver is the culprit, so I'm going to reinstall Windows soon.

Related

Hsmartwindow doesnt show image in .net program on production pc

My first stack overflow question, here we go.
Last week the computer on which a prototype vision application written in C#/.net was running crashed due to an unreleated reason. this resulted in the need to fresh install windows (windows 10 IOT). after installing windows, halcon 20.11 progress and setting the licenses the application starts, but no output is shown on the smart window control, even tho this worked beforehand?
i have been trying to debug this problem for the last day, but have had no luck, what i have allready tried:
used the remote debugging toe verify that the image is captured and processed and "displayed".
checked the system logs for any warnings, there were none.
Tried one of the example programs the come with Halcon, which also does **not **work.
Ran the application on my development PC, which worked flawlessly as it always did.
Reinstalling Halcon.
does anyone have had any similar experiences and/or any clue how to solve this problem?
problem has been solved. in the end a reset of the bios settings to there default values did the trick. Don't know what they exact cooperative was, but at least it works once again.

Expo run from WSL causes my internet to drop out

A react native expo app run within WSL, is the cause of a very annoying bug.
A few minutes after starting the Expo project, the internet on the windows laptop stops working.
I found this command fixes it:
Restart-Service LxssManager - when run from Powershell
However, this happens many times a day and means I have to restart the Expo project every time.
Related to: https://askubuntu.com/questions/1203412/wsl-causing-my-internet-to-not-work
Equally crazily, the fingerprint sensor on my laptop stops working and works again after that command is run.
I suspect the issue is somehow related to a very short (2-5 minute) timeout related to the react native app.
If anyone is able to point in any direction, I would love any help.
Maybe it's Expo or maybe I have some kind of local app code error. But I wouldn't know where to even start or test a bug like that.
Here is a basic run-through of what happens.
Start Expo app in WSL
Work, for an indefinite time
If PC activity pauses for longer than 3 min, the error happens. No internet, no fingerprint sensor.
Run the PowerShell command, restart the app. All is good again.
This is a known bug in WSL. Microsoft has solved this bug in build 18890. https://github.com/MicrosoftDocs/WSL/blob/live/WSL/release-notes.md#build-18890
It happens when a process in WSL creates and closes a large number of non-blocking TCP sockets, and after that some ephemeral TCP ports are leaked, eventually exhausting all ephemeral ports in both the host and the WSL.
You can try upgrading your system to version 2004 or 20H2 and see if this problem persists.

No error, but program won't start on WIn 8?

I have written a program in VB.Net and run it for a few years on Vista and Win 7 without issue. It is a requirements management tool front end to an Access or SQLServer backend database.
A few months ago I installed it on Win 8. It is a 64-bit version of my program running on a 64-bit laptop. It installs fine and runs OK initially. However, after a few weeks it stops running. This has happened twice, the last time after 28 days.
When I try to run the program nothing happens - no splash screen, no error message, no entry in the Applications Log in Event Viewer - just nothing happens. The only solution has been to re-install the program and then it starts working again.
I have tried: turning off all malware, firewall and anti-virus programs; running the program as Administrator; running in various compatibility modes. Nothing happens.
I also tried removing the license file from the program directory. When I did that I did get an error message in the Application Log in Event Viewer, so the program is trying to start. But when I returned the license file it still won't start and there is no error message in the log file.
Program was written in VS 2008 under .Net framework 3.5. I don't think this is an issue, since it runs fine for about a month after install. Also, it is not the license file. The license is perpetual, and anyway if it fails the license there is a splash screen that comes up, and that is not happening.
Can anyone suggest where I might look in Win 8 to try and work out what is going on when I try to start the program?
UPDATE: Through using the Reliability Monitor I have just noticed that at 2:30pm on the afternoon of the problem Windows Installer reconfigured my application. I had the app open all afternoon. but when I shut it at around 4:40pm, then tried to open it again, the problem above emerged.
Description
Windows Installer reconfigured the product. Product Name: Capability Architect. Product Version: 1.0.0. Product Language: 1033. Manufacturer: SDG. Reconfiguration success or error status: 0.
The reason for the reconfiguration was:
Detection of product '{221672D4-9B64-4550-8B8A-A13C4BE20780}', feature 'DefaultFeature', component '{4F120286-6AE1-5DFE-65E4-A4495CA3F296}' failed. The resource 'C:\Users\Public\Desktop\SDG\Capbility Architect Template v2.0.accdb' does not exist.
Now, that file is installed by default with the product. However, I had deleted it earlier that day because I never use it and that seems to have triggered the reconfiguration. Is that normal behaviour?? And why should a reconfiguration stop the program from running? And is it possible to see exactly what the reconfiguration actually did?
EXTRA UPDATE: If this is the problem then I can't replicate it :( I tried deleting the folder again but it has not affected program start up at all.
Thanks
Ian

How to run a command in cmd on startup in Windows XP

Sigh. For reasons, I am running a windows xp virtual box in ubuntu. In this instance of windows there is an express (node) server running. Everything works fine, except that occasionally windows crashes or the virtual box freezes (perhaps after being left idle for several days). I would like to restart the virtual box (and node server) programmatically when this happens. The actual restarting of the virtual box from linux seems attainable, but I can't figure out how to get windows to run "node .../server.js" on startup! I tried putting the command in C:\AUTOEXEC.bat, and it did not start when I restarted the computer. I know I'm asking for trouble with a 10 year old OS but it's what I have to work with. Any thoughts?
Try scheduling in as a task in the task scheduler.
Tasks get executed when their triggers are satisfied, and in this case you can use the 'at startup' trigger, as described here:
http://technet.microsoft.com/en-us/library/cc748841.aspx
At startup
This trigger causes the task to run when the computer starts up. The only settings for this trigger are the advanced settings described in the Advanced Settings section below.
Look out though, that information wasn't tailor-made for XP, but should do it for you.
I actually just got it working. I put a batch file in start/programs/startup that CD'd to the right directory and then ran node.

Powerbuilder 10 Windows 8 compatibility

Does anyone know if Powerbuilder 10 is compatible with Windows 8 (Both the IDE and the runtime module)?
It seems like 11.5 is officially supported, but I couldn't find any info on PB 10's compatibility on Windows 8.
If it isn't, any tips on the migration process from 10->Further version? (Anything particular we have to watch out for?)
You should have no problem with running PB10 applications on Windows 8, appart perhaps not being not fully compliant with Win8 standards (concerning the placement of application data files, access rights on files, and so on mostly related to UAC file virtualization).
Neither you should have big problems with running the IDE, but maybe some minor issues (I think about an issue on the retrieval argument editor on PB11.5 that could also address PB10).
This is one of those things where you just have to try it yourself. The number of PowerBuilder developers with Windows 8 is likely very small.
I am supposed to be getting a Surface Pro 2 when they come out Oct 22nd which will run Windows 8.1. Hopefully there won't be any issues.
I am not sure about PB10 but I have used PB 10.5 in Win8 with no problem.
We have serious issues with running a PB10 application on Windows 8 computers.
Application runs fine until user enters text in datawindow fields, the application "stopped working". The problem is that it happens randomly, 10 fields can be entered without a problem but at the next field the "stopped working" pops up en the application is closed the next time it might happen after entering 2 fields.
The same application runs already for years on many computers unders XP, Vista, Windows 7 without any issue.
Until now we still have no clou what is causing it. Also we have no idea where to start searching.
The application is developed andf deployed under XP.
Next week we are going to setup a development environment under Windows, hopefully this will give us some more light on the issue.
Two things you need to realize:
PB10 was built (and support development stopped) before before Win8 was conceived, so obviously Sybase couldn't do anything in PB to help with Win8 compatibility. You're relying on MS's ability to maintain a backward compatible environment. IME, they do a pretty good job (better than my experience upgrading in the Unix world, but I'd imagine YMMV), but it's never perfect.
PowerBuilder is powerful enough to allow you to build an application that will break under any operating system. PB10 may have been supported on XP, but I guarantee you that I could have written something that violated an XP rule, or corrupted memory, or whatever, and would have been broken under XP. (I've seen memory corruptions that didn't manifest themselves until after an OS upgrade or some other change; so "broken" may not even manifest symptoms yet.) Is that Sybase's fault? I don't think so. They're the rope manufacturer; if you hang yourself....
Bottom line is what's already been said: no matter what the manufacturer or anyone else says, the only answer worth anything is the results of your own testing. My "Hello World" app may run in Win8 just fine, but your app that taps into the TCP/IP stack, leverage protected mode calls, sending printing language codes directly to the point-of-sale bar code printer, etc....
Good luck,
Terry.