Skip to content

failed to call diskusage: ResourceExhausted #3084

Open

Description

@fenollp

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

(me again) hitting gRPC message max sizes, this time it's when running docker buildx du.

cc #2453
cc moby/buildkit#4948
cc moby/moby#48164
cc moby/buildkit#3381 <= probably the same issue

Expected behaviour

No error :)

Actual behaviour

λ docker --debug buildx du
ERROR: failed to call diskusage: ResourceExhausted: grpc: trying to send message larger than max (30520647 vs. 16777216)
280398 v0.22.0 /usr/libexec/docker/cli-plugins/docker-buildx --debug buildx du
google.golang.org/grpc.(*ClientConn).Invoke
	google.golang.org/grpc@v1.69.4/call.go:35
github.com/moby/buildkit/api/services/control.(*controlClient).DiskUsage
	github.com/moby/buildkit@v0.20.1/api/services/control/control_grpc.pb.go:59
github.com/moby/buildkit/client.(*Client).DiskUsage
	github.com/moby/buildkit@v0.20.1/client/diskusage.go:34
github.com/docker/buildx/commands.runDiskUsage.runDiskUsage.func1.func3
	github.com/docker/buildx/commands/diskusage.go:61
golang.org/x/sync/errgroup.(*Group).Go.func1
	golang.org/x/sync@v0.10.0/errgroup/errgroup.go:78
runtime.goexit
	runtime/asm_amd64.s:1700

280398 v0.22.0 /usr/libexec/docker/cli-plugins/docker-buildx --debug buildx du
github.com/moby/buildkit/client.(*Client).DiskUsage
	github.com/moby/buildkit@v0.20.1/client/diskusage.go:36
github.com/docker/buildx/commands.runDiskUsage.runDiskUsage.func1.func3
	github.com/docker/buildx/commands/diskusage.go:61

Buildx version

github.com/docker/buildx v0.22.0 18ccba0

Docker info

Client: Docker Engine - Community
 Version:    28.0.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.22.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /home/pete/.docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 34
 Server Version: 28.0.4
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.8.0-56-generic
 Operating System: Ubuntu 24.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 30.06GiB
 Name: solaralchemist
 ID: 4ff1ee7f-a3ff-4df0-ad6e-9d0162ddbda5
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: fenollp
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Registry Mirrors:
  https://docker-proxy.infra.online.net/
 Live Restore Enabled: false

Builders list

NAME/NODE     DRIVER/ENDPOINT   STATUS    BUILDKIT   PLATFORMS
default*      docker                                 
 \_ default    \_ default       running   v0.20.2    linux/amd64 (+4), linux/386

Configuration

docker buildx du

Build logs


Additional info

Note that I have been building a lot of things with --output type=local that have heavy stage reuse, many contexts and >MB Dockerfiles.

Activity

  1. fenollp commented on Apr 9, 2025

    @fenollp
    Author

    Note: after pruning this no longer happens.

  2. tonistiigi commented on Apr 9, 2025

    @tonistiigi
    Member

    Do you actually have 30MB of build record descriptions or was this condition caused by some other issue?

  3. fenollp commented on Apr 10, 2025

    @fenollp
    Author

    Well, probably? That command was unusable until I pruned the build cache.

    I have no idea what exactly are "build record descriptions". I'm just building /so many/ tiny stages. I guess the issue only comes from that heavy usage. Here's an excerpt of the output of the command now:

    # time docker buildx du
    ID						RECLAIMABLE	SIZE		LAST ACCESSED
    yl2k2g6qw9q2rti15rl1mkegs*              	true 		14.77MB   	4 days ago
    wy625d7wckrmjaiuxn24ynxfw*              	true 		14.77MB   	4 days ago
    u1rxl1jfbtyhcixknzth0wtfy*              	true 		14.77MB   	4 days ago
    kvci6hhwu4rxq8cz4c0brc6k9*              	true 		14.77MB   	4 days ago
    i8rtqu5ggrf3ukyraobef11un*              	true 		14.77MB   	4 days ago
    bca37mhm7q2a89t5ev8hfgq58*              	true 		14.77MB   	4 days ago
    aebhbf5kugeezw3cbg22yoses*              	true 		14.77MB   	4 days ago
    4c8q38pnsu3tnglmyy80dxd2n*              	true 		14.77MB   	4 days ago
    x793fcyvez364xz2ri3jo7o6o*              	true 		14.68MB   	4 days ago
    shje48b0ei3w7glf8n4t14cot*              	true 		14.68MB   	4 days ago
    qt9yz0yyomoyyzvm0fhvosqis*              	true 		14.68MB   	4 days ago
    ... snip (~3k lines) ...
    9wr8hwgcd7aeloculirbmmzrb*              	true 		0B        	4 days ago
    9v7dvaua94gtbbn3fe3skrltn*              	true 		0B        	4 days ago
    939canwhvr3rvg6i1fu7fb237*              	true 		0B        	4 days ago
    8wh1nyt9f4su9i60it3sgj89w*              	true 		0B        	18 hours ago
    8tnhggdvh8f9bd9evi3c5lfd2*              	true 		0B        	16 hours ago
    8fu83lpokwl26y90jnqvobprp*              	true 		0B        	4 days ago
    803mvgojlqjak67z8h5bu67uo*              	true 		0B        	16 hours ago
    6ze5apm81p46rg2d7tibem7u8*              	true 		0B        	4 days ago
    6yl4395h103z6ynnmnnk6s31c*              	true 		0B        	4 days ago
    6up80kwtxscustram7snh1j7m*              	true 		0B        	16 hours ago
    64jozmhpkqo3v1owozckggq7z               	true 		0B        	4 days ago
    5733nnpjvynw5sy792f6zy49e               	true 		0B        	5 days ago
    50uo0rnjxedwbye1himdnrrrl               	true 		0B        	4 days ago
    4vhtgnye9efpxe7mjr1gdat3d*              	true 		0B        	4 days ago
    4u41isp217gwbvdoixk79uzv6*              	true 		0B        	4 days ago
    4s9sjd4twjrg7x9xinozeloms               	true 		0B        	4 days ago
    4nyrx1fz5yjngwb2d4sbjkv6s*              	true 		0B        	4 days ago
    479f9k3kdrlsup07gm8pvjrfa               	true 		0B        	4 days ago
    3mkarpre1yqkn1rtxaupfgwhb*              	true 		0B        	4 days ago
    3liknlx2kglo20ct4a6x3pa6d*              	true 		0B        	16 hours ago
    3aiobms3ddqvwyhe2q0fgx3s6*              	true 		0B        	4 days ago
    2lqt4wc75w1muze5d3dnzdqkw*              	true 		0B        	4 days ago
    29myniumsis05v55uxtyp9aet*              	true 		0B        	4 days ago
    1vz29l0d9tj7osah3evatuzqw               	true 		0B        	16 hours ago
    1m13dii42dblyzmb0cjl6zt8b*              	true 		0B        	4 days ago
    0xvqfbp02dqd0qyurj90gtkpu*              	true 		0B        	4 days ago
    0qen0byi8wy825195khlbe5qa*              	true 		0B        	16 hours ago
    0gkokhgpys4pz35jku6jlawqa*              	true 		0B        	4 days ago
    05cb1lmsi5li6bnv503zfaujz*              	true 		0B        	4 days ago
    01qjy1f5h9zy8cchqu0j1fea9*              	true 		0B        	4 days ago
    Reclaimable:	2.43GB
    Total:		2.43GB
    
    real	0m3.788s
    user	0m0.038s
    sys	0m0.079s

    Hope this helps.

  4. fenollp commented on Apr 24, 2025

    @fenollp
    Author

    @tonistiigi I guess so, yes

    Do you actually have 30MB of build record descriptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions