indefinitely hanging processes
Version
1.4.2
Question
Hi Jantari,
As you mentioned in the Changelog: "Invoke external processes asynchronously and log long-running processes with a warning I plan on providing some options to identify and deal with indefinitely hanging processes in a future release."
Are there already some News on this? I'm currently struggling with that.
AUSFÜHRLICH: Installing package n39dd18w ... WARNUNG: Process 'C:\Windows\TEMP\LSUPackages\n39dd18w\Installer.exe' has been running for 00:05:00.0671781 WARNUNG: Process 'C:\Windows\TEMP\LSUPackages\n39dd18w\Installer.exe' has been running for 00:06:00.2098601 WARNUNG: Process 'C:\Windows\TEMP\LSUPackages\n39dd18w\Installer.exe' has been running for 00:07:00.3146779 WARNUNG: Process 'C:\Windows\TEMP\LSUPackages\n39dd18w\Installer.exe' has been running for 00:08:00.3773167 WARNUNG: Process 'C:\Windows\TEMP\LSUPackages\n39dd18w\Installer.exe' has been running for 00:09:00.5509485 WARNUNG: Process 'C:\Windows\TEMP\LSUPackages\n39dd18w\Installer.exe' has been running for 00:10:00.6255106 WARNUNG: Process 'C:\Windows\TEMP\LSUPackages\n39dd18w\Installer.exe' has been running for 00:11:00.7597481
ID : n39dd18w Title : Intel Graphics Driver - 10 (20H2 or later)/11 (21H2 or later) Type : Driver Success : False FailureReason : INSTALLER_EXITCODE PendingAction : NONE ExitCode : 1 StandardOutput : {} StandardError : {} LogOutput : {} Runtime : 00:11:12.7970951
ive just killed it via pskill manually for the moment..
Thanks!
Hi,
I've been testing an implementation of indefinitely-hanging-process detection that, so far, has been pretty good on the feat-detect-hanging-process branch. It's currently (as of 70d05043ce05586ae3ebe885fb3500bfb7ec2ead) in a working state so you could try it out, but I would not recommend using any such in-development versions in production.
But, it is always better to have an installer succeed instead of having it hang and having to kill the process - killing the process is a last, last resort - a big part of the reason I'm very careful and hesitant about introducing it as an option at all. Based on what you've shared I'd guess you are running into the same issue as https://github.com/jantari/LSUClient/issues/49, in which case the better solution is to just run the installer from a directory other than C:\Windows\TEMP and then it'll work: https://github.com/jantari/LSUClient/issues/49#issuecomment-1084349570
Please try that and see if it works for you as well
Hi, I have one assumption. I have experienced an issue with the "ThinkPad Hotkey Features Integration Package Setup" It seem to be stuck indefinitely, when present within the downloads for a Lenovo laptop device. It does seem like this, that the setup.exe expects access to other applications or drivers, and if there are not present, the setup.exe is just stuck. Maybe it would help that the Intel Graphics Driver to the second last position and the "ThinkPad Hotkey Features Integration Package Setup" to the end of the installation process.
I have attached the LSU Log, which I have created for her. LSUClient.log
@TVMike thanks for the logs, I'll have to look into that later this week as it's a different cause than the Intel Graphics Driver hang. Have you confirmed that it doesn't hang on the same model of computer when you sort the packages and install the Hotkey one last?
@jantari Perfect, that solved my issue! We indeed using the SYSTEM account to let LSU install the updates. I've now changed the download and Install directory which solved the issue.
I do have two more questions, just fo my understanding: -How does the Script know which Drivers are needed to be updated? Is there a Driver Version check or something? If so, where is this stored? -Is there a possibility to exclude Drivers? Example, Video Drivers? In some cases we need a Specific, verified Driver version for some CAD tools.
Thank you so much for this module, great job!
How does the Script know which Drivers are needed to be updated? Is there a Driver Version check or something? If so, where is this stored?
Lenovo specifies two sets of checks with each driver package that can determine that. The "Dependencies" checks for whether the driver is applicable to the system at all (e.g. 32 vs 64-bit, optional hardware installed, other required drivers present... ) and the "DetectInstall" checks for whether the driver is already installed or not. If a driver is applicable (dependencies satisfied) but not yet installed then it's an update. These tests are stored in the update repository, in the drivers XML file - e.g. here for the n39dd18w Intel Graphics driver you were having trouble with. LSUClient goes through the XML files and performs the specified tests, then exposes the results in the IsApplicable and IsInstalled properties of every returned update.
Is there a possibility to exclude Drivers? Example, Video Drivers? In some cases we need a Specific, verified Driver version for some CAD tools.
You can easily exclude / filter out any drivers you don't wish to install with the standard PowerShell Where-Object cmdlet, based on any criteria you want.
If you want to always install a specific version of a driver you may have to put that into your own driver repository as the drivers available directly from Lenovo are always updated and also vary depending on the computer model. You could run LSUClient twice, once sourcing from Lenovo but excluding the driver you want to control and then once sourcing from your own repository which would only contain that one driver.
Hi, I was able to fix my issue with the hung "ThinkPad Hotkey Features Integration Package Setup", after putting the devices to the end of the execution line, the installation was successful. Thanks for the hint!
@TVMike thanks for confirming. I'll look into sorting the updates appropriately in Get-LSUpdate to prevent this problem in the future.
In this case it looks like the Hotkey driver depends specifically on n3aku12w (Lenovo Power Management Driver) to be installed first. I still think it's not ideal that these installers just hang instead of simply exiting with an error in these cases, but unfortunately we can't control that.
@jantari Perfect explenation, thanks!
Seems like i have one issue left with the TBTFWDetect:
Donnerstag, 22. September 2022 14:17:33 Ausnahme beim Aufrufen von "DownloadFile" mit 2 Argument(en): "Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht gefunden." In C:\Program Files\WindowsPowerShell\Modules\LSUClient\private\Save-PackageFile.ps1:46 Zeichen:9
-
$webClient.DownloadFile($SourceFile.AbsoluteLocation, $Downlo ... -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : WebException Ausnahme beim Aufrufen von "DownloadFile" mit 2 Argument(en): "Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht gefunden." In C:\Program Files\WindowsPowerShell\Modules\LSUClient\private\Save-PackageFile.ps1:46 Zeichen:9
-
$webClient.DownloadFile($SourceFile.AbsoluteLocation, $Downlo ... -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : WebException
WARNUNG: The command or file '%PACKAGEPATH%\tbtfwdetect26_dch.exe 8' could not be found from 'C:\Windows\TEMP\mrcax0rj.4xx\pbsvieke.b5e' and was not run
This is the only problem left. Do you know something about this? Everything else just installs fine
@SynMaki That sounds like it could be the same issue as #37 - you should run Get-LSUpdate with -Verbose to see the URLs it's trying to access and then manually test whether that URL exists. More details in existing issues #35, #36 and #37.
Perfect! Thanks!
@SynMaki because you asked about this in your issue:
As you mentioned in the Changelog: "Invoke external processes asynchronously and log long-running processes with a warning I plan on providing some options to identify and deal with indefinitely hanging processes in a future release."
Are there already some News on this? I'm currently struggling with that.
I want to inform you that this feature is now released in LSUClient 1.5.0 - you can now configure time limits for installers:
https://jantari.github.io/LSUClient-docs/docs/topics/hanging-processes/#killing-hanging-processes https://jantari.github.io/LSUClient-docs/docs/cmdlets/set-lsuclientconfiguration/