Page 1 of 5

XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 04 Nov 2020 20:08
by Jeeves
I have a problem with XYCopy staying running, even with no background jobs and nothing using it (Xyplorer itself is closed).

Upon trying to kill it, all but one thread exits then it stays and can't be killed. Reboot hangs as well because the threads won't exit, forcing a hard power off.

Of the two copies that I cannot kill at the moment, they have two different wait conditions:
1) Wait:WrResource
2) Wait:Executive
xycopy_hang.gif
xycopy_hang.gif (27.14 KiB) Viewed 5980 times
Windows in the past week updated to Windows 10 Build 20H2. I do not know if this is related.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 07 Nov 2020 12:26
by admin
You cannot kill XYcopy.exe using Task Manager? That would be a first.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 09 Nov 2020 18:58
by Jeeves
admin wrote: 07 Nov 2020 12:26 You cannot kill XYcopy.exe using Task Manager? That would be a first.
Over the course of my career, I've seen this a decent number of times.
Often the only solution is to reboot, and depending on the hung thread, a forced power off may be required.

The actual error received when trying to kill it is "An attempt was made to access an exiting process." And from the screenshots you can see that there's a single thread left waiting on something, which never exits. "taskkill /f /im /t" does nothing as well.

https://techcommunity.microsoft.com/t5/ ... a-p/723389

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 10 Nov 2020 09:45
by admin
And this problem happens repeatedly? Sometimes, or always?

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 10 Nov 2020 20:31
by Jeeves
admin wrote: 10 Nov 2020 09:45 And this problem happens repeatedly? Sometimes, or always?
Unless I am rebooting the machine or updating to the latest Beta I don't tend to notice. I will keep a closer eye on the log. I was hopeful that the call addresses might help.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 17 Nov 2020 20:09
by Jeeves
admin wrote: 10 Nov 2020 09:45 And this problem happens repeatedly? Sometimes, or always?
Tried to install the latest beta.
xy_xycopy_1.png
xy_xycopy_1.png (51.18 KiB) Viewed 5284 times

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 18 Nov 2020 18:32
by admin
So it happened again. I currently cannot see how this happens. If you ever see a way to reproduce it let me know.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 29 Oct 2021 21:42
by tonifelfe
I have the same here with portable XYplorer version.
The effect doesnt allow me to update the program folder since XYcopy.exe is locked.
May be the unkillable XYcopy processes have lost the parent process XYplorer?
XYlorer has to wait for terminating all possible XYcopy processes before exiting itself.
Only an idea.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 30 Oct 2021 10:38
by admin
When you close XYplorer it will try to kill any idle XYcopy processes, and then close (no matter whether that worked or not).

I have never experienced unkillable XYcopy processes, and don't know what could cause that.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 30 Oct 2021 10:48
by highend
I've seen lingering xycopy tasks in the background as well but a simple taskkill had no problems to close them. I'm using this way in my XY update script to make sure that everything works as expected and it never failed so far

E.g.:

Code: Select all

TASKKILL /F /IM hh.exe /T >NUL 2>NUL
TASKKILL /F /IM XY64.exe /T >NUL 2>NUL
TASKKILL /F /IM XY64contents.exe /T >NUL 2>NUL
TASKKILL /F /IM XY64ctxmenu.exe /T >NUL 2>NUL
TASKKILL /F /IM XYcopy.exe /T >NUL 2>NUL

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 31 Oct 2021 10:22
by tonifelfe
Good hint, thanks.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 01 Nov 2021 16:04
by Jeeves
highend wrote: 30 Oct 2021 10:48 I've seen lingering xycopy tasks in the background as well but a simple taskkill had no problems to close them. I'm using this way in my XY update script to make sure that everything works as expected and it never failed so far

E.g.:

Code: Select all

TASKKILL /F /IM hh.exe /T >NUL 2>NUL
TASKKILL /F /IM XY64.exe /T >NUL 2>NUL
TASKKILL /F /IM XY64contents.exe /T >NUL 2>NUL
TASKKILL /F /IM XY64ctxmenu.exe /T >NUL 2>NUL
TASKKILL /F /IM XYcopy.exe /T >NUL 2>NUL
In most instances, this is all that's needed. However, it's not always the case either (nor do I think it should be required, the installer should handle this).

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 01 Nov 2021 16:09
by highend
the installer should handle this
My script doesn't use the installer, it upgrades via the .zip file (portable)

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 01 Nov 2021 18:47
by Jeeves
highend wrote: 01 Nov 2021 16:09
the installer should handle this
My script doesn't use the installer it upgrades via the .zip file (portable)
That's fine. My point was that the installer should attempt to close the files before replacing them.

Re: XYCopy refuses to exit. Multiple running copies. Can't be killed.

Posted: 01 Nov 2021 19:16
by admin
Not the installer, XY itself attempts to close them on exit. No idea why it fails. Cannot reproduce a fail here.

Just curious: Are you upgrading to a new version while the current version is doing file operations in the background?