Closed HenrikBengtsson closed 1 year ago
This actually revealed two bugs in the internal pid_exists()
function, which are now fixed. I also took the opportunity to make the failure less noisy by only generating one warning, instead of five each;
* using log directory 'd:/RCompile/CRANguest/R-devel/parallelly.Rcheck'
* using R Under development (unstable) (2022-12-13 r83440 ucrt)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: UTF-8
* checking for file 'parallelly/DESCRIPTION' ... OK
* this is package 'parallelly' version '1.32.1-9015'
...
> alive <- isNodeAlive(cl)
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
Warning in system2("tasklist", stdout = TRUE, stderr = "") :
running command '"tasklist"' had status 1
Warning in system2("tasklist", args = args, stdout = TRUE, stderr = "") :
running command '"tasklist" /FI "PID eq 101288" /NH' had status 1
Warning: The 'parallelly' package is not capable of checking whether a process is alive based on its process ID, on this machine (4.3.0, platform x86_64-w64-mingw32)
> print(alive)
Node 1 Node 2
NA NA
The FEHLER: Ungültige Klasse
output is the captured stderr from calling tasklist
. I could silence it, but I think it's more helpful to keep them. It's too tedious to capture them and only output them once. Attempting to do so, would also require lots of serious testing to make sure I don't break the existing functionality, so I'll skip that.
I've tweaked the warning to give more troubleshooting info on the host where this fails;
* using R Under development (unstable) (2022-12-13 r83440 ucrt)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: UTF-8
* checking for file 'parallelly/DESCRIPTION' ... OK
* this is package 'parallelly' version '1.32.1-9019'
...
> isNodeAliveSupported <- isTRUE(parallelly:::pid_exists(Sys.getpid()))
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
FEHLER: Ungültige Klasse
Warning in system2("tasklist", stdout = TRUE, stderr = "") :
running command '"tasklist"' had status 1
Warning in system2("tasklist", args = args, stdout = TRUE, stderr = "") :
running command '"tasklist" /FI "PID eq 101144" /NH' had status 1
Warning: The 'parallelly' package is not capable of checking whether a process is alive based
on its process ID, on this machine [R Under development (unstable) (2022-12-13 r83440 ucrt),
platform x86_64-w64-mingw32, Windows Server x64 (build 20348), CRAN@CRANWIN2]
> message("isNodeAlive() works: ", isNodeAliveSupported)
isNodeAlive() works: FALSE
Test relaxed to be agile to the above;
I just got the following from the win-builder-{release,devel}. It suggests that on some machines,
tasklist
might not work;Because there are no other alternatives on MS Windows, we have to relax that test on MS Windows.