Skip to content

karakeep: worker proc dumps core with nullptr error in node::RemoveEnvironmentCleanupHook #554550

Description

@miangraham

Nixpkgs version

  • Stable (26.05)

Describe the bug

Karakeep workers have a known bug starting with nodejs v24.19 that causes them to crash in a better-sqlite3 call.

My instance uses the karakeep nixos module from current stable (26.05) and started getting the same error sometime in the past week or so, probably when 24.19 made it to stable.

Workaround

Karakeep's fix for their container release was to pin to a pre-24.19 version of nodejs as a workaround.

I was able to work around the issue on my end by setting nodejs to v22 via overlay. This temp fix should also work for anyone seeing the same error:

self: super: {
  karakeep = super.callPackage "${inputs.nixpkgs}/pkgs/by-name/ka/karakeep/package.nix" {
    # Avoid nodejs 24 while waiting on bugfix for https://github.com/karakeep-app/karakeep/issues/2989
    nodejs = super.nodejs_22;
  };
}

Steps to reproduce

services.karakeep = {
  enable = true;
  browser.enable = false;
  extraEnvironment = {
    PORT = "8081";
    CRAWLER_DOWNLOAD_BANNER_IMAGE = "true";
    DISABLE_NEW_RELEASE_CHECK = "true";
    DISABLE_SIGNUPS = "true";
    INFERENCE_ENABLE_AUTO_TAGGING = "false";
    INFERENCE_ENABLE_AUTO_SUMMARIZATION = "false";
    NEXT_CACHE_DIR = "/var/lib/karakeep";
    NEXTAUTH_URL = "https://my.url.dev";
    NEXTAUTH_URL_INTERNAL = "http://127.0.0.1:8081";
  };
};

Expected behaviour

As observed with nodejs_22 overlaid:

$ systemctl status karakeep-workers.service
● karakeep-workers.service - Karakeep Workers
     Loaded: loaded (/etc/systemd/system/karakeep-workers.service; enabled; preset: ignored)
     Active: active (running) since Wed 2026-08-19 17:45:50 PDT; 14min ago
 Invocation: 2e35cdf27e3e4811adbbc94e07a61985
   Main PID: 1199 (node)
         IP: 9.9K in, 9.9K out
         IO: 35.2M read, 0B written
      Tasks: 11 (limit: 18867)
     Memory: 184.9M (peak: 275.8M)
        CPU: 21.964s
     CGroup: /system.slice/karakeep-workers.service
             └─1199 /nix/store/q25n2pi3aa9dgk2map29cn9qqkyjhbrl-nodejs-22.23.2/bin/node /nix/store/2hwny9i3xvblfbnkcrakbdd9ixj2vlbi-karakeep-0.32.0/lib/karakeep/apps/workers/dist/index.js

Aug 19 17:45:52 makoto start-workers[1199]: 2026-08-20T00:45:52.657Z info: Starting rule engine worker ...
Aug 19 17:45:52 makoto start-workers[1199]: 2026-08-20T00:45:52.657Z info: Starting backup worker ...
Aug 19 17:45:52 makoto start-workers[1199]: 2026-08-20T00:45:52.663Z info: Listening on http://127.0.0.1:39443
Aug 19 17:45:54 makoto start-workers[1199]: 2026-08-20T00:45:54.193Z error: [crawler] Failed to load adblocker. Will not be blocking ads: Error: Failed to resolve hostname raw.githubusercontent.com: query>
Aug 19 17:45:54 makoto start-workers[1199]: 2026-08-20T00:45:54.194Z info: Running in browserless mode
Aug 19 17:45:54 makoto start-workers[1199]: 2026-08-20T00:45:54.194Z info: [Crawler] Not defined in the server configuration BROWSER_COOKIE_PATH
Aug 19 17:45:54 makoto start-workers[1199]: 2026-08-20T00:45:54.195Z info: Starting crawler worker ...
Aug 19 17:45:54 makoto start-workers[1199]: 2026-08-20T00:45:54.195Z info: Starting crawler worker ...
Aug 19 17:45:54 makoto start-workers[1199]: 2026-08-20T00:45:54.195Z info: [import] Starting import polling worker
Aug 19 18:00:00 makoto start-workers[1199]: 2026-08-20T01:00:00.526Z info: [feed] Scheduling feed refreshing jobs ...

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.18.44, NixOS, 26.05 (Yarara), 26.05.20260819.b18a4b9
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.8
  • nixpkgs: /nix/store/pj8gwhvp27xjss6z1cdjlnzz8igyrwrw-source

Notify maintainers

@three


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions