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

[BUG] Panic in docker compose up -d #12335

Closed
calinpristavu opened this issue Nov 28, 2024 · 2 comments
Closed

[BUG] Panic in docker compose up -d #12335

calinpristavu opened this issue Nov 28, 2024 · 2 comments

Comments

@calinpristavu
Copy link

calinpristavu commented Nov 28, 2024

Description

I have encountered a race condition in a map when running docker compose up -d shortly after a docker compose stop (like 5 seconds in between the two command executions).

Stack trace added below

Steps To Reproduce

I am unable to reliably reproduce this, however the stack trace should reveal the issue.
When the trace was produced, the sequence of events was:

  1. docker compose stop
    1.1. top level services all marked as Stopped. started stopping ( ^_^ ) depends_on services
    1.2. depends_on services all marked as Stopped
    1.3. docker compose stop exit 0 - command finished executing
  2. docker compose up -d
    2.1. immediate panic

Compose Version

Docker Compose version v2.29.7

Anything else?

Go stack trace / panic:

goroutine 135 [running]:
github.com/docker/compose/v2/pkg/compose.(*convergence).stopDependentContainers(_, {_, _}, _, {{0xc00037e4a7, 0x3}, {0x0, 0x0, 0x0}, 0x0, ...})
        github.com/docker/compose/v2/pkg/compose/convergence.go:226 +0x113
github.com/docker/compose/v2/pkg/compose.(*convergence).ensureService(_, {_, _}, _, {{0xc00037e4a7, 0x3}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
        github.com/docker/compose/v2/pkg/compose/convergence.go:162 +0x694
github.com/docker/compose/v2/pkg/compose.(*composeService).create.(*convergence).apply.func1.1({0x2747d48, 0xc0003a5110})
        github.com/docker/compose/v2/pkg/compose/convergence.go:103 +0x10b
github.com/docker/compose/v2/internal/tracing.SpanWrapFunc.func1({0x2747d80, 0xc0002b2cd0})
        github.com/docker/compose/v2/internal/tracing/wrap.go:43 +0x1c4
github.com/docker/compose/v2/pkg/compose.(*composeService).create.(*convergence).apply.func1({0x2747d80, 0xc0002b2cd0}, {0xc00037e4a7, 0x3})
        github.com/docker/compose/v2/pkg/compose/convergence.go:104 +0x2e3
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).run.func1()
        github.com/docker/compose/v2/pkg/compose/dependencies.go:184 +0x99
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 55
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc0000132a8?)
        runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0x21ecec0?)
        sync/waitgroup.go:116 +0x48
golang.org/x/sync/errgroup.(*Group).Wait(0xc000998580)
        golang.org/x/[email protected]/errgroup/errgroup.go:56 +0x25
github.com/docker/compose/v2/pkg/progress.RunWithStatus({0x2747d48, 0xc00077bb30}, 0xc000993dc0, 0xc00071ee70, {0x23a0c25, 0x7})
        github.com/docker/compose/v2/pkg/progress/writer.go:97 +0x1ef
github.com/docker/compose/v2/pkg/progress.Run({0x2747d48, 0xc00077bb30}, 0xc000998540, 0xc00071ee70)
        github.com/docker/compose/v2/pkg/progress/writer.go:61 +0x85
github.com/docker/compose/v2/pkg/compose.(*composeService).Up(0xc0000534c0, {0x2747d48, 0xc00077bb30}, _, {{0xc000401380, {0xc0002632e0, 0x0, 0x1}, 0x0, 0x0, ...}, ...})
        github.com/docker/compose/v2/pkg/compose/up.go:40 +0x233
github.com/docker/compose/v2/cmd/compose.runUp({_, _}, {_, _}, {_, _}, {0x0, 0x0, {0x239eff0, 0x6}, ...}, ...)
        github.com/docker/compose/v2/cmd/compose/up.go:295 +0xc14
github.com/docker/compose/v2/cmd/compose.upCommand.func2({0x2747d48, 0xc00077bb30}, 0xc0007237a0, {0xc0002632e0, 0x0, 0x1})
        github.com/docker/compose/v2/cmd/compose/up.go:136 +0x2d8
github.com/docker/compose/v2/cmd/compose.upCommand.(*ProjectOptions).WithServices.func4({0x2747d80, 0xc0007209b0}, {0xc0002632e0, 0x0, 0x1})
        github.com/docker/compose/v2/cmd/compose/compose.go:170 +0x1a3
github.com/docker/compose/v2/cmd/compose.upCommand.(*ProjectOptions).WithServices.Adapt.func6({0x2747d80?, 0xc0007209b0?}, 0x2?, {0xc0002632e0?, 0x272d550?, 0x13f72c4?})
        github.com/docker/compose/v2/cmd/compose/compose.go:125 +0x30
github.com/docker/compose/v2/cmd/compose.upCommand.(*ProjectOptions).WithServices.Adapt.AdaptCmd.func7(0xc00045ec08, {0xc0002632e0, 0x0, 0x1})
        github.com/docker/compose/v2/cmd/compose/compose.go:101 +0x154
github.com/docker/cli/cli-plugins/plugin.RunPlugin.func1.1.2(0xc00045ec08, {0xc0002632e0, 0x0, 0x1})
        github.com/docker/[email protected]+incompatible/cli-plugins/plugin/plugin.go:64 +0x6c
github.com/docker/compose/v2/cmd/cmdtrace.Setup.wrapRunE.func2(0xc00045ec08?, {0xc0002632e0?, 0x0?, 0x1?})
        github.com/docker/compose/v2/cmd/cmdtrace/cmd_span.go:85 +0x63
github.com/spf13/cobra.(*Command).execute(0xc00045ec08, {0xc00078c8f0, 0x1, 0x1})
        github.com/spf13/[email protected]/command.go:985 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002e6308)
        github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:1041
github.com/docker/cli/cli-plugins/plugin.RunPlugin(0xc000424780, 0xc00045e908, {{0x239daa7, 0x5}, {0x23a79d5, 0xb}, {0x271cd50, 0x7}, {0x0, 0x0}, ...})
        github.com/docker/[email protected]+incompatible/cli-plugins/plugin/plugin.go:79 +0x145
github.com/docker/cli/cli-plugins/plugin.Run(0x24ec588, {{0x239daa7, 0x5}, {0x23a79d5, 0xb}, {0x271cd50, 0x7}, {0x0, 0x0}, {0x0, ...}})
        github.com/docker/[email protected]+incompatible/cli-plugins/plugin/plugin.go:94 +0x165
main.pluginMain()
        github.com/docker/compose/v2/cmd/main.go:38 +0xa5
main.main()
        github.com/docker/compose/v2/cmd/main.go:98 +0x19c

goroutine 15 [IO wait]:
internal/poll.runtime_pollWait(0x770ce84c6700, 0x72)
        runtime/netpoll.go:345 +0x85
internal/poll.(*pollDesc).wait(0xc0001e7200?, 0xc0000acfbf?, 0x0)
        internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0001e7200, {0xc0000acfbf, 0x1, 0x1})
        internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc0001e7200, {0xc0000acfbf?, 0x0?, 0x0?})
        net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc0007181e0, {0xc0000acfbf?, 0x0?, 0x0?})
        net/net.go:185 +0x45
github.com/docker/cli/cli-plugins/socket.ConnectAndWait.func1()
        github.com/docker/[email protected]+incompatible/cli-plugins/socket/socket.go:162 +0x45
created by github.com/docker/cli/cli-plugins/socket.ConnectAndWait in goroutine 1
        github.com/docker/[email protected]+incompatible/cli-plugins/socket/socket.go:159 +0x118

goroutine 52 [chan receive]:
github.com/docker/compose/v2/cmd/compose.upCommand.AdaptCmd.func3.1()
        github.com/docker/compose/v2/cmd/compose/compose.go:95 +0x27
