Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kamu command line completions crashes #1068

Open
jonathanlocke opened this issue Feb 10, 2025 · 1 comment
Open

Kamu command line completions crashes #1068

jonathanlocke opened this issue Feb 10, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@jonathanlocke
Copy link

jonathanlocke commented Feb 10, 2025

Describe the bug

Kamu command line completions crash on my Mac

Steps To Reproduce

  1. Docker installed
  2. Fresh install of Kamu with curl -s "https://get.kamu.dev" | sh
  3. Edit ~/.profile to include source <(kamu completions bash)
  4. Start shell

Current Behavior

Jonathans-iMac:Kamu jonathan$ source ~/.profile-kamu
Jonathans-iMac:Kamu jonathan$ thread 'main' panicked at library/std/src/io/stdio.rs:1123:9:
failed printing to stdout: Broken pipe (os error 32)
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: std::io::stdio::_print
3: <kamu_cli::commands::completions_command::CompletionsCommand as kamu_cli::commands::Command>::run::{{closure}}
4: <tracing::instrument::Instrumented as core::future::future::Future>::poll
5: kamu_cli::app::run::{{closure}}::{{closure}}::{{closure}}
6: <tracing::instrument::Instrumented as core::future::future::Future>::poll
7: kamu_cli::app::run::{{closure}}
8: tokio::runtime::park::CachedParkThread::block_on
9: tokio::runtime::context::runtime::enter_runtime
10: tokio::runtime::runtime::Runtime::block_on
11: kamu_cli::main
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

Oh no, looks like kamu has crashed!
Please try running kamu system diagnose to verify your environment.
If the issue persists, help us by reporting this problem at https://github.com/kamu-data/kamu-cli/issues

Expected Behavior

Should not crash

kamu system info

