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

thread 'main' panicked #427

Open
luochen1990 opened this issue Aug 5, 2023 · 2 comments
Open

thread 'main' panicked #427

luochen1990 opened this issue Aug 5, 2023 · 2 comments

Comments

@luochen1990
Copy link

$ journalctl -u [email protected] --no-pager --since='20min ago'
8月 05 17:06:00 fxpc-nixos microvm@gitlab-runner-vm[433245]: gitlab-runner-vm login: [53577.194296] INFO: task kworker/0:2:101 blocked for more than 122 seconds.
8月 05 17:06:00 fxpc-nixos microvm@gitlab-runner-vm[433245]: [53577.198428]       Not tainted 6.1.42 #1-NixOS
8月 05 17:06:00 fxpc-nixos microvm@gitlab-runner-vm[433245]: [53577.200947] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
8月 05 17:08:02 fxpc-nixos microvm@gitlab-runner-vm[433245]: [53700.075358] INFO: task kworker/0:2:101 blocked for more than 245 seconds.

$ vmsh console 433245                                                                                                                                                   101 ↵
thread 'main' panicked at 'Mismatch between definition and access of `backing-file`. Could not downcast to TypeId { t: 6626540671867581809 }, need to downcast to TypeId { t: 14115429553192329069 }
', /build/cargo-vendor-dir/clap_builder-4.3.19/src/parser/error.rs:32:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@Mic92
Copy link
Owner

Mic92 commented Aug 5, 2023

What hypervisor did you use?

@luochen1990
Copy link
Author

luochen1990 commented Aug 8, 2023

Following are my full nixos config about microvm, I havn't manually specify hypervisor, so it should be the default value qemu :

{ config, pkgs, inputs, ... }:
{
  imports = [
    inputs.microvm.nixosModules.host
  ];

  config = {

    # DOC: https://astro.github.io/microvm.nix/declarative.html
    microvm.vms = {
      gitlab-runner-vm = {
        config = {
          # It is highly recommended to share the host's nix-store
          # with the VMs to prevent building huge images.
          microvm.shares = [{
            source = "/nix/store";
            mountPoint = "/nix/.ro-store";
            tag = "ro-store";
            proto = "virtiofs";
          }];


          microvm.interfaces = [
            {
              type = "user";
              id = config.mainInterface; # interface name on the host
              mac = "02:00:00:00:00:01"; # Ethernet address of the MicroVM's interface, not the host's
            }
          ];

          # This is necessary to import the host's nix-store database
          microvm.writableStoreOverlay = "/nix/.rw-store";


          # Any other configuration for your MicroVM

          # Gitlab Runner
          services.gitlab-runner = {
            enable = true;
            services = {
              mygitlab = {
                registrationConfigFile = "/path/to/config";
                executor = "shell";
                #dockerImage = "nixos/nix:latest";
              };
            };
          };

          #Workaround of https://github.com/NixOS/nixpkgs/issues/245365
          virtualisation.docker = {
            listenOptions = [ "/run/docker.sock" "127.0.0.1:2375" ];
          };
          systemd.services.gitlab-runner.environment.DOCKER_HOST = "tcp://127.0.0.1:2375";
          networking.proxy.allProxy = null; #Workaround of https://github.com/docker-archive/toolbox/issues/539

        };
      };
    };

  };
}

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

No branches or pull requests

2 participants