status
stringclasses 1
value | repo_name
stringclasses 31
values | repo_url
stringclasses 31
values | issue_id
int64 1
104k
| title
stringlengths 4
233
| body
stringlengths 0
186k
⌀ | issue_url
stringlengths 38
56
| pull_url
stringlengths 37
54
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
timestamp[us, tz=UTC] | language
stringclasses 5
values | commit_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 7
188
| chunk_content
stringlengths 1
1.03M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed | dagger/dagger | https://github.com/dagger/dagger | 6,416 | ✨ Add name field to File | ### What are you trying to do?
Files passed to `dagger call` currently does not preserve the name of a file passed to it.
### Why is this important to you?
Some tools often require the original file name (for example: Spectral requires the file name do determine the file type)
Discussed it with @sipsma here: https://discord.com/channels/707636530424053791/1120503349599543376/1195832958150529165
### How are you currently working around this?
I pass the original file name to the module. | https://github.com/dagger/dagger/issues/6416 | https://github.com/dagger/dagger/pull/6431 | 61bf06b970402efa254a40f13c4aee98adfbdb42 | c716a042f290b11c6122d247f8b31651adb5f1d0 | 2024-01-13T21:04:31Z | go | 2024-01-17T16:17:48Z | sdk/go/dagger.gen.go | c: r.c,
}
}
func (r *TypeDef) ID(ctx context.Context) (TypeDefID, error) {
if r.id != nil {
return *r.id, nil
}
q := r.q.Select("id")
var response TypeDefID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *TypeDef) XXX_GraphQLType() string {
return "TypeDef"
}
func (r *TypeDef) XXX_GraphQLIDType() string {
return "TypeDefID"
}
func (r *TypeDef) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
func (r *TypeDef) MarshalJSON() ([]byte, error) {
id, err := r.ID(context.Background())
if err != nil {
return nil, err
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,416 | ✨ Add name field to File | ### What are you trying to do?
Files passed to `dagger call` currently does not preserve the name of a file passed to it.
### Why is this important to you?
Some tools often require the original file name (for example: Spectral requires the file name do determine the file type)
Discussed it with @sipsma here: https://discord.com/channels/707636530424053791/1120503349599543376/1195832958150529165
### How are you currently working around this?
I pass the original file name to the module. | https://github.com/dagger/dagger/issues/6416 | https://github.com/dagger/dagger/pull/6431 | 61bf06b970402efa254a40f13c4aee98adfbdb42 | c716a042f290b11c6122d247f8b31651adb5f1d0 | 2024-01-13T21:04:31Z | go | 2024-01-17T16:17:48Z | sdk/go/dagger.gen.go | return json.Marshal(id)
}
func (r *TypeDef) Kind(ctx context.Context) (TypeDefKind, error) {
if r.kind != nil {
return *r.kind, nil
}
q := r.q.Select("kind")
var response TypeDefKind
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *TypeDef) Optional(ctx context.Context) (bool, error) {
if r.optional != nil {
return *r.optional, nil
}
q := r.q.Select("optional")
var response bool
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *TypeDef) WithConstructor(function *Function) *TypeDef {
assertNotNil("function", function)
q := r.q.Select("withConstructor")
q = q.Arg("function", function)
return &TypeDef{
q: q,
c: r.c,
}
}
type TypeDefWithFieldOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,416 | ✨ Add name field to File | ### What are you trying to do?
Files passed to `dagger call` currently does not preserve the name of a file passed to it.
### Why is this important to you?
Some tools often require the original file name (for example: Spectral requires the file name do determine the file type)
Discussed it with @sipsma here: https://discord.com/channels/707636530424053791/1120503349599543376/1195832958150529165
### How are you currently working around this?
I pass the original file name to the module. | https://github.com/dagger/dagger/issues/6416 | https://github.com/dagger/dagger/pull/6431 | 61bf06b970402efa254a40f13c4aee98adfbdb42 | c716a042f290b11c6122d247f8b31651adb5f1d0 | 2024-01-13T21:04:31Z | go | 2024-01-17T16:17:48Z | sdk/go/dagger.gen.go | Description string
}
func (r *TypeDef) WithField(name string, typeDef *TypeDef, opts ...TypeDefWithFieldOpts) *TypeDef {
assertNotNil("typeDef", typeDef)
q := r.q.Select("withField")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
}
}
q = q.Arg("name", name)
q = q.Arg("typeDef", typeDef)
return &TypeDef{
q: q,
c: r.c,
}
}
func (r *TypeDef) WithFunction(function *Function) *TypeDef {
assertNotNil("function", function)
q := r.q.Select("withFunction")
q = q.Arg("function", function)
return &TypeDef{
q: q,
c: r.c,
}
}
type TypeDefWithInterfaceOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,416 | ✨ Add name field to File | ### What are you trying to do?
Files passed to `dagger call` currently does not preserve the name of a file passed to it.
### Why is this important to you?
Some tools often require the original file name (for example: Spectral requires the file name do determine the file type)
Discussed it with @sipsma here: https://discord.com/channels/707636530424053791/1120503349599543376/1195832958150529165
### How are you currently working around this?
I pass the original file name to the module. | https://github.com/dagger/dagger/issues/6416 | https://github.com/dagger/dagger/pull/6431 | 61bf06b970402efa254a40f13c4aee98adfbdb42 | c716a042f290b11c6122d247f8b31651adb5f1d0 | 2024-01-13T21:04:31Z | go | 2024-01-17T16:17:48Z | sdk/go/dagger.gen.go | Description string
}
func (r *TypeDef) WithInterface(name string, opts ...TypeDefWithInterfaceOpts) *TypeDef {
q := r.q.Select("withInterface")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
}
}
q = q.Arg("name", name)
return &TypeDef{
q: q,
c: r.c,
}
}
func (r *TypeDef) WithKind(kind TypeDefKind) *TypeDef {
q := r.q.Select("withKind")
q = q.Arg("kind", kind)
return &TypeDef{
q: q,
c: r.c,
}
}
func (r *TypeDef) WithListOf(elementType *TypeDef) *TypeDef { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,416 | ✨ Add name field to File | ### What are you trying to do?
Files passed to `dagger call` currently does not preserve the name of a file passed to it.
### Why is this important to you?
Some tools often require the original file name (for example: Spectral requires the file name do determine the file type)
Discussed it with @sipsma here: https://discord.com/channels/707636530424053791/1120503349599543376/1195832958150529165
### How are you currently working around this?
I pass the original file name to the module. | https://github.com/dagger/dagger/issues/6416 | https://github.com/dagger/dagger/pull/6431 | 61bf06b970402efa254a40f13c4aee98adfbdb42 | c716a042f290b11c6122d247f8b31651adb5f1d0 | 2024-01-13T21:04:31Z | go | 2024-01-17T16:17:48Z | sdk/go/dagger.gen.go | assertNotNil("elementType", elementType)
q := r.q.Select("withListOf")
q = q.Arg("elementType", elementType)
return &TypeDef{
q: q,
c: r.c,
}
}
type TypeDefWithObjectOpts struct {
Description string
}
func (r *TypeDef) WithObject(name string, opts ...TypeDefWithObjectOpts) *TypeDef {
q := r.q.Select("withObject")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
}
}
q = q.Arg("name", name)
return &TypeDef{
q: q,
c: r.c,
}
}
func (r *TypeDef) WithOptional(optional bool) *TypeDef {
q := r.q.Select("withOptional")
q = q.Arg("optional", optional)
return &TypeDef{
q: q, |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,416 | ✨ Add name field to File | ### What are you trying to do?
Files passed to `dagger call` currently does not preserve the name of a file passed to it.
### Why is this important to you?
Some tools often require the original file name (for example: Spectral requires the file name do determine the file type)
Discussed it with @sipsma here: https://discord.com/channels/707636530424053791/1120503349599543376/1195832958150529165
### How are you currently working around this?
I pass the original file name to the module. | https://github.com/dagger/dagger/issues/6416 | https://github.com/dagger/dagger/pull/6431 | 61bf06b970402efa254a40f13c4aee98adfbdb42 | c716a042f290b11c6122d247f8b31651adb5f1d0 | 2024-01-13T21:04:31Z | go | 2024-01-17T16:17:48Z | sdk/go/dagger.gen.go | c: r.c,
}
}
type CacheSharingMode string
func (CacheSharingMode) IsEnum() {}
const (
Locked CacheSharingMode = "LOCKED"
Private CacheSharingMode = "PRIVATE"
Shared CacheSharingMode = "SHARED"
)
type ImageLayerCompression string
func (ImageLayerCompression) IsEnum() {}
const (
Estargz ImageLayerCompression = "EStarGZ"
Gzip ImageLayerCompression = "Gzip"
Uncompressed ImageLayerCompression = "Uncompressed"
Zstd ImageLayerCompression = "Zstd"
)
type ImageMediaTypes string
func (ImageMediaTypes) IsEnum() {}
const (
Dockermediatypes ImageMediaTypes = "DockerMediaTypes"
Ocimediatypes ImageMediaTypes = "OCIMediaTypes"
)
type NetworkProtocol string
func (NetworkProtocol) IsEnum() {}
const ( |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,416 | ✨ Add name field to File | ### What are you trying to do?
Files passed to `dagger call` currently does not preserve the name of a file passed to it.
### Why is this important to you?
Some tools often require the original file name (for example: Spectral requires the file name do determine the file type)
Discussed it with @sipsma here: https://discord.com/channels/707636530424053791/1120503349599543376/1195832958150529165
### How are you currently working around this?
I pass the original file name to the module. | https://github.com/dagger/dagger/issues/6416 | https://github.com/dagger/dagger/pull/6431 | 61bf06b970402efa254a40f13c4aee98adfbdb42 | c716a042f290b11c6122d247f8b31651adb5f1d0 | 2024-01-13T21:04:31Z | go | 2024-01-17T16:17:48Z | sdk/go/dagger.gen.go | Tcp NetworkProtocol = "TCP"
Udp NetworkProtocol = "UDP"
)
type TypeDefKind string
func (TypeDefKind) IsEnum() {}
const (
BooleanKind TypeDefKind = "BOOLEAN_KIND"
IntegerKind TypeDefKind = "INTEGER_KIND"
InterfaceKind TypeDefKind = "INTERFACE_KIND"
ListKind TypeDefKind = "LIST_KIND"
ObjectKind TypeDefKind = "OBJECT_KIND"
StringKind TypeDefKind = "STRING_KIND"
VoidKind TypeDefKind = "VOID_KIND"
) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/call.go | package main
import (
"fmt"
"github.com/spf13/cobra"
)
var callCmd = &FuncCommand{
Name: "call",
Short: "Call a module function",
Long: "Call a module function and print the result.\n\nOn a container, the stdout will be returned. On a directory, the list of entries, and on a file, its contents.",
OnSelectObjectLeaf: func(c *FuncCommand, name string) error {
switch name {
case Container:
c.Select("stdout")
case Directory:
c.Select("entries")
case File:
c.Select("contents")
default:
return fmt.Errorf("return type %q requires a sub-command", name)
}
return nil
},
AfterResponse: func(_ *FuncCommand, cmd *cobra.Command, _ *modTypeDef, response any) error {
return printResponse(cmd, response)
},
}
func printResponse(cmd *cobra.Command, r any) error { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/call.go | switch t := r.(type) {
case []any:
for _, v := range t {
if err := printResponse(cmd, v); err != nil {
return err
}
}
return nil
case map[string]any:
for _, v := range t {
if err := printResponse(cmd, v); err != nil {
return err
}
}
return nil
default:
cmd.Printf("%+v\n", t)
}
return nil
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/download.go | package main
import (
"fmt"
"github.com/spf13/cobra"
)
var exportPath string
var downloadCmd = &FuncCommand{
Name: "download",
Aliases: []string{"export", "dl"},
Short: "Download an asset from module function",
Long: "Download an asset returned by a module function and save it to the host.\n\nWorks with a Directory, File or Container.",
Init: func(cmd *cobra.Command) {
cmd.PersistentFlags().StringVarP(&exportPath, "output", "o", ".", "Path to export to")
},
OnSelectObjectLeaf: func(c *FuncCommand, name string) error {
switch name {
case Directory, File, Container:
c.Select("export")
c.Arg("path", exportPath)
if name == File {
c.Arg("allowParentDirPath", true) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/download.go | }
return nil
default:
return fmt.Errorf("return type %q cannot be downloaded", name)
}
},
BeforeRequest: func(_ *FuncCommand, cmd *cobra.Command, returnType *modTypeDef) error {
switch returnType.Name() {
case Directory, File, Container:
flag := cmd.Flags().Lookup("output")
if returnType.Name() == Container && flag != nil && !flag.Changed {
return fmt.Errorf("flag --output is required for containers")
}
return nil
}
return fmt.Errorf("return type not supported: %s", printReturnType(returnType))
},
AfterResponse: func(_ *FuncCommand, cmd *cobra.Command, _ *modTypeDef, response any) error {
status, ok := response.(bool)
if !ok {
return fmt.Errorf("unexpected response %T: %+v", response, response)
}
if !status {
return fmt.Errorf("failed to export asset to %q", exportPath)
}
cmd.Printf("Asset exported to %q\n", exportPath)
return nil
},
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | package main
import (
"context"
"errors"
"fmt"
"io"
"os"
"sort"
"strings"
"dagger.io/dagger"
"dagger.io/dagger/querybuilder"
"github.com/dagger/dagger/engine/client"
"github.com/juju/ansiterm/tabwriter"
"github.com/muesli/termenv"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/vito/progrock"
)
const (
Directory string = "Directory"
Container string = "Container"
File string = "File"
Secret string = "Secret"
Service string = "Service"
)
var funcGroup = &cobra.Group{
ID: "functions",
Title: "Functions",
}
var funcCmds = FuncCommands{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | funcListCmd,
callCmd,
shellCmd,
downloadCmd,
upCmd,
}
var funcListCmd = &FuncCommand{
Name: "functions",
Short: `List available functions`,
Execute: func(fc *FuncCommand, cmd *cobra.Command) error {
tw := tabwriter.NewWriter(cmd.OutOrStdout(), 0, 0, 3, ' ', tabwriter.DiscardEmptyColumns)
var o functionProvider = fc.mod.GetMainObject()
fmt.Fprintf(tw, "%s\t%s\n",
termenv.String("Name").Bold(),
termenv.String("Description").Bold(),
)
for _, field := range cmd.Flags().Args() {
nextFunc, err := o.GetFunction(field)
if err != nil {
return err
}
nextType := nextFunc.ReturnType
if nextType.AsFunctionProvider() != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | o = fc.mod.GetFunctionProvider(nextType.Name())
continue
}
return fmt.Errorf("function '%s' returns non-object type %v", field, nextType.Kind)
}
fns := o.GetFunctions()
sort.Slice(fns, func(i, j int) bool {
return fns[i].Name < fns[j].Name
})
for _, fn := range fns {
desc := strings.SplitN(fn.Description, "\n", 2)[0]
if desc == "" {
desc = "-"
}
fmt.Fprintf(tw, "%s\t%s\n",
cliName(fn.Name),
desc,
)
}
return tw.Flush()
},
}
func printReturnType(returnType *modTypeDef) (n string) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | defer func() {
if !returnType.Optional {
n += "!"
}
}()
switch returnType.Kind {
case dagger.StringKind:
return "String"
case dagger.IntegerKind:
return "Int"
case dagger.BooleanKind:
return "Boolean"
case dagger.ObjectKind:
return returnType.AsObject.Name
case dagger.InterfaceKind:
return returnType.AsInterface.Name
case dagger.ListKind:
return fmt.Sprintf("[%s]", printReturnType(returnType.AsList.ElementTypeDef))
default:
return ""
}
}
type FuncCommands []*FuncCommand
func (fcs FuncCommands) AddFlagSet(flags *pflag.FlagSet) {
for _, cmd := range fcs.All() {
cmd.PersistentFlags().AddFlagSet(flags)
}
}
func (fcs FuncCommands) AddParent(rootCmd *cobra.Command) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | rootCmd.AddGroup(funcGroup)
rootCmd.AddCommand(fcs.All()...)
}
func (fcs FuncCommands) All() []*cobra.Command {
cmds := make([]*cobra.Command, len(fcs))
for i, fc := range fcs {
cmds[i] = fc.Command()
}
return cmds
}
func setCmdOutput(cmd *cobra.Command, vtx *progrock.VertexRecorder) {
if silent {
return
}
var stdout io.Writer
var stderr io.Writer
if stdoutIsTTY {
stdout = vtx.Stdout()
} else {
stdout = os.Stdout
}
if stderrIsTTY {
stderr = vtx.Stderr()
} else {
stderr = os.Stderr
}
cmd.SetOut(stdout)
cmd.SetErr(stderr)
}
type FuncCommand struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | Name string
Aliases []string
Short string
Long string
Example string
Init func(*cobra.Command)
Execute func(*FuncCommand, *cobra.Command) error
BeforeParse func(*FuncCommand, *cobra.Command, *modFunction) error |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | OnSelectObjectLeaf func(*FuncCommand, string) error
BeforeRequest func(*FuncCommand, *cobra.Command, *modTypeDef) error
AfterResponse func(*FuncCommand, *cobra.Command, *modTypeDef, any) error
cmd *cobra.Command
mod *moduleDef
showHelp bool
showUsage bool
q *querybuilder.Selection
c *client.Client
}
func (fc *FuncCommand) Command() *cobra.Command {
if fc.cmd == nil {
use := fmt.Sprintf("%s [flags] [command [flags]]...", fc.Name)
disableFlagsInUse := true
if fc.Execute != nil {
use = fc.Name
disableFlagsInUse = false
}
fc.cmd = &cobra.Command{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | Use: use,
Aliases: fc.Aliases,
Short: fc.Short,
Long: fc.Long,
Example: fc.Example,
GroupID: funcGroup.ID,
Hidden: true,
DisableFlagParsing: true,
DisableFlagsInUseLine: disableFlagsInUse,
PreRunE: func(c *cobra.Command, a []string) error {
c.DisableFlagParsing = false
c.Flags().SetInterspersed(false)
c.SetGlobalNormalizationFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName {
return pflag.NormalizedName(cliName(name))
}) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | c.FParseErrWhitelist.UnknownFlags = true
if err := c.ParseFlags(a); err != nil {
return c.FlagErrorFunc()(c, err)
}
c.FParseErrWhitelist.UnknownFlags = false
fc.showHelp, _ = c.Flags().GetBool("help")
return nil
},
RunE: func(c *cobra.Command, a []string) error {
return withEngineAndTUI(c.Context(), client.Params{}, func(ctx context.Context, engineClient *client.Client) (rerr error) {
fc.c = engineClient
c.SetContext(ctx)
c.SilenceErrors = true
return fc.execute(c, a)
})
},
}
if fc.Init != nil {
fc.Init(fc.cmd)
}
}
return fc.cmd |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | }
func (fc *FuncCommand) execute(c *cobra.Command, a []string) (rerr error) {
ctx := c.Context()
rec := progrock.FromContext(ctx)
loader := rec.Vertex("cmd-func-loader", "load "+c.Name())
setCmdOutput(c, loader)
cmd, flags, err := fc.load(c, a, loader)
loader.Done(err)
if err != nil {
return err
}
vtx := rec.Vertex("cmd-func-exec", cmd.CommandPath(), progrock.Focused())
setCmdOutput(c, vtx)
defer func() {
if rerr != nil {
cmd.PrintErrln("Error:", rerr.Error())
if fc.showUsage {
cmd.PrintErrf("Run '%v --help' for usage.\n", cmd.CommandPath())
}
}
vtx.Done(rerr)
}()
if fc.showHelp {
if cmd != c { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | cmd.Aliases = nil
}
return cmd.Help()
}
if err := cobra.NoArgs(cmd, flags); err != nil {
return err
}
if fc.Execute != nil {
return fc.Execute(fc, cmd)
}
if cmd == c {
return cmd.Help()
}
err = cmd.RunE(cmd, flags)
if err != nil {
return err
}
return nil
}
func (fc *FuncCommand) load(c *cobra.Command, a []string, vtx *progrock.VertexRecorder) (cmd *cobra.Command, _ []string, rerr error) {
ctx := c.Context()
dag := fc.c.Dagger()
defer func() {
if cmd == nil {
cmd = c
}
if rerr != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | cmd.PrintErrln("Error:", rerr.Error())
if fc.showHelp {
cmd.Help()
}
if fc.showUsage {
cmd.PrintErrf("Run '%v --help' for usage.\n", cmd.CommandPath())
}
}
}()
load := vtx.Task("loading module")
mod, err := loadMod(ctx, dag)
load.Done(err)
if err != nil {
return nil, nil, err
}
if mod == nil {
return nil, nil, fmt.Errorf("no module specified and no default module found in current directory")
}
load = vtx.Task("loading objects")
modDef, err := loadModTypeDefs(ctx, dag, mod)
load.Done(err)
if err != nil {
return nil, nil, err
}
obj := modDef.GetMainObject()
if obj == nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | return nil, nil, fmt.Errorf("main object not found")
}
fc.mod = modDef
if fc.Execute != nil {
return nil, nil, nil
}
if obj.Constructor != nil {
if err := fc.addArgsForFunction(c, a, obj.Constructor, dag); err != nil {
return nil, nil, err
}
fc.selectFunc(obj.Name, obj.Constructor, c, dag)
} else {
fc.Select(obj.Name)
}
fc.addSubCommands(c, dag, obj)
if fc.showHelp {
return nil, nil, nil
}
traverse := vtx.Task("traversing arguments")
cmd, flags, err := fc.traverse(c)
defer func() { traverse.Done(rerr) }()
if err != nil {
if errors.Is(err, pflag.ErrHelp) {
fc.showHelp = true
return cmd, flags, nil
}
fc.showUsage = true |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | return cmd, flags, err
}
return cmd, flags, nil
}
func (fc *FuncCommand) traverse(c *cobra.Command) (*cobra.Command, []string, error) {
cmd, args, err := c.Find(c.Flags().Args())
if err != nil {
return cmd, args, err
}
if cmd == c {
return cmd, args, nil
}
cmd.SetContext(c.Context())
cmd.InitDefaultHelpFlag()
err = cmd.PreRunE(cmd, args)
if err != nil {
return cmd, args, err
}
return fc.traverse(cmd)
}
func (fc *FuncCommand) addSubCommands(cmd *cobra.Command, dag *dagger.Client, fnProvider functionProvider) {
if fnProvider != nil {
for _, fn := range fnProvider.GetFunctions() {
subCmd := fc.makeSubCmd(dag, fn)
cmd.AddCommand(subCmd)
}
}
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | func (fc *FuncCommand) makeSubCmd(dag *dagger.Client, fn *modFunction) *cobra.Command {
newCmd := &cobra.Command{
Use: cliName(fn.Name),
Short: fn.Description,
PreRunE: func(cmd *cobra.Command, args []string) (err error) {
if err := fc.addArgsForFunction(cmd, args, fn, dag); err != nil {
return err
}
fnProvider := fn.ReturnType.AsFunctionProvider()
if fnProvider == nil && fn.ReturnType.AsList != nil {
fnProvider = fn.ReturnType.AsList.ElementTypeDef.AsFunctionProvider()
}
fc.addSubCommands(cmd, dag, fnProvider)
help, _ := cmd.Flags().GetBool("help")
if help {
return pflag.ErrHelp
}
return fc.selectFunc(fn.Name, fn, cmd, dag)
},
RunE: func(cmd *cobra.Command, args []string) (err error) {
switch fn.ReturnType.Kind {
case dagger.ObjectKind, dagger.InterfaceKind:
if fc.OnSelectObjectLeaf == nil {
fc.showUsage = true
return fmt.Errorf("%q requires a sub-command", cmd.Name()) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | }
err := fc.OnSelectObjectLeaf(fc, fn.ReturnType.Name())
if err != nil {
fc.showUsage = true
return fmt.Errorf("invalid selection for command %q: %w", cmd.Name(), err)
}
case dagger.ListKind:
fnProvider := fn.ReturnType.AsList.ElementTypeDef.AsFunctionProvider()
if fnProvider != nil && len(fnProvider.GetFunctions()) > 0 {
fc.showUsage = true
return fmt.Errorf("%q requires a sub-command", cmd.Name())
}
}
if fc.BeforeRequest != nil {
if err = fc.BeforeRequest(fc, cmd, fn.ReturnType); err != nil {
return err
}
}
ctx := cmd.Context()
query, _ := fc.q.Build(ctx)
rec := progrock.FromContext(ctx)
rec.Debug("executing", progrock.Labelf("query", "%+v", query))
var response any
q := fc.q.Bind(&response)
if err := q.Execute(ctx, dag.GraphQLClient()); err != nil {
return fmt.Errorf("response from query: %w", err)
}
if fc.AfterResponse != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | return fc.AfterResponse(fc, cmd, fn.ReturnType, response)
}
if fn.ReturnType.Kind != dagger.VoidKind {
cmd.Println(response)
}
return nil
},
}
if fn.Name != newCmd.Name() {
newCmd.Aliases = append(newCmd.Aliases, fn.Name)
}
newCmd.Flags().SetInterspersed(false)
return newCmd
}
func (fc *FuncCommand) addArgsForFunction(cmd *cobra.Command, cmdArgs []string, fn *modFunction, dag *dagger.Client) error {
fc.mod.LoadTypeDef(fn.ReturnType)
for _, arg := range fn.Args {
fc.mod.LoadTypeDef(arg.TypeDef)
}
for _, arg := range fn.Args {
_, err := arg.AddFlag(cmd.Flags(), dag)
if err != nil {
return err
}
if !arg.TypeDef.Optional {
cmd.MarkFlagRequired(arg.FlagName())
}
}
if fc.BeforeParse != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | if err := fc.BeforeParse(fc, cmd, fn); err != nil {
return err
}
}
if err := cmd.ParseFlags(cmdArgs); err != nil {
return cmd.FlagErrorFunc()(cmd, err)
}
help, _ := cmd.Flags().GetBool("help")
if !help {
if err := cmd.ValidateRequiredFlags(); err != nil {
return err
}
if err := cmd.ValidateFlagGroups(); err != nil {
return err
}
}
return nil
}
func (fc *FuncCommand) selectFunc(selectName string, fn *modFunction, cmd *cobra.Command, dag *dagger.Client) error {
fc.Select(selectName)
for _, arg := range fn.Args {
var val any
flag := cmd.Flags().Lookup(arg.FlagName())
if flag == nil {
return fmt.Errorf("no flag for %q", arg.FlagName())
}
if arg.TypeDef.Optional && !flag.Changed { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | cmd/dagger/functions.go | continue
}
val = flag.Value
switch v := val.(type) {
case DaggerValue:
obj, err := v.Get(cmd.Context(), dag)
if err != nil {
return fmt.Errorf("failed to get value for argument %q: %w", arg.Name, err)
}
if obj == nil {
return fmt.Errorf("no value for argument: %s", arg.Name)
}
val = obj
case pflag.SliceValue:
val = v.GetSlice()
}
fc.Arg(arg.Name, val)
}
return nil
}
func (fc *FuncCommand) Select(name string) {
if fc.q == nil {
fc.q = querybuilder.Query()
}
fc.q = fc.q.Select(gqlFieldName(name))
}
func (fc *FuncCommand) Arg(name string, value any) {
fc.q = fc.q.Arg(gqlArgName(name), value)
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | package core
import (
"fmt"
"strings"
"testing"
"dagger.io/dagger"
"github.com/stretchr/testify/require"
)
func TestModuleDaggerCallArgTypes(t *testing.T) {
t.Parallel()
c, ctx := connect(t)
t.Run("service args", func(t *testing.T) {
t.Parallel()
t.Run("used as service binding", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | Contents: `package main
import (
"context"
)
type Test struct {}
func (m *Test) Fn(ctx context.Context, svc *Service) (string, error) {
return dag.Container().From("alpine:3.18").WithExec([]string{"apk", "add", "curl"}).
WithServiceBinding("daserver", svc).
WithExec([]string{"curl", "http://daserver:8000"}).
Stdout(ctx)
}
`,
})
logGen(ctx, t, modGen.Directory("."))
httpServer, _ := httpService(ctx, t, c, "im up")
endpoint, err := httpServer.Endpoint(ctx)
require.NoError(t, err)
out, err := modGen.
WithServiceBinding("testserver", httpServer).
With(daggerCall("fn", "--svc", "tcp://"+endpoint)).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, strings.TrimSpace(out), "im up")
})
t.Run("used directly", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | Contents: `package main
import (
"context"
"fmt"
"strings"
)
type Test struct {}
func (m *Test) Fn(ctx context.Context, svc *Service) (string, error) {
ports, err := svc.Ports(ctx)
if err != nil {
return "", err
}
var out []string
out = append(out, fmt.Sprintf("%d exposed ports:", len(ports)))
for _, port := range ports {
number, err := port.Port(ctx)
if err != nil {
return "", err
}
out = append(out, fmt.Sprintf("- TCP/%d", number))
}
return strings.Join(out, "\n"), nil
}
`,
})
logGen(ctx, t, modGen.Directory("."))
httpServer, _ := httpService(ctx, t, c, "im up")
endpoint, err := httpServer.Endpoint(ctx)
require.NoError(t, err)
out, err := modGen. |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | WithServiceBinding("testserver", httpServer).
With(daggerCall("fn", "--svc", "tcp://"+endpoint)).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, strings.TrimSpace(out), "1 exposed ports:\n- TCP/8000")
})
})
t.Run("list args", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")).
WithNewFile("foo.txt", dagger.ContainerWithNewFileOpts{
Contents: "bar",
}).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
import (
"context"
"strings"
)
type Minimal struct {}
func (m *Minimal) Hello(msgs []string) string {
return strings.Join(msgs, "+")
}
func (m *Minimal) Reads(ctx context.Context, files []File) (string, error) {
var contents []string
for _, f := range files {
content, err := f.Contents(ctx)
if err != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | return "", err
}
contents = append(contents, content)
}
return strings.Join(contents, "+"), nil
}
`,
})
logGen(ctx, t, modGen.Directory("."))
out, err := modGen.With(daggerCall("hello", "--msgs", "yo", "--msgs", "my", "--msgs", "friend")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, strings.TrimSpace(out), "yo+my+friend")
out, err = modGen.With(daggerCall("reads", "--files=foo.txt", "--files=foo.txt")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, strings.TrimSpace(out), "bar+bar")
})
t.Run("directory arg inputs", func(t *testing.T) {
t.Parallel()
t.Run("local dir", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("/dir/subdir/foo.txt", dagger.ContainerWithNewFileOpts{
Contents: "foo",
}).
WithNewFile("/dir/subdir/bar.txt", dagger.ContainerWithNewFileOpts{
Contents: "bar",
}). |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
type Test struct {}
func (m *Test) Fn(dir *Directory) *Directory {
return dir
}
`,
})
out, err := modGen.With(daggerCall("fn", "--dir", "/dir/subdir")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt")
out, err = modGen.With(daggerCall("fn", "--dir", "file:///dir/subdir")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt")
})
t.Run("git dir", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
type Test struct {}
func (m *Test) Fn(dir *Directory, subpath Optional[string]) *Directory {
return dir.Directory(subpath.GetOr("."))
}
`,
})
for _, tc := range []struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | baseURL string
subpath string
}{
{
baseURL: "https://github.com/dagger/dagger",
},
{
baseURL: "https://github.com/dagger/dagger",
subpath: ".changes",
},
{
baseURL: "https://github.com/dagger/dagger.git",
},
{
baseURL: "https://github.com/dagger/dagger.git",
subpath: ".changes",
},
} {
tc := tc
t.Run(fmt.Sprintf("%s:%s", tc.baseURL, tc.subpath), func(t *testing.T) {
t.Parallel()
url := tc.baseURL + "#v0.9.1"
if tc.subpath != "" {
url += ":" + tc.subpath
}
args := []string{"fn", "--dir", url}
if tc.subpath == "" {
args = append(args, "--subpath", ".changes") |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | }
out, err := modGen.With(daggerCall(args...)).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, out, "v0.9.1.md")
require.NotContains(t, out, "v0.9.2.md")
})
}
})
})
t.Run("secret args", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
import "context"
type Test struct {}
func (m *Test) Insecure(ctx context.Context, token *Secret) (string, error) {
return token.Plaintext(ctx)
}
`,
}).
WithEnvVariable("TOPSECRET", "shhh").
WithNewFile("/mysupersecret", dagger.ContainerWithNewFileOpts{Contents: "file shhh"})
t.Run("explicit env", func(t *testing.T) {
t.Parallel()
t.Run("happy", func(t *testing.T) {
t.Parallel() |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | out, err := modGen.With(daggerCall("insecure", "--token", "env:TOPSECRET")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "shhh", strings.TrimSpace(out))
})
t.Run("sad", func(t *testing.T) {
t.Parallel()
_, err := modGen.With(daggerCall("insecure", "--token", "env:NOWHERETOBEFOUND")).Stdout(ctx)
require.ErrorContains(t, err, `secret env var not found: "NOW..."`)
})
})
t.Run("implicit env", func(t *testing.T) {
t.Parallel()
t.Run("happy", func(t *testing.T) {
t.Parallel()
out, err := modGen.With(daggerCall("insecure", "--token", "TOPSECRET")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "shhh", strings.TrimSpace(out))
})
t.Run("sad", func(t *testing.T) {
t.Parallel()
_, err := modGen.With(daggerCall("insecure", "--token", "NOWHERETOBEFOUND")).Stdout(ctx)
require.ErrorContains(t, err, `secret env var not found: "NOW..."`)
})
})
t.Run("file", func(t *testing.T) {
t.Parallel()
t.Run("happy", func(t *testing.T) {
t.Parallel()
out, err := modGen.With(daggerCall("insecure", "--token", "file:/mysupersecret")).Stdout(ctx)
require.NoError(t, err) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | require.Equal(t, "file shhh", strings.TrimSpace(out))
})
t.Run("sad", func(t *testing.T) {
t.Parallel()
_, err := modGen.With(daggerCall("insecure", "--token", "file:/nowheretobefound")).Stdout(ctx)
require.ErrorContains(t, err, `failed to read secret file "/nowheretobefound": open /nowheretobefound: no such file or directory`)
})
})
t.Run("cmd", func(t *testing.T) {
t.Parallel()
t.Run("happy", func(t *testing.T) {
t.Parallel()
out, err := modGen.With(daggerCall("insecure", "--token", "cmd:echo -n cmd shhh")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "cmd shhh", strings.TrimSpace(out))
})
t.Run("sad", func(t *testing.T) {
t.Parallel()
_, err := modGen.With(daggerCall("insecure", "--token", "cmd:exit 1")).Stdout(ctx)
require.ErrorContains(t, err, `failed to run secret command "exit 1": exit status 1`)
})
})
t.Run("invalid source", func(t *testing.T) {
t.Parallel()
_, err := modGen.With(daggerCall("insecure", "--token", "wtf:HUH")).Stdout(ctx)
require.ErrorContains(t, err, `unsupported secret arg source: "wtf"`)
})
})
}
func TestModuleDaggerCallReturnTypes(t *testing.T) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | t.Parallel()
c, ctx := connect(t)
t.Run("return list objects", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
type Minimal struct {}
type Foo struct {
Bar int ` + "`" + `json:"bar"` + "`" + `
}
func (m *Minimal) Fn() []*Foo {
var foos []*Foo
for i := 0; i < 3; i++ {
foos = append(foos, &Foo{Bar: i})
}
return foos
}
`,
})
logGen(ctx, t, modGen.Directory(".")) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | out, err := modGen.With(daggerCall("fn", "bar")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, strings.TrimSpace(out), "0\n1\n2")
})
t.Run("return container", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
func New() *Test {
return &Test{Ctr: dag.Container().From("alpine:3.18").WithExec([]string{"echo", "hello", "world"})}
}
type Test struct {
Ctr *Container
}
`,
})
out, err := modGen.With(daggerCall("ctr")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "hello world", strings.TrimSpace(out))
})
t.Run("return directory", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")). |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
func New() *Test {
return &Test{
Dir: dag.Directory().WithNewFile("foo.txt", "foo").WithNewFile("bar.txt", "bar"),
}
}
type Test struct {
Dir *Directory
}
`,
})
out, err := modGen.With(daggerCall("dir")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "bar.txt\nfoo.txt", strings.TrimSpace(out))
})
t.Run("return file", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
func New() *Test {
return &Test{
File: dag.Directory().WithNewFile("foo.txt", "foo").File("foo.txt"),
}
}
type Test struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | File *File
}
`,
})
out, err := modGen.With(daggerCall("file")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "foo", strings.TrimSpace(out))
})
t.Run("sync", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
func New() *Test {
return &Test{Ctr: dag.Container().From("alpine:3.18").WithExec([]string{"echo", "hello", "world"})}
}
type Test struct {
Ctr *Container
}
`,
})
_, err := modGen.With(daggerCall("ctr", "sync")).Stdout(ctx)
require.NoError(t, err)
})
}
func TestModuleDaggerCallCoreChaining(t *testing.T) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | t.Parallel()
c, ctx := connect(t)
t.Run("container", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
func New() *Test { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | return &Test{Ctr: dag.Container().From("alpine:3.18.5")}
}
type Test struct {
Ctr *Container
}
`,
})
t.Run("file", func(t *testing.T) {
t.Parallel()
out, err := modGen.With(daggerCall("ctr", "file", "--path=/etc/alpine-release", "contents")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "3.18.5", strings.TrimSpace(out))
})
t.Run("export", func(t *testing.T) {
t.Parallel()
modGen, err := modGen.With(daggerCall("ctr", "export", "--path=./container.tar.gz")).Sync(ctx)
require.NoError(t, err)
size, err := modGen.File("./container.tar.gz").Size(ctx)
require.NoError(t, err)
require.Greater(t, size, 0)
})
})
t.Run("directory", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work").
With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | func New() *Test {
return &Test{
Dir: dag.Directory().WithNewFile("foo.txt", "foo").WithNewFile("bar.txt", "bar"),
}
}
type Test struct {
Dir *Directory
}
`,
})
t.Run("file", func(t *testing.T) {
t.Parallel()
out, err := modGen.With(daggerCall("dir", "file", "--path=foo.txt", "contents")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "foo", strings.TrimSpace(out))
})
t.Run("export", func(t *testing.T) {
t.Parallel()
modGen, err := modGen.With(daggerCall("dir", "export", "--path=./outdir")).Sync(ctx)
require.NoError(t, err)
ents, err := modGen.Directory("./outdir").Entries(ctx)
require.NoError(t, err)
require.Equal(t, []string{"bar.txt", "foo.txt"}, ents)
})
})
t.Run("return file", func(t *testing.T) {
t.Parallel()
modGen := c.Container().From(golangImage).
WithMountedFile(testCLIBinPath, daggerCliFile(t, c)).
WithWorkdir("/work"). |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,357 | CLI: support for `-o` flag | As described in [this comment](https://github.com/dagger/dagger/issues/6229#issuecomment-1863649336), we want to add a `-o` flag for smartly redirecting output in `dagger call`.
---
This flag would be applicable for any return type and result in that result being written to the caller's filesystem rather than written to stdout.
For simple cases like a `string` return type, this would have the same end effect as a shell redirection. The difference is that we would allow *some* special case handling for it too. So if `myfunc` returns a `Directory`, this would work:
```
dagger run -o ./some/output/dir myfunc
```
and result in the the directory returned by `myfunc` to be written to `./some/output/dir`.
To start, `-o` would be exclusively for writing to the cli caller's filesystem.
* I suppose you could in theory expand to other output destinations via a `scheme://` type approach if we ever wanted to, but that's just a possible future extension point, not in scope now and just a random idea.
Also important to note that this would not inherently *remove* support for the full `... export --path ./some/output/dir` style either, it would just be a supplement to it. | https://github.com/dagger/dagger/issues/6357 | https://github.com/dagger/dagger/pull/6432 | 5201d6cf969a539189ec996eaa543233e20edd21 | 829fe2ca13b97ac3a4ee98401ebea7c7d1f4a9dd | 2024-01-03T19:54:37Z | go | 2024-01-22T17:33:09Z | core/integration/module_call_test.go | With(daggerExec("mod", "init", "--name=test", "--sdk=go")).
WithNewFile("main.go", dagger.ContainerWithNewFileOpts{
Contents: `package main
func New() *Test {
return &Test{
File: dag.Directory().WithNewFile("foo.txt", "foo").File("foo.txt"),
}
}
type Test struct {
File *File
}
`,
})
t.Run("size", func(t *testing.T) {
t.Parallel()
out, err := modGen.With(daggerCall("file", "size")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "3", strings.TrimSpace(out))
})
t.Run("export", func(t *testing.T) {
t.Parallel()
modGen, err := modGen.With(daggerCall("file", "export", "--path=./outfile")).Sync(ctx)
require.NoError(t, err)
contents, err := modGen.File("./outfile").Contents(ctx)
require.NoError(t, err)
require.Equal(t, "foo", strings.TrimSpace(contents))
})
})
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | package main
import (
"context"
"crypto/tls"
"crypto/x509"
goerrors "errors"
"fmt"
"log/slog"
"net"
"os"
"os/user"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
"github.com/containerd/containerd/pkg/seed"
"github.com/containerd/containerd/pkg/userns"
"github.com/containerd/containerd/platforms"
"github.com/containerd/containerd/remotes/docker" |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | "github.com/containerd/containerd/sys"
sddaemon "github.com/coreos/go-systemd/v22/daemon"
"github.com/dagger/dagger/engine/cache"
"github.com/dagger/dagger/engine/server"
"github.com/dagger/dagger/network"
"github.com/dagger/dagger/network/netinst"
"github.com/docker/docker/pkg/reexec"
"github.com/gofrs/flock"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/moby/buildkit/cache/remotecache"
"github.com/moby/buildkit/cache/remotecache/azblob"
"github.com/moby/buildkit/cache/remotecache/gha"
inlineremotecache "github.com/moby/buildkit/cache/remotecache/inline"
localremotecache "github.com/moby/buildkit/cache/remotecache/local"
registryremotecache "github.com/moby/buildkit/cache/remotecache/registry"
s3remotecache "github.com/moby/buildkit/cache/remotecache/s3"
"github.com/moby/buildkit/client"
"github.com/moby/buildkit/cmd/buildkitd/config"
"github.com/moby/buildkit/executor/oci"
"github.com/moby/buildkit/frontend"
dockerfile "github.com/moby/buildkit/frontend/dockerfile/builder"
"github.com/moby/buildkit/frontend/gateway"
"github.com/moby/buildkit/frontend/gateway/forwarder"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/solver"
"github.com/moby/buildkit/solver/bboltcachestorage"
"github.com/moby/buildkit/solver/llbsolver/mounts"
"github.com/moby/buildkit/util/apicaps"
"github.com/moby/buildkit/util/appcontext"
"github.com/moby/buildkit/util/appdefaults" |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | "github.com/moby/buildkit/util/archutil"
"github.com/moby/buildkit/util/bklog"
"github.com/moby/buildkit/util/grpcerrors"
"github.com/moby/buildkit/util/profiler"
"github.com/moby/buildkit/util/resolver"
"github.com/moby/buildkit/util/stack"
"github.com/moby/buildkit/util/tracing/detect"
_ "github.com/moby/buildkit/util/tracing/detect/jaeger"
_ "github.com/moby/buildkit/util/tracing/env"
"github.com/moby/buildkit/util/tracing/transform"
"github.com/moby/buildkit/version"
"github.com/moby/buildkit/worker"
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
sloglogrus "github.com/samber/slog-logrus/v2"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/trace"
tracev1 "go.opentelemetry.io/proto/otlp/collector/trace/v1"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"
)
const (
autoMode = "auto"
daggerCacheServiceURL = "https://api.dagger.cloud/magicache"
)
func init() { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | apicaps.ExportedProduct = "buildkit"
stack.SetVersionInfo(version.Version, version.Revision)
seed.WithTimeAndRand()
if reexec.Init() {
os.Exit(0)
}
detect.Recorder = detect.NewTraceRecorder()
}
var propagators = propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})
type workerInitializerOpt struct {
config *config.Config
sessionManager *session.Manager
traceSocket string
}
type workerInitializer struct {
fn func(c *cli.Context, common workerInitializerOpt) ([]worker.Worker, error)
priority int
}
var (
appFlags []cli.Flag
workerInitializers []workerInitializer
)
func registerWorkerInitializer(wi workerInitializer, flags ...cli.Flag) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | workerInitializers = append(workerInitializers, wi)
sort.Slice(workerInitializers,
func(i, j int) bool {
return workerInitializers[i].priority < workerInitializers[j].priority
})
appFlags = append(appFlags, flags...)
}
func main() {
cli.VersionPrinter = func(c *cli.Context) {
fmt.Println(c.App.Name, version.Package, c.App.Version, version.Revision)
}
app := cli.NewApp()
app.Name = "buildkitd"
app.Usage = "build daemon"
app.Version = version.Version
defaultConf, err := defaultConf()
if err != nil {
fmt.Fprintf(os.Stderr, "%+v\n", err)
os.Exit(1)
}
rootlessUsage := "set all the default options to be compatible with rootless containers"
if userns.RunningInUserNS() {
app.Flags = append(app.Flags, cli.BoolTFlag{
Name: "rootless",
Usage: rootlessUsage + " (default: true)",
})
} else {
app.Flags = append(app.Flags, cli.BoolFlag{
Name: "rootless",
Usage: rootlessUsage, |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | })
}
groupValue := func(gid *int) string {
if gid == nil {
return ""
}
return strconv.Itoa(*gid)
}
app.Flags = append(app.Flags,
cli.StringFlag{
Name: "config",
Usage: "path to config file",
Value: defaultConfigPath(),
},
cli.BoolFlag{
Name: "debug",
Usage: "enable debug output in logs",
},
cli.BoolFlag{
Name: "trace",
Usage: "enable trace output in logs (highly verbose, could affect performance)",
},
cli.StringFlag{
Name: "root",
Usage: "path to state directory",
Value: defaultConf.Root,
},
cli.StringSliceFlag{
Name: "addr",
Usage: "listening address (socket or tcp)", |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | Value: &cli.StringSlice{defaultConf.GRPC.Address[0]},
},
cli.StringFlag{
Name: "group",
Usage: "group (name or gid) which will own all Unix socket listening addresses",
Value: groupValue(defaultConf.GRPC.GID),
},
cli.StringFlag{
Name: "debugaddr",
Usage: "debugging address (eg. 0.0.0.0:6060)",
Value: defaultConf.GRPC.DebugAddress,
},
cli.StringFlag{
Name: "tlscert",
Usage: "certificate file to use",
Value: defaultConf.GRPC.TLS.Cert,
},
cli.StringFlag{
Name: "tlskey",
Usage: "key file to use",
Value: defaultConf.GRPC.TLS.Key,
},
cli.StringFlag{
Name: "tlscacert",
Usage: "ca certificate to verify clients",
Value: defaultConf.GRPC.TLS.CA,
},
cli.StringSliceFlag{
Name: "allow-insecure-entitlement",
Usage: "allows insecure entitlements e.g. network.host, security.insecure", |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | },
cli.StringFlag{
Name: "network-name",
Usage: "short name for the engine's container network; used for interface name",
Value: network.DefaultName,
},
cli.StringFlag{
Name: "network-cidr",
Usage: "address range to use for networked containers",
Value: network.DefaultCIDR,
},
)
app.Flags = append(app.Flags, appFlags...)
app.Action = func(c *cli.Context) error {
if os.Geteuid() > 0 {
return errors.New("rootless mode requires to be executed as the mapped root in a user namespace; you may use RootlessKit for setting up the namespace")
}
ctx, cancel := context.WithCancel(appcontext.Context())
defer cancel()
bklog.G(ctx).Debug("loading engine config file")
cfg, err := config.LoadFile(c.GlobalString("config"))
if err != nil {
return err
}
bklog.G(ctx).Debug("setting up engine networking")
networkContext, cancelNetworking := context.WithCancel(context.Background())
defer cancelNetworking()
netConf, err := setupNetwork(networkContext, |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | c.GlobalString("network-name"),
c.GlobalString("network-cidr"),
)
if err != nil {
return err
}
bklog.G(ctx).Debug("setting engine configs from defaults and flags")
if err := setDaggerDefaults(&cfg, netConf); err != nil {
return err
}
setDefaultConfig(&cfg)
if err := applyMainFlags(c, &cfg); err != nil {
return err
}
logrus.SetFormatter(&logrus.TextFormatter{FullTimestamp: true})
slogOpts := sloglogrus.Option{
AddSource: true,
}
if cfg.Debug {
slogOpts.Level = slog.LevelDebug
logrus.SetLevel(logrus.DebugLevel)
}
if cfg.Trace {
logrus.SetLevel(logrus.TraceLevel)
}
slog.SetDefault(slog.New(slogOpts.NewLogrusHandler()))
if cfg.GRPC.DebugAddress != "" {
if err := setupDebugHandlers(cfg.GRPC.DebugAddress); err != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | return err
}
}
bklog.G(ctx).Debug("setting up engine tracing")
tp, err := detect.TracerProvider()
if err != nil {
bklog.G(ctx).WithError(err).Error("failed to create tracer provider")
}
streamTracer := otelgrpc.StreamServerInterceptor(otelgrpc.WithTracerProvider(tp), otelgrpc.WithPropagators(propagators))
unary := grpc_middleware.ChainUnaryServer(unaryInterceptor(context.Background(), tp), grpcerrors.UnaryServerInterceptor)
stream := grpc_middleware.ChainStreamServer(streamTracer, grpcerrors.StreamServerInterceptor)
bklog.G(ctx).Debug("creating engine GRPC server")
grpcOpts := []grpc.ServerOption{grpc.UnaryInterceptor(unary), grpc.StreamInterceptor(stream)}
server := grpc.NewServer(grpcOpts...)
root, err := filepath.Abs(cfg.Root)
if err != nil {
return err
}
cfg.Root = root
if err := os.MkdirAll(root, 0o700); err != nil {
return errors.Wrapf(err, "failed to create %s", root)
}
bklog.G(ctx).Debug("creating engine lockfile") |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | lockPath := filepath.Join(root, "buildkitd.lock")
lock := flock.New(lockPath)
locked, err := lock.TryLock()
if err != nil {
return errors.Wrapf(err, "could not lock %s", lockPath)
}
if !locked {
return errors.Errorf("could not lock %s, another instance running?", lockPath)
}
defer func() {
lock.Unlock()
os.RemoveAll(lockPath)
}()
bklog.G(ctx).Debug("creating engine controller")
controller, cacheManager, err := newController(ctx, c, &cfg)
if err != nil {
return err
}
defer controller.Close()
controller.Register(server)
go logMetrics(context.Background(), cfg.Root, controller)
if cfg.Trace {
go logTraceMetrics(context.Background())
}
ents := c.GlobalStringSlice("allow-insecure-entitlement")
if len(ents) > 0 {
cfg.Entitlements = []string{}
for _, e := range ents {
switch e {
case "security.insecure": |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | cfg.Entitlements = append(cfg.Entitlements, e)
case "network.host":
cfg.Entitlements = append(cfg.Entitlements, e)
default:
return errors.Errorf("invalid entitlement : %s", e)
}
}
}
bklog.G(ctx).Debug("starting optional cache mount synchronization")
err = cacheManager.StartCacheMountSynchronization(ctx)
if err != nil {
bklog.G(ctx).WithError(err).Error("failed to start cache mount synchronization")
}
bklog.G(ctx).Debug("starting main engine grpc listeners")
errCh := make(chan error, 1)
if err := serveGRPC(cfg.GRPC, server, errCh); err != nil {
return err
}
select {
case serverErr := <-errCh:
err = serverErr
cancel()
case <-ctx.Done():
if ctx.Err() != context.Canceled {
err = ctx.Err()
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | }
bklog.G(ctx).Debug("stopping cache manager")
stopCacheCtx, cancelCacheCtx := context.WithTimeout(context.Background(), 600*time.Second)
defer cancelCacheCtx()
stopCacheErr := cacheManager.Close(stopCacheCtx)
if stopCacheErr != nil {
bklog.G(ctx).WithError(stopCacheErr).Error("failed to stop cache")
}
err = goerrors.Join(err, stopCacheErr)
cancelNetworking()
bklog.G(ctx).Infof("stopping server")
if os.Getenv("NOTIFY_SOCKET") != "" {
notified, notifyErr := sddaemon.SdNotify(false, sddaemon.SdNotifyStopping)
bklog.G(ctx).Debugf("SdNotifyStopping notified=%v, err=%v", notified, notifyErr)
}
server.GracefulStop()
return err
}
app.After = func(_ *cli.Context) error {
tel.Close()
return detect.Shutdown(context.TODO())
}
profiler.Attach(app)
if err := app.Run(os.Args); err != nil {
fmt.Fprintf(os.Stderr, "buildkitd: %+v\n", err)
os.Exit(1)
}
}
func serveGRPC(cfg config.GRPCConfig, server *grpc.Server, errCh chan error) error { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | addrs := cfg.Address
if len(addrs) == 0 {
return errors.New("--addr cannot be empty")
}
tlsConfig, err := serverCredentials(cfg.TLS)
if err != nil {
return err
}
eg, _ := errgroup.WithContext(context.Background())
listeners := make([]net.Listener, 0, len(addrs))
for _, addr := range addrs {
l, err := getListener(addr, *cfg.UID, *cfg.GID, tlsConfig)
if err != nil {
for _, l := range listeners {
l.Close()
}
return err
}
listeners = append(listeners, l)
}
if os.Getenv("NOTIFY_SOCKET") != "" {
notified, notifyErr := sddaemon.SdNotify(false, sddaemon.SdNotifyReady)
logrus.Debugf("SdNotifyReady notified=%v, err=%v", notified, notifyErr)
}
for _, l := range listeners {
func(l net.Listener) {
eg.Go(func() error { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | defer l.Close()
logrus.Infof("running server on %s", l.Addr())
return server.Serve(l)
})
}(l)
}
go func() {
errCh <- eg.Wait()
}()
return nil
}
func defaultConfigPath() string {
if userns.RunningInUserNS() {
return filepath.Join(appdefaults.UserConfigDir(), "buildkitd.toml")
}
return filepath.Join(appdefaults.ConfigDir, "buildkitd.toml")
}
func defaultConf() (config.Config, error) {
cfg, err := config.LoadFile(defaultConfigPath())
if err != nil {
var pe *os.PathError
if !errors.As(err, &pe) {
return config.Config{}, err
}
logrus.Warnf("failed to load default config: %v", err)
}
setDefaultConfig(&cfg)
return cfg, nil
}
func setDefaultNetworkConfig(nc config.NetworkConfig) config.NetworkConfig { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | if nc.Mode == "" {
nc.Mode = autoMode
}
if nc.CNIConfigPath == "" {
nc.CNIConfigPath = appdefaults.DefaultCNIConfigPath
}
if nc.CNIBinaryPath == "" {
nc.CNIBinaryPath = appdefaults.DefaultCNIBinDir
}
return nc
}
func setDefaultConfig(cfg *config.Config) {
orig := *cfg
if cfg.Root == "" {
cfg.Root = appdefaults.Root
}
if len(cfg.GRPC.Address) == 0 {
cfg.GRPC.Address = []string{appdefaults.Address}
}
if cfg.Workers.OCI.Platforms == nil {
cfg.Workers.OCI.Platforms = formatPlatforms(archutil.SupportedPlatforms(false))
}
if cfg.Workers.Containerd.Platforms == nil {
cfg.Workers.Containerd.Platforms = formatPlatforms(archutil.SupportedPlatforms(false))
}
cfg.Workers.OCI.NetworkConfig = setDefaultNetworkConfig(cfg.Workers.OCI.NetworkConfig)
cfg.Workers.Containerd.NetworkConfig = setDefaultNetworkConfig(cfg.Workers.Containerd.NetworkConfig)
if userns.RunningInUserNS() { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | if u := os.Getenv("USER"); u != "" && u != "root" {
if orig.Root == "" {
cfg.Root = appdefaults.UserRoot()
}
if len(orig.GRPC.Address) == 0 {
cfg.GRPC.Address = []string{appdefaults.UserAddress()}
}
appdefaults.EnsureUserAddressDir()
}
}
}
func applyMainFlags(c *cli.Context, cfg *config.Config) error {
if c.IsSet("debug") {
cfg.Debug = c.Bool("debug")
}
if c.IsSet("trace") {
cfg.Trace = c.Bool("trace")
}
if c.IsSet("root") {
cfg.Root = c.String("root")
}
if c.IsSet("addr") || len(cfg.GRPC.Address) == 0 {
cfg.GRPC.Address = c.StringSlice("addr")
}
if c.IsSet("allow-insecure-entitlement") {
cfg.Entitlements = c.StringSlice("allow-insecure-entitlement")
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | if c.IsSet("debugaddr") {
cfg.GRPC.DebugAddress = c.String("debugaddr")
}
if cfg.GRPC.UID == nil {
uid := os.Getuid()
cfg.GRPC.UID = &uid
}
if cfg.GRPC.GID == nil {
gid := os.Getgid()
cfg.GRPC.GID = &gid
}
if group := c.String("group"); group != "" {
gid, err := grouptoGID(group)
if err != nil {
return err
}
cfg.GRPC.GID = &gid
}
if tlscert := c.String("tlscert"); tlscert != "" {
cfg.GRPC.TLS.Cert = tlscert
}
if tlskey := c.String("tlskey"); tlskey != "" {
cfg.GRPC.TLS.Key = tlskey
}
if tlsca := c.String("tlscacert"); tlsca != "" {
cfg.GRPC.TLS.CA = tlsca
}
return nil
}
func grouptoGID(group string) (int, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | if group == "" {
return os.Getgid(), nil
}
var (
err error
id int
)
if id, err = strconv.Atoi(group); err == nil {
return id, nil
} else if err.(*strconv.NumError).Err != strconv.ErrSyntax {
return 0, err
}
ginfo, err := user.LookupGroup(group)
if err != nil {
return 0, err
}
group = ginfo.Gid
if id, err = strconv.Atoi(group); err != nil {
return 0, err
}
return id, nil
}
func getListener(addr string, uid, gid int, tlsConfig *tls.Config) (net.Listener, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | addrSlice := strings.SplitN(addr, "://", 2)
if len(addrSlice) < 2 {
return nil, errors.Errorf("address %s does not contain proto, you meant unix://%s ?",
addr, addr)
}
proto := addrSlice[0]
listenAddr := addrSlice[1]
switch proto {
case "unix", "npipe":
if tlsConfig != nil {
logrus.Warnf("TLS is disabled for %s", addr)
}
return sys.GetLocalListener(listenAddr, uid, gid)
case "fd":
return listenFD(listenAddr, tlsConfig)
case "tcp":
l, err := net.Listen("tcp", listenAddr)
if err != nil {
return nil, err
}
if tlsConfig == nil {
logrus.Warnf("TLS is not enabled for %s. enabling mutual TLS authentication is highly recommended", addr)
return l, nil
}
return tls.NewListener(l, tlsConfig), nil
default:
return nil, errors.Errorf("addr %s not supported", addr)
}
}
func unaryInterceptor(globalCtx context.Context, tp trace.TracerProvider) grpc.UnaryServerInterceptor { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | withTrace := otelgrpc.UnaryServerInterceptor(otelgrpc.WithTracerProvider(tp), otelgrpc.WithPropagators(propagators))
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
ctx, cancel := context.WithCancel(ctx)
defer cancel()
go func() {
select {
case <-ctx.Done():
case <-globalCtx.Done():
cancel()
}
}()
if strings.HasSuffix(info.FullMethod, "opentelemetry.proto.collector.trace.v1.TraceService/Export") {
return handler(ctx, req)
}
resp, err = withTrace(ctx, req, info, handler)
if err != nil {
logrus.Errorf("%s returned error: %v", info.FullMethod, err)
if logrus.GetLevel() >= logrus.DebugLevel {
fmt.Fprintf(os.Stderr, "%+v", stack.Formatter(grpcerrors.FromGRPC(err)))
}
}
return
}
}
func serverCredentials(cfg config.TLSConfig) (*tls.Config, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | certFile := cfg.Cert
keyFile := cfg.Key
caFile := cfg.CA
if certFile == "" && keyFile == "" {
return nil, nil
}
err := errors.New("you must specify key and cert file if one is specified")
if certFile == "" {
return nil, err
}
if keyFile == "" {
return nil, err
}
certificate, err := tls.LoadX509KeyPair(certFile, keyFile)
if err != nil {
return nil, errors.Wrap(err, "could not load server key pair")
}
tlsConf := &tls.Config{
Certificates: []tls.Certificate{certificate},
MinVersion: tls.VersionTLS12,
}
if caFile != "" {
certPool := x509.NewCertPool()
ca, err := os.ReadFile(caFile) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | if err != nil {
return nil, errors.Wrap(err, "could not read ca certificate")
}
if ok := certPool.AppendCertsFromPEM(ca); !ok {
return nil, errors.New("failed to append ca cert")
}
tlsConf.ClientAuth = tls.RequireAndVerifyClientCert
tlsConf.ClientCAs = certPool
}
return tlsConf, nil
}
func newController(ctx context.Context, c *cli.Context, cfg *config.Config) (*server.BuildkitController, cache.Manager, error) {
sessionManager, err := session.NewManager()
if err != nil {
return nil, nil, err
}
tc, err := detect.Exporter()
if err != nil {
bklog.G(ctx).WithError(err).Error("failed to create tracer exporter")
}
var traceSocket string
if tc != nil {
traceSocket = filepath.Join(cfg.Root, "otel-grpc.sock")
if err := runTraceController(traceSocket, tc); err != nil {
logrus.Warnf("failed set up otel-grpc controller: %v", err)
traceSocket = ""
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | }
wc, err := newWorkerController(c, workerInitializerOpt{
config: cfg,
sessionManager: sessionManager,
traceSocket: traceSocket,
})
if err != nil {
return nil, nil, err
}
w, err := wc.GetDefault()
if err != nil {
return nil, nil, err
}
frontends := map[string]frontend.Frontend{}
frontends["dockerfile.v0"] = forwarder.NewGatewayForwarder(wc, dockerfile.Build)
frontends["gateway.v0"] = gateway.NewGatewayFrontend(wc)
cacheStorage, err := bboltcachestorage.NewStore(filepath.Join(cfg.Root, "cache.db"))
if err != nil {
return nil, nil, err
}
cacheServiceURL := os.Getenv("_EXPERIMENTAL_DAGGER_CACHESERVICE_URL")
cacheServiceToken := os.Getenv("_EXPERIMENTAL_DAGGER_CACHESERVICE_TOKEN")
if v, ok := os.LookupEnv("DAGGER_CLOUD_TOKEN"); ok {
cacheServiceToken = v
}
if cacheServiceURL == "" {
cacheServiceURL = daggerCacheServiceURL
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | cacheManager, err := cache.NewManager(ctx, cache.ManagerConfig{
KeyStore: cacheStorage,
ResultStore: worker.NewCacheResultStorage(wc),
Worker: w,
MountManager: mounts.NewMountManager("dagger-cache", w.CacheManager(), sessionManager),
ServiceURL: cacheServiceURL,
Token: cacheServiceToken,
EngineID: engineName,
})
if err != nil {
return nil, nil, err
}
resolverFn := resolverFunc(cfg)
remoteCacheExporterFuncs := map[string]remotecache.ResolveCacheExporterFunc{
"registry": registryremotecache.ResolveCacheExporterFunc(sessionManager, resolverFn),
"local": localremotecache.ResolveCacheExporterFunc(sessionManager),
"inline": inlineremotecache.ResolveCacheExporterFunc(),
"gha": gha.ResolveCacheExporterFunc(),
"s3": s3remotecache.ResolveCacheExporterFunc(),
"azblob": azblob.ResolveCacheExporterFunc(),
"dagger": func(ctx context.Context, g session.Group, attrs map[string]string) (remotecache.Exporter, error) {
return nil, nil
},
}
remoteCacheImporterFuncs := map[string]remotecache.ResolveCacheImporterFunc{
"registry": registryremotecache.ResolveCacheImporterFunc(sessionManager, w.ContentStore(), resolverFn),
"local": localremotecache.ResolveCacheImporterFunc(sessionManager),
"gha": gha.ResolveCacheImporterFunc(),
"s3": s3remotecache.ResolveCacheImporterFunc(), |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | "azblob": azblob.ResolveCacheImporterFunc(),
"dagger": func(ctx context.Context, g session.Group, attrs map[string]string) (remotecache.Importer, ocispecs.Descriptor, error) {
return &noopCacheImporter{}, ocispecs.Descriptor{}, nil
},
}
bklog.G(context.Background()).Debugf("engine name: %s", engineName)
ctrler, err := server.NewBuildkitController(server.BuildkitControllerOpts{
WorkerController: wc,
SessionManager: sessionManager,
CacheManager: cacheManager,
ContentStore: w.ContentStore(),
LeaseManager: w.LeaseManager(),
Entitlements: cfg.Entitlements,
EngineName: engineName,
Frontends: frontends,
TraceCollector: tc,
UpstreamCacheExporters: remoteCacheExporterFuncs,
UpstreamCacheImporters: remoteCacheImporterFuncs,
DNSConfig: getDNSConfig(cfg.DNS),
})
if err != nil {
return nil, nil, err
}
return ctrler, cacheManager, nil
}
func resolverFunc(cfg *config.Config) docker.RegistryHosts {
return resolver.NewRegistryConfig(cfg.Registries)
}
func newWorkerController(c *cli.Context, wiOpt workerInitializerOpt) (*worker.Controller, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | wc := &worker.Controller{}
nWorkers := 0
for _, wi := range workerInitializers {
ws, err := wi.fn(c, wiOpt)
if err != nil {
return nil, err
}
for _, w := range ws {
p := w.Platforms(false)
logrus.Infof("found worker %q, labels=%v, platforms=%v", w.ID(), w.Labels(), formatPlatforms(p))
archutil.WarnIfUnsupported(p)
if err = wc.Add(w); err != nil {
return nil, err
}
nWorkers++
}
}
if nWorkers == 0 {
return nil, errors.New("no worker found, rebuild the buildkit daemon?")
}
defaultWorker, err := wc.GetDefault()
if err != nil {
return nil, err
}
logrus.Infof("found %d workers, default=%q", nWorkers, defaultWorker.ID())
logrus.Warn("currently, only the default worker can be used.")
return wc, nil
}
func attrMap(sl []string) (map[string]string, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | m := map[string]string{}
for _, v := range sl {
parts := strings.SplitN(v, "=", 2)
if len(parts) != 2 {
return nil, errors.Errorf("invalid value %s", v)
}
m[parts[0]] = parts[1]
}
return m, nil
}
func formatPlatforms(p []ocispecs.Platform) []string {
str := make([]string, 0, len(p))
for _, pp := range p {
str = append(str, platforms.Format(platforms.Normalize(pp)))
}
return str
}
func parsePlatforms(platformsStr []string) ([]ocispecs.Platform, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | out := make([]ocispecs.Platform, 0, len(platformsStr))
for _, s := range platformsStr {
p, err := platforms.Parse(s)
if err != nil {
return nil, err
}
out = append(out, platforms.Normalize(p))
}
return out, nil
}
func getGCPolicy(cfg config.GCConfig, root string) []client.PruneInfo {
if cfg.GC != nil && !*cfg.GC {
return nil
}
if len(cfg.GCPolicy) == 0 {
cfg.GCPolicy = config.DefaultGCPolicy(cfg.GCKeepStorage)
}
out := make([]client.PruneInfo, 0, len(cfg.GCPolicy))
for _, rule := range cfg.GCPolicy {
out = append(out, client.PruneInfo{
Filter: rule.Filters,
All: rule.All,
KeepBytes: rule.KeepBytes.AsBytes(root),
KeepDuration: rule.KeepDuration.Duration,
})
}
return out
}
func getBuildkitVersion() client.BuildkitVersion { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | return client.BuildkitVersion{
Package: version.Package,
Version: version.Version,
Revision: version.Revision,
}
}
func getDNSConfig(cfg *config.DNSConfig) *oci.DNSConfig {
var dns *oci.DNSConfig
if cfg != nil {
dns = &oci.DNSConfig{
Nameservers: cfg.Nameservers,
Options: cfg.Options,
SearchDomains: cfg.SearchDomains,
}
}
return dns
}
func parseBoolOrAuto(s string) (*bool, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | if s == "" || strings.EqualFold(s, autoMode) {
return nil, nil
}
b, err := strconv.ParseBool(s)
return &b, err
}
func runTraceController(p string, exp sdktrace.SpanExporter) error {
server := grpc.NewServer()
tracev1.RegisterTraceServiceServer(server, &traceCollector{exporter: exp})
uid := os.Getuid()
l, err := sys.GetLocalListener(p, uid, uid)
if err != nil {
return err
}
if err := os.Chmod(p, 0o666); err != nil {
l.Close()
return err
}
go server.Serve(l)
return nil
}
type traceCollector struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | *tracev1.UnimplementedTraceServiceServer
exporter sdktrace.SpanExporter
}
func (t *traceCollector) Export(ctx context.Context, req *tracev1.ExportTraceServiceRequest) (*tracev1.ExportTraceServiceResponse, error) {
err := t.exporter.ExportSpans(ctx, transform.Spans(req.GetResourceSpans()))
if err != nil {
return nil, err
}
return &tracev1.ExportTraceServiceResponse{}, nil
}
type networkConfig struct {
NetName string
NetCIDR string
Bridge net.IP
CNIConfigPath string
}
func setupNetwork(ctx context.Context, netName, netCIDR string) (*networkConfig, error) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | bridge, err := network.BridgeFromCIDR(netCIDR)
if err != nil {
return nil, fmt.Errorf("bridge from cidr: %w", err)
}
err = netinst.InstallResolvconf(netName, bridge.String())
if err != nil {
return nil, fmt.Errorf("install resolv.conf: %w", err)
}
err = netinst.InstallDnsmasq(ctx, netName)
if err != nil {
return nil, fmt.Errorf("install dnsmasq: %w", err)
}
cniConfigPath, err := netinst.InstallCNIConfig(netName, netCIDR)
if err != nil {
return nil, fmt.Errorf("install cni: %w", err)
}
return &networkConfig{
NetName: netName,
NetCIDR: netCIDR,
Bridge: bridge,
CNIConfigPath: cniConfigPath,
}, nil
}
type noopCacheImporter struct{} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | cmd/engine/main.go | var _ remotecache.Importer = &noopCacheImporter{}
func (i *noopCacheImporter) Resolve(ctx context.Context, desc ocispecs.Descriptor, id string, w worker.Worker) (solver.CacheManager, error) {
return nil, nil
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | package buildkit
import (
"context"
"encoding/json"
"fmt"
"os"
"path"
"strings"
"github.com/containerd/containerd/platforms"
"github.com/dagger/dagger/engine"
bkcache "github.com/moby/buildkit/cache"
bkclient "github.com/moby/buildkit/client"
"github.com/moby/buildkit/exporter/containerimage/exptypes"
bkgw "github.com/moby/buildkit/frontend/gateway/client"
bksolverpb "github.com/moby/buildkit/solver/pb"
solverresult "github.com/moby/buildkit/solver/result"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/vito/progrock"
)
type ContainerExport struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | Definition *bksolverpb.Definition
Config specs.ImageConfig
}
func (c *Client) PublishContainerImage(
ctx context.Context,
inputByPlatform map[string]ContainerExport,
opts map[string]string,
) (map[string]string, error) {
ctx, cancel, err := c.withClientCloseCancel(ctx)
if err != nil {
return nil, err
}
defer cancel()
combinedResult, err := c.getContainerResult(ctx, inputByPlatform)
if err != nil {
return nil, err
}
exporter, err := c.Worker.Exporter(bkclient.ExporterImage, c.SessionManager)
if err != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | return nil, err
}
expInstance, err := exporter.Resolve(ctx, opts)
if err != nil {
return nil, fmt.Errorf("failed to resolve exporter: %s", err)
}
resp, descRef, err := expInstance.Export(ctx, combinedResult, c.ID())
if err != nil {
return nil, fmt.Errorf("failed to export: %s", err)
}
if descRef != nil {
descRef.Release()
}
return resp, nil
}
func (c *Client) ExportContainerImage(
ctx context.Context,
inputByPlatform map[string]ContainerExport,
destPath string,
opts map[string]string,
) (map[string]string, error) {
ctx, cancel, err := c.withClientCloseCancel(ctx)
if err != nil {
return nil, err
}
defer cancel()
destPath = path.Clean(destPath)
if destPath == ".." || strings.HasPrefix(destPath, "../") {
return nil, fmt.Errorf("path %q escapes workdir; use an absolute path instead", destPath)
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | combinedResult, err := c.getContainerResult(ctx, inputByPlatform)
if err != nil {
return nil, err
}
exporterName := bkclient.ExporterDocker
if len(combinedResult.Refs) > 1 {
exporterName = bkclient.ExporterOCI
}
exporter, err := c.Worker.Exporter(exporterName, c.SessionManager)
if err != nil {
return nil, err
}
expInstance, err := exporter.Resolve(ctx, opts)
if err != nil {
return nil, fmt.Errorf("failed to resolve exporter: %s", err)
}
clientMetadata, err := engine.ClientMetadataFromContext(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get requester session ID from client metadata: %s", err)
}
ctx = engine.LocalExportOpts{
DestClientID: clientMetadata.ClientID,
Path: destPath,
IsFileStream: true,
}.AppendToOutgoingContext(ctx)
resp, descRef, err := expInstance.Export(ctx, combinedResult, clientMetadata.ClientID)
if err != nil {
return nil, fmt.Errorf("failed to export: %s", err)
}
if descRef != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | descRef.Release()
}
return resp, nil
}
func (c *Client) ContainerImageToTarball(
ctx context.Context,
engineHostPlatform specs.Platform,
fileName string,
inputByPlatform map[string]ContainerExport,
opts map[string]string,
) (*bksolverpb.Definition, error) {
ctx, cancel, err := c.withClientCloseCancel(ctx)
if err != nil {
return nil, err
}
defer cancel()
combinedResult, err := c.getContainerResult(ctx, inputByPlatform)
if err != nil {
return nil, err
}
exporterName := bkclient.ExporterDocker
if len(combinedResult.Refs) > 1 {
exporterName = bkclient.ExporterOCI
}
exporter, err := c.Worker.Exporter(exporterName, c.SessionManager)
if err != nil {
return nil, err
}
expInstance, err := exporter.Resolve(ctx, opts)
if err != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | return nil, fmt.Errorf("failed to resolve exporter: %s", err)
}
tmpDir, err := os.MkdirTemp("", "dagger-tarball")
if err != nil {
return nil, fmt.Errorf("failed to create temp dir for tarball export: %s", err)
}
defer os.RemoveAll(tmpDir)
destPath := path.Join(tmpDir, fileName)
ctx = engine.LocalExportOpts{
DestClientID: c.ID(),
Path: destPath,
IsFileStream: true,
}.AppendToOutgoingContext(ctx)
_, descRef, err := expInstance.Export(ctx, combinedResult, c.ID())
if err != nil {
return nil, fmt.Errorf("failed to export: %s", err)
}
if descRef != nil {
defer descRef.Release()
}
ctx, recorder := progrock.WithGroup(ctx, "container image to tarball")
pbDef, _, err := c.EngineContainerLocalImport(ctx, recorder, engineHostPlatform, tmpDir, nil, []string{fileName})
if err != nil {
return nil, fmt.Errorf("failed to import container tarball from engine container filesystem: %s", err)
}
return pbDef, nil
}
func (c *Client) getContainerResult(
ctx context.Context,
inputByPlatform map[string]ContainerExport, |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | ) (*solverresult.Result[bkcache.ImmutableRef], error) {
combinedResult := &solverresult.Result[bkcache.ImmutableRef]{}
expPlatforms := &exptypes.Platforms{
Platforms: make([]exptypes.Platform, len(inputByPlatform)),
}
for platformString, input := range inputByPlatform {
res, err := c.Solve(ctx, bkgw.SolveRequest{
Definition: input.Definition,
Evaluate: true,
})
if err != nil {
return nil, fmt.Errorf("failed to solve for container publish: %s", err)
}
cacheRes, err := ConvertToWorkerCacheResult(ctx, res)
if err != nil {
return nil, fmt.Errorf("failed to convert result: %s", err)
}
ref, err := cacheRes.SingleRef()
if err != nil {
return nil, err
}
platform, err := platforms.Parse(platformString)
if err != nil {
return nil, err
}
cfgBytes, err := json.Marshal(specs.Image{
Platform: specs.Platform{
Architecture: platform.Architecture,
OS: platform.OS, |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/containerimage.go | OSVersion: platform.OSVersion,
OSFeatures: platform.OSFeatures,
},
Config: input.Config,
})
if err != nil {
return nil, err
}
combinedResult.AddMeta(fmt.Sprintf("%s/%s", exptypes.ExporterImageConfigKey, platformString), cfgBytes)
if len(inputByPlatform) == 1 {
combinedResult.AddMeta(exptypes.ExporterImageConfigKey, cfgBytes)
combinedResult.SetRef(ref)
} else {
expPlatforms.Platforms[len(combinedResult.Refs)] = exptypes.Platform{
ID: platformString,
Platform: platform,
}
combinedResult.AddRef(platformString, ref)
}
}
if len(combinedResult.Refs) > 1 {
platformBytes, err := json.Marshal(expPlatforms)
if err != nil {
return nil, err
}
combinedResult.AddMeta(exptypes.ExporterPlatformsKey, platformBytes)
}
return combinedResult, nil
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | package buildkit
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"os"
"path"
"path/filepath"
"strings"
"github.com/containerd/continuity/fs"
"github.com/dagger/dagger/engine" |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | "github.com/dagger/dagger/engine/sources/blob"
cacheconfig "github.com/moby/buildkit/cache/config"
bkclient "github.com/moby/buildkit/client"
"github.com/moby/buildkit/client/llb"
bkgw "github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/session/filesync"
"github.com/moby/buildkit/snapshot"
bksolverpb "github.com/moby/buildkit/solver/pb"
"github.com/moby/buildkit/util/bklog"
"github.com/moby/buildkit/util/compression"
bkworker "github.com/moby/buildkit/worker"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/vito/progrock"
)
func (c *Client) LocalImport(
ctx context.Context,
recorder *progrock.Recorder,
platform specs.Platform,
srcPath string,
excludePatterns []string,
includePatterns []string,
) (*bksolverpb.Definition, specs.Descriptor, error) {
var desc specs.Descriptor
srcPath = path.Clean(srcPath)
if srcPath == ".." || strings.HasPrefix(srcPath, "../") {
return nil, desc, fmt.Errorf("path %q escapes workdir; use an absolute path instead", srcPath)
}
clientMetadata, err := engine.ClientMetadataFromContext(ctx)
if err != nil {
return nil, desc, err |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | }
localOpts := []llb.LocalOption{
llb.SessionID(clientMetadata.ClientID),
llb.SharedKeyHint(strings.Join([]string{clientMetadata.ClientHostname, srcPath}, " ")),
}
localName := fmt.Sprintf("upload %s from %s (client id: %s)", srcPath, clientMetadata.ClientHostname, clientMetadata.ClientID)
if len(excludePatterns) > 0 {
localName += fmt.Sprintf(" (exclude: %s)", strings.Join(excludePatterns, ", "))
localOpts = append(localOpts, llb.ExcludePatterns(excludePatterns))
}
if len(includePatterns) > 0 {
localName += fmt.Sprintf(" (include: %s)", strings.Join(includePatterns, ", "))
localOpts = append(localOpts, llb.IncludePatterns(includePatterns))
}
localOpts = append(localOpts, llb.WithCustomName(localName))
localLLB := llb.Local(srcPath, localOpts...)
copyLLB := llb.Scratch().File(
llb.Copy(localLLB, "/", "/"),
llb.WithCustomNamef("%scopy %s", InternalPrefix, localName),
)
copyDef, err := copyLLB.Marshal(ctx, llb.Platform(platform))
if err != nil {
return nil, desc, err |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | }
copyPB := copyDef.ToPB()
RecordVertexes(recorder, copyPB)
res, err := c.Solve(ctx, bkgw.SolveRequest{
Definition: copyPB,
Evaluate: true,
})
if err != nil {
return nil, desc, err
}
resultProxy, err := res.SingleRef()
if err != nil {
return nil, desc, fmt.Errorf("failed to get single ref: %s", err)
}
cachedRes, err := resultProxy.Result(ctx)
if err != nil {
return nil, desc, wrapError(ctx, err, c.ID())
}
workerRef, ok := cachedRes.Sys().(*bkworker.WorkerRef)
if !ok {
return nil, desc, fmt.Errorf("invalid ref: %T", cachedRes.Sys())
}
ref := workerRef.ImmutableRef
err = ref.Extract(ctx, nil)
if err != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | return nil, desc, fmt.Errorf("failed to extract ref: %s", err)
}
remotes, err := ref.GetRemotes(ctx, true, cacheconfig.RefConfig{
Compression: compression.Config{
Type: compression.Zstd,
},
}, false, nil)
if err != nil {
return nil, desc, fmt.Errorf("failed to get remotes: %s", err)
}
if len(remotes) != 1 {
return nil, desc, fmt.Errorf("expected 1 remote, got %d", len(remotes))
}
remote := remotes[0]
if len(remote.Descriptors) != 1 {
return nil, desc, fmt.Errorf("expected 1 descriptor, got %d", len(remote.Descriptors))
}
desc = remote.Descriptors[0]
blobDef, err := blob.LLB(desc).Marshal(ctx)
if err != nil {
return nil, desc, fmt.Errorf("failed to marshal blob source: %s", err)
}
blobPB := blobDef.ToPB()
_, err = c.Solve(ctx, bkgw.SolveRequest{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | Definition: blobPB,
Evaluate: true,
})
if err != nil {
return nil, desc, fmt.Errorf("failed to solve blobsource: %w", wrapError(ctx, err, c.ID()))
}
return blobPB, desc, nil
}
func (c *Client) EngineContainerLocalImport(
ctx context.Context,
recorder *progrock.Recorder,
platform specs.Platform,
srcPath string,
excludePatterns []string,
includePatterns []string,
) (*bksolverpb.Definition, specs.Descriptor, error) {
hostname, err := os.Hostname()
if err != nil {
return nil, specs.Descriptor{}, fmt.Errorf("failed to get hostname for engine local import: %s", err)
}
ctx = engine.ContextWithClientMetadata(ctx, &engine.ClientMetadata{
ClientID: c.ID(),
ClientHostname: hostname,
})
return c.LocalImport(ctx, recorder, platform, srcPath, excludePatterns, includePatterns)
}
func (c *Client) ReadCallerHostFile(ctx context.Context, path string) ([]byte, error) {
ctx, cancel, err := c.withClientCloseCancel(ctx)
if err != nil {
return nil, err |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | }
defer cancel()
clientMetadata, err := engine.ClientMetadataFromContext(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get requester session ID: %s", err)
}
ctx = engine.LocalImportOpts{
OwnerClientID: clientMetadata.ClientID,
Path: path,
ReadSingleFileOnly: true,
MaxFileSize: MaxFileContentsChunkSize,
}.AppendToOutgoingContext(ctx)
clientCaller, err := c.SessionManager.Get(ctx, clientMetadata.ClientID, false)
if err != nil {
return nil, fmt.Errorf("failed to get requester session: %s", err)
}
diffCopyClient, err := filesync.NewFileSyncClient(clientCaller.Conn()).DiffCopy(ctx)
if err != nil {
return nil, fmt.Errorf("failed to create diff copy client: %s", err)
}
defer diffCopyClient.CloseSend()
msg := filesync.BytesMessage{}
err = diffCopyClient.RecvMsg(&msg)
if err != nil {
return nil, fmt.Errorf("failed to receive file bytes message: %s", err)
}
return msg.Data, nil
}
func (c *Client) LocalDirExport(
ctx context.Context, |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | def *bksolverpb.Definition,
destPath string,
) (rerr error) {
ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("export_path", destPath))
bklog.G(ctx).Debug("exporting local dir")
defer func() {
lg := bklog.G(ctx)
if rerr != nil {
lg = lg.WithError(rerr)
}
lg.Debug("finished exporting local dir")
}()
ctx, cancel, err := c.withClientCloseCancel(ctx)
if err != nil {
return err
}
defer cancel()
destPath = path.Clean(destPath)
if destPath == ".." || strings.HasPrefix(destPath, "../") {
return fmt.Errorf("path %q escapes workdir; use an absolute path instead", destPath)
}
res, err := c.Solve(ctx, bkgw.SolveRequest{Definition: def})
if err != nil {
return fmt.Errorf("failed to solve for local export: %s", err)
}
cacheRes, err := ConvertToWorkerCacheResult(ctx, res)
if err != nil {
return fmt.Errorf("failed to convert result: %s", err)
}
exporter, err := c.Worker.Exporter(bkclient.ExporterLocal, c.SessionManager) |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | if err != nil {
return err
}
expInstance, err := exporter.Resolve(ctx, nil)
if err != nil {
return fmt.Errorf("failed to resolve exporter: %s", err)
}
clientMetadata, err := engine.ClientMetadataFromContext(ctx)
if err != nil {
return fmt.Errorf("failed to get requester session ID: %s", err)
}
ctx = engine.LocalExportOpts{
DestClientID: clientMetadata.ClientID,
Path: destPath,
}.AppendToOutgoingContext(ctx)
_, descRef, err := expInstance.Export(ctx, cacheRes, clientMetadata.ClientID)
if err != nil {
return fmt.Errorf("failed to export: %s", err)
}
if descRef != nil {
descRef.Release()
}
return nil
}
func (c *Client) LocalFileExport(
ctx context.Context,
def *bksolverpb.Definition,
destPath string,
filePath string,
allowParentDirPath bool, |
closed | dagger/dagger | https://github.com/dagger/dagger | 6,374 | Update buildkit past ca71a44 | Currently, we are stuck on the current version of buildkit, since https://github.com/moby/buildkit/pull/4347#issuecomment-1872217571 seems to have introduced a deadlock.
To reproduce: update buildkit in `go.mod` to `ca71a446d9f4e31ca7c4fa30fb8fb8861b8b0117`, and run a large number of integration tests. The engine will lock up after some time - after sending `SIGUIT` to the engine, you can observe the stack trace:
```
goroutine 441 [sync.Mutex.Lock, 4 minutes]:
runtime.gopark(0xc01d5ebbf0?, 0xc00aef48e1?, 0xc0?, 0xf?, 0xc017641870?)
/usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc017641790 sp=0xc017641770 pc=0x43e42e
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:404
runtime.semacquire1(0xc01d77eb74, 0x0?, 0x3, 0x1, 0x21?)
/usr/local/go/src/runtime/sema.go:160 +0x218 fp=0xc0176417f8 sp=0xc017641790 pc=0x44f918
sync.runtime_SemacquireMutex(0xffffffffffffffff?, 0x0?, 0xc00ed7c4b0?)
/usr/local/go/src/runtime/sema.go:77 +0x25 fp=0xc017641830 sp=0xc0176417f8 pc=0x46d545
sync.(*Mutex).lockSlow(0xc01d77eb70)
/usr/local/go/src/sync/mutex.go:171 +0x15d fp=0xc017641880 sp=0xc017641830 pc=0x488f1d
sync.(*Mutex).Lock(...)
/usr/local/go/src/sync/mutex.go:90
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01d77eb70, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:91 +0x5c fp=0xc017641960 sp=0xc017641880 pc=0xcb537c
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01d77eb70?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641a28 sp=0xc017641960 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).writeRawProgress(0xc01dfe5da0, 0xc004bd6e00)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:95 +0x17e fp=0xc017641b08 sp=0xc017641a28 pc=0xcb549e
github.com/moby/buildkit/util/progress.(*MultiWriter).WriteRawProgress(0xc01dfe5da0?, 0xc004bd6e00?)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:87 +0xac fp=0xc017641bd0 sp=0xc017641b08 pc=0xcb516c
github.com/moby/buildkit/util/progress.(*MultiWriter).Add(0xc01d77eb70, {0x1f7e8b0?, 0xc01dfe5da0?})
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/util/progress/multiwriter.go:46 +0x190 fp=0xc017641c60 sp=0xc017641bd0 pc=0xcb4d70
github.com/moby/buildkit/solver.(*state).setEdge(0xc01dfe3440, 0x2, 0xc003975a40, 0xc0165fcb40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:178 +0x370 fp=0xc017641ce8 sp=0xc017641c60 pc=0xdef3f0
github.com/moby/buildkit/solver.(*Solver).setEdge(0xc0007071a0, {0xc003975a40?, {0x1f92360?, 0xc004bd6480?}}, 0xc003975a40)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/jobs.go:295 +0x125 fp=0xc017641d58 sp=0xc017641ce8 pc=0xdf0265
github.com/moby/buildkit/solver.(*scheduler).dispatch(0xc0002fc770, 0xc01356a140)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:177 +0xbdb fp=0xc017641f68 sp=0xc017641d58 pc=0xdfe87b
github.com/moby/buildkit/solver.(*scheduler).loop(0xc0002fc770)
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:104 +0x1d4 fp=0xc017641fc8 sp=0xc017641f68 pc=0xdfdb34
github.com/moby/buildkit/solver.newScheduler.func1()
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x25 fp=0xc017641fe0 sp=0xc017641fc8 pc=0xdfd865
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc017641fe8 sp=0xc017641fe0 pc=0x4715e1
created by github.com/moby/buildkit/solver.newScheduler in goroutine 1
/go/pkg/mod/github.com/moby/buildkit@v0.13.0-beta1.0.20231107172820-ca71a446d9f4/solver/scheduler.go:35 +0x22d
```
See https://github.com/dagger/dagger/pull/6169 for more information on when this was originally discovered.
Next steps:
- Wait until upstream PRs are merged :tada: | https://github.com/dagger/dagger/issues/6374 | https://github.com/dagger/dagger/pull/6481 | 2aefe558d80c355fb6868145e79763ef73c0e6b9 | faaa0d18ec2f8f4ddb425298e672c079869017e7 | 2024-01-08T18:47:15Z | go | 2024-01-24T17:07:57Z | engine/buildkit/filesync.go | ) (rerr error) {
ctx = bklog.WithLogger(ctx, bklog.G(ctx).
WithField("export_path", destPath).
WithField("file_path", filePath).
WithField("allow_parent_dir_path", allowParentDirPath),
)
bklog.G(ctx).Debug("exporting local file")
defer func() {
lg := bklog.G(ctx)
if rerr != nil {
lg = lg.WithError(rerr)
}
lg.Debug("finished exporting local file")
}()
ctx, cancel, err := c.withClientCloseCancel(ctx)
if err != nil {
return err
}
defer cancel()
destPath = path.Clean(destPath)
if destPath == ".." || strings.HasPrefix(destPath, "../") {
return fmt.Errorf("path %q escapes workdir; use an absolute path instead", destPath)
}
res, err := c.Solve(ctx, bkgw.SolveRequest{Definition: def, Evaluate: true})
if err != nil {
return fmt.Errorf("failed to solve for local export: %s", err)
}
ref, err := res.SingleRef()
if err != nil {
return fmt.Errorf("failed to get single ref: %s", err) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.