Skip to content

Concurrent map write #3503

@tonistiigi

Description

@tonistiigi

https://github.com/docker/buildx/actions/runs/19120068387/job/54639453917?pr=3502

        	Test:       	TestIntegration/TestImagetoolsAnnotation/worker=docker-container
        	Messages:   	#1 [internal] pushing localhost:37791/buildx/imtools:latest
        	            	fatal error: concurrent map writes
        	            	
        	            	goroutine 15 [running]:
        	            	internal/runtime/maps.fatal({0x2b6af4a?, 0x100007f00600801?})
        	            		runtime/panic.go:1046 +0x18
        	            	github.com/containerd/containerd/v2/core/remotes.WithMediaTypeKeyPrefix({0x30f31f0, 0xc000514600}, {0x2b7c4d9, 0x1c}, {0x2b4bd66, 0x6})
        	            		github.com/containerd/containerd/[email protected]/core/remotes/handlers.go:52 +0x86
        	            	github.com/moby/buildkit/util/contentutil.RegisterContentPayloadTypes(...)
        	            		github.com/moby/[email protected]/util/contentutil/types.go:13
        	            	github.com/moby/buildkit/util/contentutil.copyChain({0x30f31f0, 0xc000514600}, {0x30c61a0, 0xc000514990}, {0x7f54d9774a98, 0xc0001a3910}, {{0xc0004344b0, 0x2a}, {0xc00070402e, 0x47}, ...}, ...)
        	            		github.com/moby/[email protected]/util/contentutil/copy.go:88 +0xe7
        	            	github.com/moby/buildkit/util/contentutil.CopyChain(...)
        	            		github.com/moby/[email protected]/util/contentutil/copy.go:77
        	            	github.com/docker/buildx/util/imagetools.(*Resolver).Copy(0xc0003d9560, {0x30f31f0?, 0xc00054d080?}, 0xc000039170, {0x30d3df8, 0xc00036c9c0})
        	            		github.com/docker/buildx/util/imagetools/create.go:300 +0x92f
        	            	github.com/docker/buildx/commands/imagetools.runCreate.func3.1.1()
        	            		github.com/docker/buildx/commands/imagetools/create.go:215 +0x1db
        	            	golang.org/x/sync/errgroup.(*Group).Go.func1()
        	            		golang.org/x/[email protected]/errgroup/errgroup.go:93 +0x50
        	            	created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 70
        	            		golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x95
        	            	
        	            	goroutine 1 [sync.WaitGroup.Wait]:
        	            	sync.runtime_SemacquireWaitGroup(0xc0006144f8?, 0x80?)
        	            		runtime/sema.go:114 +0x2e
        	            	sync.(*WaitGroup).Wait(0xc0003e2448)
        	            		sync/waitgroup.go:206 +0x85
        	            	golang.org/x/sync/errgroup.(*Group).Wait(0xc0003e2440)
        	            		golang.org/x/[email protected]/errgroup/errgroup.go:56 +0x1e
        	            	github.com/docker/buildx/commands/imagetools.runCreate({0x30f3228, 0xc0001b9630}, {0x310e418, 0xc000329e00}, {{0xc00005e04f, 0x2f}, {0x4855ac0, 0x0, 0x0}, {0xc000135f40, ...}, ...}, ...)
        	            		github.com/docker/buildx/commands/imagetools/create.go:227 +0x18cb
        	            	github.com/docker/buildx/commands/imagetools.createCmd.func1(0xc00053a008?, {0xc000512540?, 0x2?, 0xc?})
        	            		github.com/docker/buildx/commands/imagetools/create.go:317 +0xad
        	            	github.com/spf13/cobra.(*Command).execute(0xc00053a008, {0xc000148030, 0xc, 0xc})
        	            		github.com/spf13/[email protected]/command.go:1015 +0xb02
        	            	github.com/spf13/cobra.(*Command).ExecuteC(0xc000540c08)
        	            		github.com/spf13/[email protected]/command.go:1148 +0x465
        	            	github.com/spf13/cobra.(*Command).Execute(...)
        	            		github.com/spf13/[email protected]/command.go:1071
        	            	main.runStandalone(0xc000329e00)
        	            		github.com/docker/buildx/cmd/buildx/main.go:44 +0x9e
        	            	main.run(0xc000329e00)
        	            		github.com/docker/buildx/cmd/buildx/main.go:76 +0xe5
        	            	main.main()
        	            		github.com/docker/buildx/cmd/buildx/main.go:88 +0xc7
        	            	
        	            	goroutine 18 [syscall]:
        	            	os/signal.signal_recv()
        	            		runtime/sigqueue.go:152 +0x29
        	            	os/signal.loop()
        	            		os/signal/signal_unix.go:23 +0x13
        	            	created by os/signal.Notify.func1.1 in goroutine 1
        	            		os/signal/signal.go:152 +0x1f
        	            	
        	            	goroutine 11 [chan receive]:
        	            	github.com/moby/buildkit/util/appcontext.Context.func1.1()
        	            		github.com/moby/[email protected]/util/appcontext/appcontext.go:36 +0x4e
        	            	created by github.com/moby/buildkit/util/appcontext.Context.func1 in goroutine 1
     

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions