[GH-ISSUE #4543] --join-or-start=program shouldn't create program-PID sandboxes if multiple instances try to start simultaneously. #2700

Open
opened 2026-05-05 09:21:45 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @crocket on GitHub (Sep 14, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4543

If my bookmark manager tries to open multiple bookmarks by launching multiple invocations of firejail --join-or-start=librewolf librewolf URL simultaneously, the first invocation creates librewolf sandbox and some of subsequent invocations end up creating librewolf-PID sandboxes.

If multiple firejail invocations are trying to launch simultaneously with --join-or-start=program, the first invocation should reserve a named sandbox which subsequent invocations wait for before joining the named sandbox.

Because not all invocations of librewolf join the same sandbox, I had to insert

ignore private-tmp
ignore dbus-user

into librewolf.local in order to launch multiple bookmarks simultaneously on librewolf.

If --join-or-start was good at putting all simultaneous invocations of firejail in one named sandbox, I didn't need to make all librewolf instances share /tmp and dbus with programs outside sandbox.

Originally created by @crocket on GitHub (Sep 14, 2021). Original GitHub issue: https://github.com/netblue30/firejail/issues/4543 If my bookmark manager tries to open multiple bookmarks by launching multiple invocations of `firejail --join-or-start=librewolf librewolf URL` simultaneously, the first invocation creates `librewolf` sandbox and some of subsequent invocations end up creating `librewolf-PID` sandboxes. If multiple firejail invocations are trying to launch simultaneously with `--join-or-start=program`, the first invocation should reserve a named sandbox which subsequent invocations wait for before joining the named sandbox. Because not all invocations of librewolf join the same sandbox, I had to insert ``` ignore private-tmp ignore dbus-user ``` into `librewolf.local` in order to launch multiple bookmarks simultaneously on librewolf. If `--join-or-start` was good at putting all simultaneous invocations of firejail in one named sandbox, I didn't need to make all librewolf instances share /tmp and dbus with programs outside sandbox.
Author
Owner

@rusty-snake commented on GitHub (Sep 14, 2021):

Previous discussion: #4538

<!-- gh-comment-id:919105561 --> @rusty-snake commented on GitHub (Sep 14, 2021): Previous discussion: #4538
Author
Owner

@rusty-snake commented on GitHub (Jun 8, 2022):

firejail 0.9.70 has improved join code, can you test if this still happens with it when it is released.

<!-- gh-comment-id:1149808580 --> @rusty-snake commented on GitHub (Jun 8, 2022): firejail 0.9.70 has improved join code, can you test if this still happens with it when it is released.
Author
Owner

@crocket commented on GitHub (Jun 9, 2022):

I will test. Just notify me on this issue when it's released.

<!-- gh-comment-id:1150886318 --> @crocket commented on GitHub (Jun 9, 2022): I will test. Just notify me on this issue when it's released.
Author
Owner

@kmk3 commented on GitHub (Jun 9, 2022):

I will test. Just notify me on this issue when it's released.

It has been released.

Note that you can subscribe to new releases through the Watch button (next to
the Fork button).

<!-- gh-comment-id:1151440337 --> @kmk3 commented on GitHub (Jun 9, 2022): > I will test. Just notify me on this issue when it's released. It has been released. Note that you can subscribe to new releases through the Watch button (next to the Fork button).
Author
Owner

@crocket commented on GitHub (Jun 10, 2022):

I installed 0.9.70 and rebooted. I tested librewolf with join-or-start librewolf in librewolf.local.

The issue was reproduced reliably. I still need to ignore private-tmp and dbus-user.

<!-- gh-comment-id:1152353994 --> @crocket commented on GitHub (Jun 10, 2022): I installed 0.9.70 and rebooted. I tested librewolf with `join-or-start librewolf` in librewolf.local. The issue was reproduced reliably. I still need to ignore private-tmp and dbus-user.
Author
Owner

@Stoxis commented on GitHub (May 22, 2023):

This fix for librewolf doesn't work

Screenshot_2023-05-22_02-09-28

How do I fix this? I don't receive the error when I launch tabs using the commandline with firefox, only librewolf. Both are using firejail.

<!-- gh-comment-id:1556428425 --> @Stoxis commented on GitHub (May 22, 2023): This fix for librewolf doesn't work ![Screenshot_2023-05-22_02-09-28](https://github.com/netblue30/firejail/assets/43509639/7edeb73e-ae9f-4e80-b135-b79b1a3d7892) How do I fix this? I don't receive the error when I launch tabs using the commandline with firefox, only librewolf. Both are using firejail.
Author
Owner

@rusty-snake commented on GitHub (May 22, 2023):

@Stoxis did you got that will bulk opening link or with only one link? If you got it with only one link, it has a different cause. Open a new Discussion then. (There are already a lot for Firefox).

<!-- gh-comment-id:1557418961 --> @rusty-snake commented on GitHub (May 22, 2023): @Stoxis did you got that will bulk opening link or with only one link? If you got it with only one link, it has a different cause. Open a new Discussion then. (There are already a lot for Firefox).
Author
Owner

@Stoxis commented on GitHub (May 23, 2023):

@Stoxis did you got that will bulk opening link or with only one link? If you got it with only one link, it has a different cause. Open a new Discussion then. (There are already a lot for Firefox).

If I run the command librewolf google.com/ it'll work the first time, but if I try to run the command a second time while the previous instance is still open I'll get the "Firefox is already running" error.

If I do the same thing firefox google.com/ I can do it as many times as I want to open new tabs without encountering the error.

Both Firefox and Librewolf are using Firejail.

<!-- gh-comment-id:1558302839 --> @Stoxis commented on GitHub (May 23, 2023): > @Stoxis did you got that will bulk opening link or with only one link? If you got it with only one link, it has a different cause. Open a new Discussion then. (There are already a lot for Firefox). If I run the command `librewolf google.com/` it'll work the first time, but if I try to run the command a second time while the previous instance is still open I'll get the "Firefox is already running" error. If I do the same thing `firefox google.com/` I can do it as many times as I want to open new tabs without encountering the error. Both Firefox and Librewolf are using Firejail.
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#2700
No description provided.