{
  "build": {
    "appVersion": "0.222.0",
    "buildTimestamp": "2025-02-06T20:38:13.953011000Z",
    "gitDescribe": "1ea1a6e",
    "gitSha": "1ea1a6e001da7a0ea9561515bcb20deb80656cf7",
    "gitCommitDate": "2025-02-06",
    "gitBranch": "HEAD",
    "rustcSemver": "1.85.0-nightly",
    "rustcChannel": "nightly",
    "rustcHostTriple": "x86_64-apple-darwin",
    "rustcCommitSha": "7c002ff9a70cb84fd1a91bc7b4a0f988cfc36fca",
    "cargoTargetTriple": "x86_64-apple-darwin",
    "cargoFeatures": "default,ingest_evm,ingest_ftp,ingest_mqtt,query_extensions_json,rust_embed,web_ui",
    "cargoOptLevel": "3"
  },
  "workspace": {
    "version": 0,
    "rootDir": ""
  },
  "containerRuntime": {
    "info": {
      "Architecture": "x86_64",
      "BridgeNfIp6tables": true,
      "BridgeNfIptables": true,
      "CDISpecDirs": [],
      "CPUSet": true,
      "CPUShares": true,
      "CgroupDriver": "cgroupfs",
      "CgroupVersion": "2",
      "ClientInfo": {
        "Arch": "amd64",
        "BuildTime": "Fri Sep 20 11:38:18 2024",
        "Context": "desktop-linux",
        "Debug": false,
        "GitCommit": "ce12230",
        "GoVersion": "go1.22.7",
        "Os": "darwin",
        "Plugins": [
          {
            "Name": "ai",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-ai",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Ask Gordon - Docker Agent",
            "Vendor": "Docker Inc.",
            "Version": "v0.1.0"
          },
          {
            "Name": "buildx",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-buildx",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Docker Buildx",
            "Vendor": "Docker Inc.",
            "Version": "v0.18.0-desktop.2"
          },
          {
            "Name": "compose",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-compose",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Docker Compose",
            "Vendor": "Docker Inc.",
            "Version": "v2.30.3-desktop.1"
          },
          {
            "Name": "debug",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-debug",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Get a shell into any image or container",
            "Vendor": "Docker Inc.",
            "Version": "0.0.37"
          },
          {
            "Name": "desktop",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-desktop",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Docker Desktop commands (Alpha)",
            "Vendor": "Docker Inc.",
            "Version": "v0.0.15"
          },
          {
            "Name": "dev",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-dev",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Docker Dev Environments",
            "Vendor": "Docker Inc.",
            "Version": "v0.1.2"
          },
          {
            "Name": "extension",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-extension",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Manages Docker extensions",
            "Vendor": "Docker Inc.",
            "Version": "v0.2.27"
          },
          {
            "Name": "feedback",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-feedback",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Provide feedback, right in your terminal!",
            "Vendor": "Docker Inc.",
            "Version": "v1.0.5"
          },
          {
            "Name": "init",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-init",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Creates Docker-related starter files for your project",
            "Vendor": "Docker Inc.",
            "Version": "v1.4.0"
          },
          {
            "Name": "sbom",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-sbom",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "View the packaged-based Software Bill Of Materials (SBOM) for an image",
            "URL": "https://github.com/docker/sbom-cli-plugin",
            "Vendor": "Anchore Inc.",
            "Version": "0.6.0"
          },
          {
            "Name": "scout",
            "Path": "/Users/jonathan/.docker/cli-plugins/docker-scout",
            "SchemaVersion": "0.1.0",
            "ShortDescription": "Docker Scout",
            "Vendor": "Docker Inc.",
            "Version": "v1.15.0"
          }
        ],
        "Version": "27.3.1",
        "Warnings": null
      },
      "Containerd": {
        "Address": "/run/containerd/containerd.sock",
        "Namespaces": {
          "Containers": "moby",
          "Plugins": "plugins.moby"
        }
      },
      "ContainerdCommit": {
        "Expected": "472731909fa34bd7bc9c087e4c27943f9835f111",
        "ID": "472731909fa34bd7bc9c087e4c27943f9835f111"
      },
      "Containers": 1,
      "ContainersPaused": 0,
      "ContainersRunning": 1,
      "ContainersStopped": 0,
      "CpuCfsPeriod": true,
      "CpuCfsQuota": true,
      "Debug": false,
      "DefaultRuntime": "runc",
      "DockerRootDir": "/var/lib/docker",
      "Driver": "overlayfs",
      "DriverStatus": [
        [
          "driver-type",
          "io.containerd.snapshotter.v1"
        ]
      ],
      "ExperimentalBuild": false,
      "GenericResources": null,
      "HttpProxy": "http.docker.internal:3128",
      "HttpsProxy": "http.docker.internal:3128",
      "ID": "91b3df91-7978-4600-a1c5-2e0c8991dffb",
      "IPv4Forwarding": true,
      "Images": 4,
      "IndexServerAddress": "https://index.docker.io/v1/",
      "InitBinary": "docker-init",
      "InitCommit": {
        "Expected": "de40ad0",
        "ID": "de40ad0"
      },
      "Isolation": "",
      "KernelVersion": "6.10.14-linuxkit",
      "Labels": [
        "com.docker.desktop.address=unix:///Users/jonathan/Library/Containers/com.docker.docker/Data/docker-cli.sock"
      ],
      "LiveRestoreEnabled": false,
      "LoggingDriver": "json-file",
      "MemTotal": 8218161152,
      "MemoryLimit": true,
      "NCPU": 16,
      "NEventsListener": 15,
      "NFd": 61,
      "NGoroutines": 92,
      "Name": "docker-desktop",
      "NoProxy": "hubproxy.docker.internal",
      "OSType": "linux",
      "OSVersion": "",
      "OomKillDisable": false,
      "OperatingSystem": "Docker Desktop",
      "PidsLimit": true,
      "Plugins": {
        "Authorization": null,
        "Log": [
          "awslogs",
          "fluentd",
          "gcplogs",
          "gelf",
          "journald",
          "json-file",
          "local",
          "splunk",
          "syslog"
        ],
        "Network": [
          "bridge",
          "host",
          "ipvlan",
          "macvlan",
          "null",
          "overlay"
        ],
        "Volume": [
          "local"
        ]
      },
      "RegistryConfig": {
        "AllowNondistributableArtifactsCIDRs": null,
        "AllowNondistributableArtifactsHostnames": null,
        "IndexConfigs": {
          "docker.io": {
            "Mirrors": [],
            "Name": "docker.io",
            "Official": true,
            "Secure": true
          },
          "hubproxy.docker.internal:5555": {
            "Mirrors": [],
            "Name": "hubproxy.docker.internal:5555",
            "Official": false,
            "Secure": false
          }
        },
        "InsecureRegistryCIDRs": [
          "127.0.0.0/8"
        ],
        "Mirrors": null
      },
      "RuncCommit": {
        "Expected": "v1.1.13-0-g58aa920",
        "ID": "v1.1.13-0-g58aa920"
      },
      "Runtimes": {
        "io.containerd.runc.v2": {
          "path": "runc",
          "status": {
            "org.opencontainers.runtime-spec.features": "{\"ociVersionMin\":\"1.0.0\",\"ociVersionMax\":\"1.0.2-dev\",\"hooks\":[\"prestart\",\"createRuntime\",\"createContainer\",\"startContainer\",\"poststart\",\"poststop\"],\"mountOptions\":[\"acl\",\"async\",\"atime\",\"bind\",\"defaults\",\"dev\",\"diratime\",\"dirsync\",\"exec\",\"iversion\",\"lazytime\",\"loud\",\"mand\",\"noacl\",\"noatime\",\"nodev\",\"nodiratime\",\"noexec\",\"noiversion\",\"nolazytime\",\"nomand\",\"norelatime\",\"nostrictatime\",\"nosuid\",\"nosymfollow\",\"private\",\"ratime\",\"rbind\",\"rdev\",\"rdiratime\",\"relatime\",\"remount\",\"rexec\",\"rnoatime\",\"rnodev\",\"rnodiratime\",\"rnoexec\",\"rnorelatime\",\"rnostrictatime\",\"rnosuid\",\"rnosymfollow\",\"ro\",\"rprivate\",\"rrelatime\",\"rro\",\"rrw\",\"rshared\",\"rslave\",\"rstrictatime\",\"rsuid\",\"rsymfollow\",\"runbindable\",\"rw\",\"shared\",\"silent\",\"slave\",\"strictatime\",\"suid\",\"symfollow\",\"sync\",\"tmpcopyup\",\"unbindable\"],\"linux\":{\"namespaces\":[\"cgroup\",\"ipc\",\"mount\",\"network\",\"pid\",\"user\",\"uts\"],\"capabilities\":[\"CAP_CHOWN\",\"CAP_DAC_OVERRIDE\",\"CAP_DAC_READ_SEARCH\",\"CAP_FOWNER\",\"CAP_FSETID\",\"CAP_KILL\",\"CAP_SETGID\",\"CAP_SETUID\",\"CAP_SETPCAP\",\"CAP_LINUX_IMMUTABLE\",\"CAP_NET_BIND_SERVICE\",\"CAP_NET_BROADCAST\",\"CAP_NET_ADMIN\",\"CAP_NET_RAW\",\"CAP_IPC_LOCK\",\"CAP_IPC_OWNER\",\"CAP_SYS_MODULE\",\"CAP_SYS_RAWIO\",\"CAP_SYS_CHROOT\",\"CAP_SYS_PTRACE\",\"CAP_SYS_PACCT\",\"CAP_SYS_ADMIN\",\"CAP_SYS_BOOT\",\"CAP_SYS_NICE\",\"CAP_SYS_RESOURCE\",\"CAP_SYS_TIME\",\"CAP_SYS_TTY_CONFIG\",\"CAP_MKNOD\",\"CAP_LEASE\",\"CAP_AUDIT_WRITE\",\"CAP_AUDIT_CONTROL\",\"CAP_SETFCAP\",\"CAP_MAC_OVERRIDE\",\"CAP_MAC_ADMIN\",\"CAP_SYSLOG\",\"CAP_WAKE_ALARM\",\"CAP_BLOCK_SUSPEND\",\"CAP_AUDIT_READ\",\"CAP_PERFMON\",\"CAP_BPF\",\"CAP_CHECKPOINT_RESTORE\"],\"cgroup\":{\"v1\":true,\"v2\":true,\"systemd\":true,\"systemdUser\":true},\"seccomp\":{\"enabled\":true,\"actions\":[\"SCMP_ACT_ALLOW\",\"SCMP_ACT_ERRNO\",\"SCMP_ACT_KILL\",\"SCMP_ACT_KILL_PROCESS\",\"SCMP_ACT_KILL_THREAD\",\"SCMP_ACT_LOG\",\"SCMP_ACT_NOTIFY\",\"SCMP_ACT_TRACE\",\"SCMP_ACT_TRAP\"],\"operators\":[\"SCMP_CMP_EQ\",\"SCMP_CMP_GE\",\"SCMP_CMP_GT\",\"SCMP_CMP_LE\",\"SCMP_CMP_LT\",\"SCMP_CMP_MASKED_EQ\",\"SCMP_CMP_NE\"],\"archs\":[\"SCMP_ARCH_AARCH64\",\"SCMP_ARCH_ARM\",\"SCMP_ARCH_MIPS\",\"SCMP_ARCH_MIPS64\",\"SCMP_ARCH_MIPS64N32\",\"SCMP_ARCH_MIPSEL\",\"SCMP_ARCH_MIPSEL64\",\"SCMP_ARCH_MIPSEL64N32\",\"SCMP_ARCH_PPC\",\"SCMP_ARCH_PPC64\",\"SCMP_ARCH_PPC64LE\",\"SCMP_ARCH_RISCV64\",\"SCMP_ARCH_S390\",\"SCMP_ARCH_S390X\",\"SCMP_ARCH_X32\",\"SCMP_ARCH_X86\",\"SCMP_ARCH_X86_64\"]},\"apparmor\":{\"enabled\":true},\"selinux\":{\"enabled\":true}},\"annotations\":{\"io.github.seccomp.libseccomp.version\":\"2.5.4\",\"org.opencontainers.runc.checkpoint.enabled\":\"true\",\"org.opencontainers.runc.commit\":\"v1.1.13-0-g58aa920\",\"org.opencontainers.runc.version\":\"1.1.13\"}}"
          }
        },
        "runc": {
          "path": "runc",
          "status": {
            "org.opencontainers.runtime-spec.features": "{\"ociVersionMin\":\"1.0.0\",\"ociVersionMax\":\"1.0.2-dev\",\"hooks\":[\"prestart\",\"createRuntime\",\"createContainer\",\"startContainer\",\"poststart\",\"poststop\"],\"mountOptions\":[\"acl\",\"async\",\"atime\",\"bind\",\"defaults\",\"dev\",\"diratime\",\"dirsync\",\"exec\",\"iversion\",\"lazytime\",\"loud\",\"mand\",\"noacl\",\"noatime\",\"nodev\",\"nodiratime\",\"noexec\",\"noiversion\",\"nolazytime\",\"nomand\",\"norelatime\",\"nostrictatime\",\"nosuid\",\"nosymfollow\",\"private\",\"ratime\",\"rbind\",\"rdev\",\"rdiratime\",\"relatime\",\"remount\",\"rexec\",\"rnoatime\",\"rnodev\",\"rnodiratime\",\"rnoexec\",\"rnorelatime\",\"rnostrictatime\",\"rnosuid\",\"rnosymfollow\",\"ro\",\"rprivate\",\"rrelatime\",\"rro\",\"rrw\",\"rshared\",\"rslave\",\"rstrictatime\",\"rsuid\",\"rsymfollow\",\"runbindable\",\"rw\",\"shared\",\"silent\",\"slave\",\"strictatime\",\"suid\",\"symfollow\",\"sync\",\"tmpcopyup\",\"unbindable\"],\"linux\":{\"namespaces\":[\"cgroup\",\"ipc\",\"mount\",\"network\",\"pid\",\"user\",\"uts\"],\"capabilities\":[\"CAP_CHOWN\",\"CAP_DAC_OVERRIDE\",\"CAP_DAC_READ_SEARCH\",\"CAP_FOWNER\",\"CAP_FSETID\",\"CAP_KILL\",\"CAP_SETGID\",\"CAP_SETUID\",\"CAP_SETPCAP\",\"CAP_LINUX_IMMUTABLE\",\"CAP_NET_BIND_SERVICE\",\"CAP_NET_BROADCAST\",\"CAP_NET_ADMIN\",\"CAP_NET_RAW\",\"CAP_IPC_LOCK\",\"CAP_IPC_OWNER\",\"CAP_SYS_MODULE\",\"CAP_SYS_RAWIO\",\"CAP_SYS_CHROOT\",\"CAP_SYS_PTRACE\",\"CAP_SYS_PACCT\",\"CAP_SYS_ADMIN\",\"CAP_SYS_BOOT\",\"CAP_SYS_NICE\",\"CAP_SYS_RESOURCE\",\"CAP_SYS_TIME\",\"CAP_SYS_TTY_CONFIG\",\"CAP_MKNOD\",\"CAP_LEASE\",\"CAP_AUDIT_WRITE\",\"CAP_AUDIT_CONTROL\",\"CAP_SETFCAP\",\"CAP_MAC_OVERRIDE\",\"CAP_MAC_ADMIN\",\"CAP_SYSLOG\",\"CAP_WAKE_ALARM\",\"CAP_BLOCK_SUSPEND\",\"CAP_AUDIT_READ\",\"CAP_PERFMON\",\"CAP_BPF\",\"CAP_CHECKPOINT_RESTORE\"],\"cgroup\":{\"v1\":true,\"v2\":true,\"systemd\":true,\"systemdUser\":true},\"seccomp\":{\"enabled\":true,\"actions\":[\"SCMP_ACT_ALLOW\",\"SCMP_ACT_ERRNO\",\"SCMP_ACT_KILL\",\"SCMP_ACT_KILL_PROCESS\",\"SCMP_ACT_KILL_THREAD\",\"SCMP_ACT_LOG\",\"SCMP_ACT_NOTIFY\",\"SCMP_ACT_TRACE\",\"SCMP_ACT_TRAP\"],\"operators\":[\"SCMP_CMP_EQ\",\"SCMP_CMP_GE\",\"SCMP_CMP_GT\",\"SCMP_CMP_LE\",\"SCMP_CMP_LT\",\"SCMP_CMP_MASKED_EQ\",\"SCMP_CMP_NE\"],\"archs\":[\"SCMP_ARCH_AARCH64\",\"SCMP_ARCH_ARM\",\"SCMP_ARCH_MIPS\",\"SCMP_ARCH_MIPS64\",\"SCMP_ARCH_MIPS64N32\",\"SCMP_ARCH_MIPSEL\",\"SCMP_ARCH_MIPSEL64\",\"SCMP_ARCH_MIPSEL64N32\",\"SCMP_ARCH_PPC\",\"SCMP_ARCH_PPC64\",\"SCMP_ARCH_PPC64LE\",\"SCMP_ARCH_RISCV64\",\"SCMP_ARCH_S390\",\"SCMP_ARCH_S390X\",\"SCMP_ARCH_X32\",\"SCMP_ARCH_X86\",\"SCMP_ARCH_X86_64\"]},\"apparmor\":{\"enabled\":true},\"selinux\":{\"enabled\":true}},\"annotations\":{\"io.github.seccomp.libseccomp.version\":\"2.5.4\",\"org.opencontainers.runc.checkpoint.enabled\":\"true\",\"org.opencontainers.runc.commit\":\"v1.1.13-0-g58aa920\",\"org.opencontainers.runc.version\":\"1.1.13\"}}"
          }
        }
      },
      "SecurityOptions": [
        "name=seccomp,profile=unconfined",
        "name=cgroupns"
      ],
      "ServerVersion": "27.3.1",
      "SwapLimit": true,
      "Swarm": {
        "ControlAvailable": false,
        "Error": "",
        "LocalNodeState": "inactive",
        "NodeAddr": "",
        "NodeID": "",
        "RemoteManagers": null
      },
      "SystemTime": "2025-02-10T22:23:06.575610897Z",
      "Warnings": [
        "WARNING: daemon is not using the default seccomp profile"
      ]
    }
  }
}

Logs

No such log exists

Anything else?

No response

@jonathanlocke jonathanlocke added the bug Something isn't working label Feb 10, 2025
@sergiimk
Copy link
Member

I think .profile is too low level to include completions, as .profile is run for login shell.

Can you try including completions into .bashrc instead that executes for non-login shells?

Not sure why stdout would be a broken pipe though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants