Locally built Lazarus compiler dependant packages fail but Hydra and other users don't

I get an error Exception=Failed to create new thread when trying to build packages that rely on the Lazarus compiler.

Originally I was trying to create a PR for goverlay, but the build kept failing. I noticed that the Lazarus compiler had an update, so I created a draft pr for it. When I run nixpkgs-review, all the builds that depend on it fail.

While I was sorting that out, someone else made a PR for the goverlay update that was merged, yet when I run nixpkgs-review locally, that also fails.

The only thing I can find about this error is a thread from freeBSD and a bug report from gentoo. Which has not got me anywhere.

I have been trying to debug this for a few hours and am completely stumped, please let me know if you have any ideas or if I can give more information.

I got this same problem also with doublecmd, , what I found out is that nix-rebuild is constrained with perf settings - I had problems with build hogging cpu, and I tired to set idle for build, but it lead to problems, so I disabled it

# disabled 20260204 lazarus couldnt make thread 
    # daemonCPUSchedPolicy  = "other"; # the idle policy may greatly improve responsiveness of a system performing expensive builds
    # daemonIOSchedClass    = "best-effort"; #
    # daemonIOSchedPriority = 7;  

this is what i have now, but this settings are newest, i dont remember if I tried new rebuild, safer is to try first class = “batch”;

  #system76 scheduler
  services.system76-scheduler.enable = true;
  services.system76-scheduler.assignments = {
    nix-builds = {
      nice = 19; # from -20 (high) to 19 (low)
#
      class = "idle"; #"batch"; # "idle", "batch", "other", "rr", "fifo"
      ioClass = "idle"; # "idle", "best-effort", "realtime"
      matchers = [
        "nix-daemon"
      ];
    };
  };

also tried to disable ionice and nice on nixos-rebuild or nh os switch aliasis, but that change did nothing

1 Like