Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COPY rpc error: code = Unknown desc = not found: not found #785

Closed
pwaller opened this issue Jan 16, 2019 · 12 comments
Closed

COPY rpc error: code = Unknown desc = not found: not found #785

pwaller opened this issue Jan 16, 2019 · 12 comments

Comments

@pwaller
Copy link

pwaller commented Jan 16, 2019

I have a very simple Dockerfile. The dir/subdir path contains lots of binaries, about 500MiB over 7,000 files.

FROM ubuntu:18.04

COPY dir/subdir /opt/subdir

It fails with the error message:

 => ERROR [2/2] COPY dir/subdir /opt/subdir
------
 > [2/2] COPY dir/subdir /opt/subdir:
------

rpc error: code = Unknown desc =  not found: not found

The failure was repeatable.

I have copied the directory in order to reproduce it from another location, and it does not reproduce there.

Subsequent to doing this, the docker build in the original location now works. I observed it re-upload the build context. So I suspect that something went wrong with the build context cache? It's possible that I interrupted the build context cache upload at some point, so I suspect there could be an issue with the build context cache being uploaded.

Sorry for the nebulous issue without a clear reproducer but I wanted to document that I had hit this issue. Please feel free to close if there are no usable leads here.

I suspect that clearing out the build cache would have helped.

I'm running docker for Mac.

Expand docker version and docker info
Client: Docker Engine - Community
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.10.6
 Git commit:        4c52b90
 Built:             Wed Jan  9 19:33:12 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       4c52b90
  Built:            Wed Jan  9 19:41:49 2019
  OS/Arch:          linux/amd64
  Experimental:     true
Containers: 76
 Running: 0
 Paused: 0
 Stopped: 76
Images: 430
Server Version: 18.09.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 96ec2177ae841256168fcf76954f7177af9446eb
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 5.817GiB
Name: linuxkit-025000000001
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 40
 Goroutines: 112
 System Time: 2019-01-16T14:23:06.9713013Z
 EventsListeners: 2
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
@pwaller
Copy link
Author

pwaller commented Jan 17, 2019

Hi @tonistiigi - I saw the status/needs-more-info label (fair enough!), but no comment. Is there something in particular I should collect if this happens again?

@greghall76
Copy link

greghall76 commented Jan 23, 2019

I'm seeing this as well. Building on Ubuntu with Docker version 18.09.1, build 4c52b90 and buildkit.

# syntax=docker/dockerfile-upstream:experimental
FROM        maven:3.5-jdk-8-alpine as build
 ... 
COPY settings.xml /root/settings.xml

@tonistiigi
Copy link
Member

Is there something in particular I should collect if this happens again?

We need some way to reproduce it. Eg. maybe on load if this is flaky. Or if this requires specific state maybe the state directory can be sent. If this proves impossible we could probably prepare a debug build that would gather more information when this happens.

@mcesar
Copy link

mcesar commented Mar 11, 2019

I suspect the cause might be low disk space.

@cstrahan
Copy link

cstrahan commented May 2, 2019

This might be related to my issue: #974

@cstrahan
Copy link

cstrahan commented May 2, 2019

Definitely not low on space:

Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p7  445G  194G  250G  44% /
/dev/nvme0n1p7  445G  194G  250G  44% /home
/dev/nvme0n1p6  969M  114M  789M  13% /boot
/dev/nvme0n1p1  197M  122M   76M  62% /boot/efi

@cstrahan
Copy link

cstrahan commented May 2, 2019

@tonistiigi What can I do to help provide a repro? My team is blocked on this (we have to use BuildKit, or resort to hacks, to get SSH agent forwarding), and I'm willing to do anything that'll help resolve this.

@cstrahan
Copy link

cstrahan commented May 2, 2019

I have an explanation of how exactly this bug is tickled: #974 (comment)

@tonistiigi
Copy link
Member

This is likely fixed by #1023 .

#974 should be different and should already be fixed in latest versions.

@pwaller
Copy link
Author

pwaller commented Jun 5, 2019

@tonistiigi #1023 sounds very much to me like the something that could have happened in my case. I'm happy to close the issue on that basis, since it was difficult to tickle in the first place. Thanks for looking at this, I'm glad to see plausible resolution :)

@pwaller pwaller closed this as completed Jun 5, 2019
@quazgar
Copy link

quazgar commented Oct 16, 2019

Any workaround for this, apart from upgrading?

@tonistiigi
Copy link
Member

@quazgar docker builder prune --filter "type=source.local" should probably do it but upgrading is the recommended path

thaJeztah added a commit to thaJeztah/docker that referenced this issue Oct 24, 2019
full diff: moby/buildkit@f704282...ae10b29

fixes:

- moby/buildkit#1144 Fix socket handling
    - fsutil: Handle copying unix sockets in local sources
    - update github.com/containerd/continuity to 75bee3e2ccb6
    - update github.com/tonistiigi/fsutil to 3d2716dd0a4d
- moby/buildkit#1150 ssh: Fix file descriptor leak when doing SSH forwarding
    - fixes moby/buildkit#1146 SSH Forwarding Doesn't Release File Descriptors
- moby/buildkit#1156 llbsolver: Fix using multiple remote cache importers
- moby/buildkit#1159 http: Handle missing but unambiguous ETags in response
    - fixes moby/buildkit#905 ADD from url fails with 'invalid not-modified ETag'
    - fixes moby/buildkit#784 invalid not-modified ETag with local network ADD in docker
- moby/buildkit#1166 solver: Fix possible inefficient parallelization in solver
    - fix cases where some events were dropped resulting inefficient parallelization.
- moby/buildkit#1168 vendor: update go-runc to e029b79d
- moby/buildkit#1140 contenthash: Fix bug with symlink in source path of a copy operation
    - fixes moby/buildkit#974 COPY --from fails when source path involves a symlink
    - fixes moby/buildkit#785 COPY rpc error: code = Unknown desc = not found: not found
    - fixes moby/buildkit#958 Issue COPY a file to a symlink directory
- moby/buildkit#1139 executor: oom_score_adj is no longer set from main process

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants