Docker Community Forums

Share and learn in the Docker community.

Docker hangs after 1.7M copy on bind mount

docker

(Scarlson) #1

I have an image for building software that has bind mounts to my host.

During the build it does a simple cp -a <file a on bind mount> <file b on same bind mount>. The file is 1.7Mb but the log (stdout and stderr on the host in this case) seems to be hung for over 15 minutes! I also verified the cp seems to be completed almost immediately since the files are both there and same sizes.

I look at the docker container stats and I can see the CPU is at 100% which I am used to seeing, as well as when I watch top on my host I see the command make from the container is at the top around 100% too, which I am also used to seeing. I have plenty of space on the host and bind mount. The next command to be run is another make command.

Does anyone know what can cause this behavior?

If not can I get suggestions on how I can debug this? I know this doesn’t happen on our legacy build VMs, it just does the copy and then immediately goes to the next make command.

I’ll happily supply any additional info I can.

Thanks,
scarlson


(Sunilvalmiki) #2

Check with the RAM allocated for the Docker VM.
Sometimes Docker Services hang because of Low memory and the CPU usage.
If yes, Try to extend RAM size.


(Scarlson) #3

docker container stats shows this when the cp is hanging
CONTAINER ID e09d9e33a454
NAME docker_builder_1
CPU % 101.39%
MEM USAGE / LIMIT 242.6MiB / 7.639GiB
MEM % 3.10%
NET I/O 1.4kB / 14.7kB
BLOCK I/O 616MB / 953MB
PIDS 2

so I would think I have plenty of ram?

doubt it matters but when I run docker info I get

WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
Use --storage-opt dm.thinpooldev to specify a custom block storage device.


(Scarlson) #4

bump for any suggestions on ways I can debug this. I am new to docker (still transitioning from VMs) and I don’t know of many ways to debug issues like this.


(Sunilvalmiki) #5

Can you give me information about on what platform u r running the docker engine.


(Scarlson) #6

I am running the latest docker engine (just downloaded from official repo this month) on a 64 bit centos7 VM with 8 GB ram, 4 cores, and over 100 free gigs mounted where the bind mounts are located.

I’m using docker compose to setup my bind mounts (there’s two of them). Just downloaded compose too so I think it’s v1.19.

I’m fairly certain storage space/memory/cpu load isn’t an issue unless there’s some gotchas I am unaware of.

There’s a few other containers running but when I’m watching docker stats none of them are taking up even a fraction of my resources (there’s a chat service,docker registry, registry front end, and a vanilla web forum).


(Scarlson) #7

So I moved it to a different machine that has 8 cores and 32 Gb of ram and plenty of storage with almost nothing running on it and it still hangs… I’m very perplexed by this. any other debugging tips?