created by github.com/docker/compose/v2/cmd/compose.upCommand.AdaptCmd.func3 in goroutine 1
        github.com/docker/compose/v2/cmd/compose/compose.go:94 +0x11c

goroutine 50 [IO wait]:
internal/poll.runtime_pollWait(0x770ce84c6608, 0x72)
        runtime/netpoll.go:345 +0x85
internal/poll.(*pollDesc).wait(0xc0001e7680?, 0xc0003a8000?, 0x0)
        internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0001e7680, {0xc0003a8000, 0x1000, 0x1000})
        internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc0001e7680, {0xc0003a8000?, 0xc000662080?, 0xc000682fc0?})
        net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc0007182c8, {0xc0003a8000?, 0x0?, 0xc000582c40?})
        net/net.go:185 +0x45
net/http.(*persistConn).Read(0xc000369680, {0xc0003a8000?, 0xc000064180?, 0xc0004d5d38?})
        net/http/transport.go:1977 +0x4a
bufio.(*Reader).fill(0xc00010fe00)
        bufio/bufio.go:110 +0x103
bufio.(*Reader).Peek(0xc00010fe00, 0x1)
        bufio/bufio.go:148 +0x53
net/http.(*persistConn).readLoop(0xc000369680)
        net/http/transport.go:2141 +0x1b9
created by net/http.(*Transport).dialConn in goroutine 16
        net/http/transport.go:1799 +0x152f

goroutine 51 [select]:
net/http.(*persistConn).writeLoop(0xc000369680)
        net/http/transport.go:2458 +0xf0
created by net/http.(*Transport).dialConn in goroutine 16
        net/http/transport.go:1800 +0x1585

goroutine 24 [select]:
go.opentelemetry.io/otel/sdk/trace.(*batchSpanProcessor).processQueue(0xc0004320a0)
        go.opentelemetry.io/otel/[email protected]/trace/batch_span_processor.go:312 +0x11d
go.opentelemetry.io/otel/sdk/trace.NewBatchSpanProcessor.func1()
        go.opentelemetry.io/otel/[email protected]/trace/batch_span_processor.go:128 +0x54
created by go.opentelemetry.io/otel/sdk/trace.NewBatchSpanProcessor in goroutine 1
        go.opentelemetry.io/otel/[email protected]/trace/batch_span_processor.go:126 +0x2e5

goroutine 67 [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:151 +0x1f

goroutine 53 [chan receive]:
github.com/docker/compose/v2/cmd/compose.upCommand.(*ProjectOptions).WithServices.Adapt.AdaptCmd.func7.1()
        github.com/docker/compose/v2/cmd/compose/compose.go:95 +0x27
created by github.com/docker/compose/v2/cmd/compose.upCommand.(*ProjectOptions).WithServices.Adapt.AdaptCmd.func7 in goroutine 1
        github.com/docker/compose/v2/cmd/compose/compose.go:94 +0x11c

goroutine 54 [select]:
github.com/docker/compose/v2/pkg/progress.(*ttyWriter).Start(0xc000400880, {0x2747a08, 0x39ed6e0})
        github.com/docker/compose/v2/pkg/progress/tty.go:54 +0x105
github.com/docker/compose/v2/pkg/progress.RunWithStatus.func1()
        github.com/docker/compose/v2/pkg/progress/writer.go:83 +0x2a
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 55 [semacquire]:
sync.runtime_Semacquire(0x1d21d68?)
        runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0x8?)
        sync/waitgroup.go:116 +0x48
golang.org/x/sync/errgroup.(*Group).Wait(0xc00055ed80)
        golang.org/x/[email protected]/errgroup/errgroup.go:56 +0x25
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).visit(0xc0002b2b40, {0x2747d48, 0xc000438ed0}, 0xc0007714a0)
        github.com/docker/compose/v2/pkg/compose/dependencies.go:163 +0x226
github.com/docker/compose/v2/pkg/compose.InDependencyOrder({0x2747d48, 0xc000438ed0}, 0x245fe8c?, 0xc0006cb700, {0x0, 0x0, 0xc0000534c0?})
        github.com/docker/compose/v2/pkg/compose/dependencies.go:88 +0xf1
github.com/docker/compose/v2/pkg/compose.(*convergence).apply(...)
        github.com/docker/compose/v2/pkg/compose/convergence.go:92
github.com/docker/compose/v2/pkg/compose.(*composeService).create(0xc0000534c0, {0x2747d48, 0xc000438ed0}, 0xc0007237a0, {0xc000401380, {0xc0004da200, 0xe, 0x10}, 0x0, 0x0, ...})
        github.com/docker/compose/v2/pkg/compose/create.go:118 +0x5c5
github.com/docker/compose/v2/pkg/compose.(*composeService).Up.func1({0x2747d48, 0xc000438ed0})
        github.com/docker/compose/v2/pkg/compose/up.go:41 +0x85
github.com/docker/compose/v2/pkg/compose.(*composeService).Up.SpanWrapFunc.func5({0x2747d48, 0xc000438ea0})
        github.com/docker/compose/v2/internal/tracing/wrap.go:43 +0x152
github.com/docker/compose/v2/pkg/progress.Run.func1({0x2747d48?, 0xc000438ea0?})
        github.com/docker/compose/v2/pkg/progress/writer.go:62 +0x22
github.com/docker/compose/v2/pkg/progress.RunWithStatus.func2()
        github.com/docker/compose/v2/pkg/progress/writer.go:90 +0x7f
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 133 [select]:
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).visit.func1()
        github.com/docker/compose/v2/pkg/compose/dependencies.go:147 +0x10c
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 55
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 71 [runnable]:
github.com/docker/compose/v2/pkg/compose.(*composeService).getCreateConfigs(_, {_, _}, _, {{0xc00037ff50, 0xa}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
        github.com/docker/compose/v2/pkg/compose/create.go:208 +0x1545
github.com/docker/compose/v2/pkg/compose.(*composeService).createMobyContainer(_, {_, _}, _, {{0xc00037ff50, 0xa}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
        github.com/docker/compose/v2/pkg/compose/convergence.go:582 +0x125
github.com/docker/compose/v2/pkg/compose.(*composeService).createContainer(_, {_, _}, _, {{0xc00037ff50, 0xa}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
        github.com/docker/compose/v2/pkg/compose/convergence.go:505 +0x285
github.com/docker/compose/v2/pkg/compose.(*convergence).ensureService.func5({0x2747d48, 0xc000447c20})
        github.com/docker/compose/v2/pkg/compose/convergence.go:209 +0x1ea
github.com/docker/compose/v2/pkg/compose.(*convergence).ensureService.EventWrapFuncForErrGroup.func9()
        github.com/docker/compose/v2/internal/tracing/wrap.go:85 +0xc6
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 136
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 115 [IO wait]:
internal/poll.runtime_pollWait(0x770ce84c6130, 0x72)
        runtime/netpoll.go:345 +0x85
internal/poll.(*pollDesc).wait(0xc000812080?, 0xc000816000?, 0x0)
        internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000812080, {0xc000816000, 0x1000, 0x1000})
        internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc000812080, {0xc000816000?, 0x0?, 0xc00023b180?})
        net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc000702020, {0xc000816000?, 0x0?, 0xc000622fc0?})
        net/net.go:185 +0x45
net/http.(*persistConn).Read(0xc0003ac240, {0xc000816000?, 0xc000806300?, 0xc000691d38?})
        net/http/transport.go:1977 +0x4a
bufio.(*Reader).fill(0xc0000d86c0)
        bufio/bufio.go:110 +0x103
bufio.(*Reader).Peek(0xc0000d86c0, 0x1)
        bufio/bufio.go:148 +0x53
net/http.(*persistConn).readLoop(0xc0003ac240)
        net/http/transport.go:2141 +0x1b9
created by net/http.(*Transport).dialConn in goroutine 114
        net/http/transport.go:1799 +0x152f

goroutine 116 [select]:
net/http.(*persistConn).writeLoop(0xc0003ac240)
        net/http/transport.go:2458 +0xf0
created by net/http.(*Transport).dialConn in goroutine 114
        net/http/transport.go:1800 +0x1585

goroutine 136 [semacquire]:
sync.runtime_Semacquire(0xc000572150?)
        runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0x21ec280?)
        sync/waitgroup.go:116 +0x48
golang.org/x/sync/errgroup.(*Group).Wait(0xc0002ea500)
        golang.org/x/[email protected]/errgroup/errgroup.go:56 +0x25
github.com/docker/compose/v2/pkg/compose.(*convergence).ensureService(_, {_, _}, _, {{0xc00037ff50, 0xa}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
        github.com/docker/compose/v2/pkg/compose/convergence.go:216 +0xd1f
github.com/docker/compose/v2/pkg/compose.(*composeService).create.(*convergence).apply.func1.1({0x2747d48, 0xc000447c20})
        github.com/docker/compose/v2/pkg/compose/convergence.go:103 +0x10b
github.com/docker/compose/v2/internal/tracing.SpanWrapFunc.func1({0x2747d80, 0xc0002b2cd0})
        github.com/docker/compose/v2/internal/tracing/wrap.go:43 +0x1c4
github.com/docker/compose/v2/pkg/compose.(*composeService).create.(*convergence).apply.func1({0x2747d80, 0xc0002b2cd0}, {0xc00037ff50, 0xa})
        github.com/docker/compose/v2/pkg/compose/convergence.go:104 +0x2e3
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).run.func1()
        github.com/docker/compose/v2/pkg/compose/dependencies.go:184 +0x99
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 55
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 137 [runnable]:
encoding/json.mapEncoder.encode.func1({{0x1e64700, 0xc000665a90, 0x16}, {0xc00013a3c0, 0x17}}, {{0x1e64700, 0xc000665b30, 0x16}, {0xc000133260, 0xe}})
        encoding/json/encode.go:751 +0xcb
slices.insertionSortCmpFunc[...]({0xc0009e8000?, 0xc, 0x41c865}, 0x0?, 0xc, 0x24ed068)
        slices/zsortanyfunc.go:12 +0x177
slices.pdqsortCmpFunc[...]({0xc0009e8000, 0xc, 0xc}, 0x1ecf920, 0xc000663470?, 0xc000924d40?, 0x24ed068?)
        slices/zsortanyfunc.go:73 +0x4fd
slices.SortFunc[...](...)
        slices/sort.go:30
encoding/json.mapEncoder.encode({0x15?}, 0xc000998080, {0x21241c0?, 0xc0009e0d00?, 0xc0009e0d00?}, {0xe?, 0x0?})
        encoding/json/encode.go:751 +0x437
encoding/json.structEncoder.encode({{{0xc00046b008, 0x59, 0x96}, 0xc000791950, 0xc000791980}}, 0xc000998080, {0x23998c0?, 0xc0009e0b08?, 0xc000069758?}, {0x0, ...})
        encoding/json/encode.go:704 +0x21e
encoding/json.(*encodeState).reflectValue(0xc000998080, {0x23998c0?, 0xc0009e0b08?, 0x6?}, {0x0?, 0xbc?})
        encoding/json/encode.go:321 +0x73
encoding/json.(*encodeState).marshal(0x413b1b?, {0x23998c0?, 0xc0009e0b08?}, {0x0?, 0x0?})
        encoding/json/encode.go:297 +0xc5
encoding/json.Marshal({0x23998c0, 0xc0009e0b08})
        encoding/json/encode.go:163 +0xd0
github.com/docker/compose/v2/pkg/compose.ServiceHash({{0xc00037eb80, 0xf}, {0xc000665a80, 0x1, 0x1}, 0x0, 0x0, 0x0, 0x0, 0x0, ...})
        github.com/docker/compose/v2/pkg/compose/hash.go:37 +0x8e
github.com/docker/compose/v2/pkg/compose.mustRecreate({{0xc00037eb80, 0xf}, {0xc000665a80, 0x1, 0x1}, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...)
        github.com/docker/compose/v2/pkg/compose/convergence.go:322 +0x8c
github.com/docker/compose/v2/pkg/compose.(*convergence).ensureService(_, {_, _}, _, {{0xc00037eb80, 0xf}, {0xc000665a80, 0x1, 0x1}, 0x0, ...}, ...)
        github.com/docker/compose/v2/pkg/compose/convergence.go:157 +0x60e
github.com/docker/compose/v2/pkg/compose.(*composeService).create.(*convergence).apply.func1.1({0x2747d48, 0xc0009d0090})
        github.com/docker/compose/v2/pkg/compose/convergence.go:103 +0x10b
github.com/docker/compose/v2/internal/tracing.SpanWrapFunc.func1({0x2747d80, 0xc0002b2cd0})
        github.com/docker/compose/v2/internal/tracing/wrap.go:43 +0x1c4
github.com/docker/compose/v2/pkg/compose.(*composeService).create.(*convergence).apply.func1({0x2747d80, 0xc0002b2cd0}, {0xc00037eb80, 0xf})
        github.com/docker/compose/v2/pkg/compose/convergence.go:104 +0x2e3
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).run.func1()
        github.com/docker/compose/v2/pkg/compose/dependencies.go:184 +0x99
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 55
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 140 [runnable]:
go.opentelemetry.io/otel/sdk/trace.parentBased.ShouldSample({{0x272d6d8, 0x39ed6e0}, {{0x272d6d8, 0x39ed6e0}, {0x272d6b0, 0x39ed6e0}, {0x272d6d8, 0x39ed6e0}, {0x272d6b0, 0x39ed6e0}}}, ...)
        go.opentelemetry.io/otel/[email protected]/trace/sampling.go:266 +0x799
go.opentelemetry.io/otel/sdk/trace.(*tracer).newSpan(0xc000372410, {0x2747d80, 0xc0002b2cd0}, {0x23ab265, 0xd}, 0xc00091ed68)
        go.opentelemetry.io/otel/[email protected]/trace/tracer.go:98 +0x462
go.opentelemetry.io/otel/sdk/trace.(*tracer).Start(0xc000372410, {0x2747d80, 0xc0002b2cd0}, {0x23ab265, 0xd}, {0xc0002e2ab0?, 0x4?, 0x0?})
        go.opentelemetry.io/otel/[email protected]/trace/tracer.go:55 +0x1d3
github.com/docker/compose/v2/internal/tracing.SpanWrapFunc.func1({0x2747d80, 0xc0002b2cd0})
        github.com/docker/compose/v2/internal/tracing/wrap.go:40 +0x15e
github.com/docker/compose/v2/pkg/compose.(*composeService).create.(*convergence).apply.func1({0x2747d80, 0xc0002b2cd0}, {0xc00037e790, 0x5})
        github.com/docker/compose/v2/pkg/compose/convergence.go:104 +0x2e3
github.com/docker/compose/v2/pkg/compose.(*graphTraversal).run.func1()
        github.com/docker/compose/v2/pkg/compose/dependencies.go:184 +0x99
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 55
        golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96
@calinpristavu calinpristavu changed the title [BUG] <title> [BUG] Panic in docker compose up -d Nov 28, 2024
@idsulik
Copy link
Collaborator

idsulik commented Nov 28, 2024

Looks like it was fixed here #12150 and released https://github.com/docker/compose/releases/tag/v2.30.0
Try to update the docker compose

@calinpristavu
Copy link
Author

Thank you, it was indeed fixed!

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

No branches or pull requests

2 participants