Skip to content

bubblewrap environments block essential signals #251247

@bendlas

Description

@bendlas

Describe the bug

Release notes say:

The old chrootenv-based implemenation is still available via buildFHSEnvChroot but is considered deprecated and will be
removed when the remaining uses inside Nixpkgs have been migrated. If your FHSEnv-wrapped application misbehaves
when using the new bubblewrap implementation, please create an issue in Nixpkgs.

I am having an issue with bubblewrap, that I'm currently addressing by running a patched version of bubblewrap. So before chroots are removed as "obsolete" ...

Steps To Reproduce

  1. Run a program in bwrap, which relies on receiving SIGINT in a fresh terminal
  2. Close the terminal
  3. Program receives SIGTERM or even SIGKILL

Expected behavior

Program should receive SIGINT

Screenshots

Instead of a screenshot, let me share a gist of what I'm having to do, in order to make sure that my steam servers don't lose data (i.e. save the game) on service-stop: https://gist.github.com/bendlas/8c883058188b7f8fb951451502889de7

Additional context

containers/bubblewrap#369

Not sure how to best address this, short of sitting somebody with C++ skills down to add flags for this.
My current solution is to patch with containers/bubblewrap#402, which can just allow two specific signals and which worked for my use case so far.

But whatever will be done about it in the end, I would propose considering this as a blocker for even the deprecation of chroot (let alone removal).

Notify maintainers

Not sure who to pull in. Starting with @Atemu @dotlambda

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.45, NixOS, 23.11 (Tapir), 23.11.20230814.c9901ee`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.1`
 - nixpkgs: `/etc/nixpkgs`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: steamSteam game store/launcher (store.steampowered.com)9.needs: upstream fixThis PR needs upstream to change something

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions