In BuildKit versions v0.26.0 through v0.34.1, a specific build definition that resolves metadata for the same Git source reference twice can cause the BuildKit daemon to panic and crash, interrupting builds handled by that daemon. The issue is fixed in v0.34.2.
Avoid untrusted build definitions. Only specific builds using Git dependencies trigger this issue.
Upgrade BuildKit to v0.34.2 or later.