[GH-ISSUE #6701] python3: --timeout does not kill the program (docker) #3341

Open
opened 2026-05-05 09:55:37 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @NoonePauseferg on GitHub (Apr 5, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6701

Description

Describe the bug

Steps to Reproduce

Steps to reproduce the behavior

  1. Run in bash
firejail \
    --debug \
    --private \
    --profile=pip \
    --seccomp=socket \
    --rlimit-nproc=8 \
    --rlimit-nofile=8 \
    --rlimit-fsize=200m \
    --rlimit-as=4096m \
    --timeout=00:00:01 \
    python3 -c 'import time; time.sleep(1000000)'
  1. it will not exit

Expected behavior

after 1s command exit

Actual behavior

inf running proc, which do not exit

Behavior without a profile

same

Additional context

Compile time support:
        - always force nonewprivs support is disabled
        - AppArmor support is enabled
        - AppImage support is enabled
        - chroot support is enabled
        - D-BUS proxy support is enabled
        - file transfer support is enabled
        - firetunnel support is disabled
        - IDS support is enabled
        - networking support is enabled
        - output logging is enabled
        - overlayfs support is disabled
        - private-home support is enabled
        - private-cache and tmpfs as user enabled
        - SELinux support is enabled
        - user namespace support is enabled
        - X11 sandboxing support is enabled

Environment

  • Name/version/arch of the Linux kernel (uname -srm): Linux 5.15.0-1044-nvidia x86_64
  • Version of Firejail (firejail --version): 0.9.72

Log

Output of LC_ALL=C firejail /path/to/program


Output of LC_ALL=C firejail --debug /path/to/program

Building quoted command line: 'python3' '-c' 'import time; time.sleep(1000000)' 
Warning: an existing sandbox was detected. python3 will run without any additional sandboxing features
Starting application
LD_PRELOAD=(null)
execvp argument 0: python3
execvp argument 1: -c
execvp argument 2: import time; time.sleep(1000000)
Searching $PATH for python3
trying #/home/user/conda_envs/verl_env/bin/python3#
^CTraceback (most recent call last):
  File "<string>", line 1, in <module>
KeyboardInterrupt

Originally created by @NoonePauseferg on GitHub (Apr 5, 2025). Original GitHub issue: https://github.com/netblue30/firejail/issues/6701 <!-- See the following links for help with formatting: https://guides.github.com/features/mastering-markdown/ https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax --> ### Description _Describe the bug_ ### Steps to Reproduce _Steps to reproduce the behavior_ 1. Run in bash ``` firejail \ --debug \ --private \ --profile=pip \ --seccomp=socket \ --rlimit-nproc=8 \ --rlimit-nofile=8 \ --rlimit-fsize=200m \ --rlimit-as=4096m \ --timeout=00:00:01 \ python3 -c 'import time; time.sleep(1000000)' ``` 2. it will not exit ### Expected behavior after 1s command exit ### Actual behavior inf running proc, which do not exit ### Behavior without a profile same ### Additional context ``` Compile time support: - always force nonewprivs support is disabled - AppArmor support is enabled - AppImage support is enabled - chroot support is enabled - D-BUS proxy support is enabled - file transfer support is enabled - firetunnel support is disabled - IDS support is enabled - networking support is enabled - output logging is enabled - overlayfs support is disabled - private-home support is enabled - private-cache and tmpfs as user enabled - SELinux support is enabled - user namespace support is enabled - X11 sandboxing support is enabled ``` ### Environment - Name/version/arch of the Linux kernel (`uname -srm`): Linux 5.15.0-1044-nvidia x86_64 - Version of Firejail (`firejail --version`): 0.9.72 ### Log <details> <summary>Output of <code>LC_ALL=C firejail /path/to/program</code></summary> <p> ``` ``` </p> </details> <details> <summary>Output of <code>LC_ALL=C firejail --debug /path/to/program</code></summary> <p> <!-- If the output is too long to embed it into the comment, create a secret gist at https://gist.github.com/ and link it here. --> ``` Building quoted command line: 'python3' '-c' 'import time; time.sleep(1000000)' Warning: an existing sandbox was detected. python3 will run without any additional sandboxing features Starting application LD_PRELOAD=(null) execvp argument 0: python3 execvp argument 1: -c execvp argument 2: import time; time.sleep(1000000) Searching $PATH for python3 trying #/home/user/conda_envs/verl_env/bin/python3# ^CTraceback (most recent call last): File "<string>", line 1, in <module> KeyboardInterrupt ``` </p> </details>
gitea-mirror added the
needinfo
label 2026-05-05 09:55:37 -06:00
Author
Owner

@rusty-snake commented on GitHub (Apr 5, 2025):

Warning: an existing sandbox was detected. python3 will run without any additional sandboxing features

<!-- gh-comment-id:2780564301 --> @rusty-snake commented on GitHub (Apr 5, 2025): > Warning: an existing sandbox was detected. python3 will run without any additional sandboxing features
Author
Owner

@NoonePauseferg commented on GitHub (Apr 5, 2025):

hm, how can i disable it?

<!-- gh-comment-id:2780572659 --> @NoonePauseferg commented on GitHub (Apr 5, 2025): hm, how can i disable it?
Author
Owner

@rusty-snake commented on GitHub (Apr 5, 2025):

Check what you have running firejail --list (or --tree).

<!-- gh-comment-id:2780579834 --> @rusty-snake commented on GitHub (Apr 5, 2025): Check what you have running `firejail --list` (or `--tree`).
Author
Owner

@NoonePauseferg commented on GitHub (Apr 5, 2025):

(/home/user/conda_envs/verl_env) user@14a7bbee147c:~$ firejail --list
Warning: an existing sandbox was detected. /bin/bash will run without any additional sandboxing features
(/home/user/conda_envs/verl_env) user@14a7bbee147c:~$ firejail --tree
Warning: an existing sandbox was detected. /bin/bash will run without any additional sandboxing features
Error: --shell=none configured, but no program specified
<!-- gh-comment-id:2780583147 --> @NoonePauseferg commented on GitHub (Apr 5, 2025): ``` (/home/user/conda_envs/verl_env) user@14a7bbee147c:~$ firejail --list Warning: an existing sandbox was detected. /bin/bash will run without any additional sandboxing features ``` ``` (/home/user/conda_envs/verl_env) user@14a7bbee147c:~$ firejail --tree Warning: an existing sandbox was detected. /bin/bash will run without any additional sandboxing features Error: --shell=none configured, but no program specified ```
Author
Owner

@NoonePauseferg commented on GitHub (Apr 5, 2025):

Install it like this

RUN apt-get update \
    && apt-get install -y software-properties-common \
    && apt-get update \
    && add-apt-repository ppa:deki/firejail \
    && apt-get install -y firejail firejail-profiles
<!-- gh-comment-id:2780600286 --> @NoonePauseferg commented on GitHub (Apr 5, 2025): Install it like this ``` RUN apt-get update \ && apt-get install -y software-properties-common \ && apt-get update \ && add-apt-repository ppa:deki/firejail \ && apt-get install -y firejail firejail-profiles ```
Author
Owner

@rusty-snake commented on GitHub (Apr 5, 2025):

You are running inside docker?!

<!-- gh-comment-id:2780630744 --> @rusty-snake commented on GitHub (Apr 5, 2025): You are running inside docker?!
Author
Owner

@NoonePauseferg commented on GitHub (Apr 5, 2025):

yeah, I use cloud for gpu training and need firejail there for code testing

i cant do it?

<!-- gh-comment-id:2780637960 --> @NoonePauseferg commented on GitHub (Apr 5, 2025): yeah, I use cloud for gpu training and need firejail there for code testing i cant do it?
Author
Owner

@kmk3 commented on GitHub (Apr 5, 2025):

  • Version of Firejail (firejail --version): 0.9.72

Note that we do not maintain that version of firejail:

Versions other than the latest usually have outdated profiles and may contain
bugs and security vulnerabilities that were fixed in later versions.

See also:

Note that the current distribution packages may not contain the latest version
(for example, see #6702), in which case it's recommended to build from source:

What happens with the latest released version?

docker

Does it work outside of docker?

<!-- gh-comment-id:2781054157 --> @kmk3 commented on GitHub (Apr 5, 2025): > * Version of Firejail (`firejail --version`): 0.9.72 Note that we do not maintain that version of firejail: * <https://github.com/netblue30/firejail/blob/master/SECURITY.md> Versions other than the latest usually have outdated profiles and may contain bugs and security vulnerabilities that were fixed in later versions. See also: * <https://github.com/netblue30/firejail#installing> Note that the current distribution packages may not contain the latest version (for example, see #6702), in which case it's recommended to build from source: * <https://github.com/netblue30/firejail#building> What happens with the latest released version? > docker Does it work outside of docker?
Author
Owner

@shaoohua commented on GitHub (Sep 5, 2025):

yeah, I use cloud for gpu training and need firejail there for code testing

i cant do it?

Did you make it work inside docker? I got same issue.

<!-- gh-comment-id:3259369639 --> @shaoohua commented on GitHub (Sep 5, 2025): > yeah, I use cloud for gpu training and need firejail there for code testing > > i cant do it? Did you make it work inside docker? I got same issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3341
No description provided.