Docker Container crashes when copying files

Hi all,

I’m having a bit of trouble with containers crashing. I’m running a custom container based on windows:1909 with a software called LabVIEW installed in it. My problem doesn’t seem to be connected to LabVIEW at all, though, as I can also see it with the standard windows:1909 image. When I spin up a container from the windows:1909 image, copying files crashes the container with the following output

time="2023-01-10T08:33:11-05:00" level=error msg="Error waiting for container: failed to shutdown container: container 5526c9e1ef97187ad337c3256e29e6d6895666c391272f10ce075520628612c8 encountered an error during hcsshim::System::Shutdown: failure in a Windows system call: The connection with the virtual machine or container was closed. (0xc037010a): subsequent terminate failed container 5526c9e1ef97187ad337c3256e29e6d6895666c391272f10ce075520628612c8 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The connection with the virtual machine or container was closed. (0xc037010a)"

How would I go about finding out what causes this?
I tried running the log command on the container after crashing, but it was empty. (I might not be running it right, though) My system is Windows 11 with Docker Desktop on hyper-v. I’ve tried running on WSL2, but there was no change. RAM usage is around 1 GB and total RAM usage on my system is about 40%.
Previously, the problem had resolved itself for a while (both the copying issue and the main problem), but I don’t know what caused the behavior to change.

On Docker Desktop, the command is docker run -t -i -v "$(pwd)\app:c:\app" mcr.microsoft.com/windows:1909 app is a directory that contains some files I wanted to use and I’m trying to copy in the mounted folder copy File.txt Filecopy.txt I’m running the copy command in the interactive console. This command works fine on the host, of course.

Any help is greatly appreciated.

OK, here’s something I noticed: This problem seems to only affect my mounted folder.
Is this expected behavior? Should I not be able to copy from that folder?

I’ve done some more testing and, yes it seems to be connected to the bind mount. In my bound folder, I can’t do anything, copy, rename, delete nor run my application. The application doesn’t write anything to disk. The same goes for copying from the folder.
I’ve also tested the behavior with a Linux container and there I can copy just fine, so it’s only windows containers that have this problem.

What could cause this behavior? What else could I try?

Edit to add: The files I’m trying to copy are also not big at all, a couple kB at most.