mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1113] suspend a jail #764
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#764
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ffa on GitHub (Feb 23, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1113
Hi,
Is their a mailing list, forum, or some community for asking questions and general interactions, or is github issues the appropriate place?
My question is about "hibernating"/suspending/sleeping jails. Is there a way to suspend an instance to disk and then resume it later? If not may put this out as a feature or possibly help implement it?
@netblue30 commented on GitHub (Feb 25, 2017):
Since you already have a github account, ask them here.
Hibernate/suspend/sleep - let's mark it as an enhancement, I have no idea in this moment how is done.
@ffa commented on GitHub (Feb 26, 2017):
okay.
@ffa commented on GitHub (Feb 26, 2017):
criu? https://criu.org/Main_Page
@Ferroin commented on GitHub (Feb 27, 2017):
CRIU is one option, but it's not very mature, and doesn't seem to completely handle namespaces yet (which means it's pretty much not useful to firejail). It might be possible to just do the same in firejail, but we would still need the relevant kernel API's to be completely namespace aware (which is the main reason that CRIU has issues).
@ffa commented on GitHub (Feb 27, 2017):
I did some basic tests on CRIU with and without firejail. CRIU does seem to have problems regardless of firejail.
How complete? https://lwn.net/Articles/531114/
@Ferroin commented on GitHub (Feb 27, 2017):
FWIW, CRIU has been improving, it's just slow since the general functionality isn't something a very large number of people are interested in, and those who are are quite often using virtual machines to achieve the same thing.
As for the linked article, it covers the bare-bones basics for namespaces and is still generally accurate, some things regarding the details of usage have changed since that series was published more than 4 years ago though, so I'm not certain how accurate the other parts are.
@ffa commented on GitHub (Feb 27, 2017):
okay. That is my current solution as well.
yes, it is a short coverage and a good introduction.
@thiswillbeyourgithub commented on GitHub (Jan 3, 2018):
I came to this issue looking for a way to pause and resume jail too, I noticed that
kill -STOP [JAIL PID]andkill -CONTsurprisingly does absolutely nothing. I would have thought this would have worked :/@smitsohu commented on GitHub (Jan 8, 2018):
@thiswillbeyourgithub Maybe you are sending the signal to the wrong process. For example with VLC, it works for me like this:
@thiswillbeyourgithub commented on GitHub (Jan 8, 2018):
@smitsohu well this way you are pausing a specific process, not a whole firejail. It can of course end up doing the same but if you have severall processes sandboxed together it's not really feasible is it ?
@chiraag-nataraj commented on GitHub (Jul 22, 2018):
@thiswillbeyourgithub Most jails have a "main" process, so I don't see why this isn't feasible. Of course, it would probably be easier to have this within firejail itself, where it could loop through the child PIDs and send them stop signals. But that's vulnerable to race conditions (something we probably don't want in an SUID executable), so it's probably better done as a helper script. Also, I seem to have an issue where issuing
-STOPand-CONTsignals leads to zombie processes andfirejailnever terminating the sandbox, but that could be due to interactions withsystemd? Anyway, I don't think this is a good idea to put infirejail, but it should be fairly easy to script up a solution. For example,selects all of the top-level processes which aren't
firejail(basically, the top-level children in the sandboxes). I don't know that you'd want to automate the freezing process, but you could ask for the PID to sendSTOPto.