[GH-ISSUE #1128] processes not terminated properly #776

Closed
opened 2026-05-05 06:38:16 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @testbird on GitHub (Mar 5, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1128

Finally I found a command that runs firefox sucessfully as a different user within firejail using this command, and it should be easy to reproduce.

The firefox.profile is used through symlinking, and has this added at the beginning:

net eth0
x11
nosound

Then try
gksu -l -u webuser -w firefox

However, the command does not close properly and I have no idea left how to debug this.

...
2017-03-05 21:19:16,676 stopping pulseaudio with pid 7846
xpra at :903 has exited.
(EE) Server terminated successfully (0). Closing log file.

got signal SIGTERM, exiting
^C
~ $

I noticed the pulseaudio ran despite the option nosound.
And the error is that Ctrl-C is needed to get back to the command line.
And sometimes (very strange) killall xpra or firejail seems to catch a process after the Ctrl-C, but not always.

Originally created by @testbird on GitHub (Mar 5, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1128 Finally I found a command that runs firefox sucessfully as a different user within firejail using this command, and it should be easy to reproduce. The firefox.profile is used through symlinking, and has this added at the beginning: ``` net eth0 x11 nosound ``` Then try `gksu -l -u webuser -w firefox` However, the command does not close properly and I have no idea left how to debug this. ``` ... 2017-03-05 21:19:16,676 stopping pulseaudio with pid 7846 xpra at :903 has exited. (EE) Server terminated successfully (0). Closing log file. got signal SIGTERM, exiting ^C ~ $ ``` I noticed the pulseaudio ran despite the option nosound. And the error is that `Ctrl-C` is needed to get back to the command line. And sometimes (very strange) killall xpra or firejail seems to catch a process after the Ctrl-C, but not always.
gitea-mirror 2026-05-05 06:38:16 -06:00
Author
Owner

@netblue30 commented on GitHub (Mar 7, 2017):

I'll try to reproduce it, thanks.

<!-- gh-comment-id:284765331 --> @netblue30 commented on GitHub (Mar 7, 2017): I'll try to reproduce it, thanks.
Author
Owner

@testbird commented on GitHub (Mar 8, 2017):

only sometimes (very strange) killall xpra or firejail seems to catch a process

This I found happens when supplying a filename as parameter like firefox http://github.com or evince ~/my.pdf

Independent from this, the shell does not return to the prompt, and I notice .:*-fakexinerama files piling up in $HOME.

<!-- gh-comment-id:285011407 --> @testbird commented on GitHub (Mar 8, 2017): > only sometimes (very strange) killall xpra or firejail seems to catch a process This I found happens when supplying a filename as parameter like `firefox http://github.com` or `evince ~/my.pdf` Independent from this, the shell does not return to the prompt, and I notice `.:*-fakexinerama` files piling up in $HOME.
Author
Owner

@SHOTbyGUN commented on GitHub (Apr 27, 2017):

I am unable to cleanly kill firefox after it has crashed under firejail

My issue was not relevant, click here to see the original post firefox will eventually crash if - running whole day - multiple tabs using flash

Then firefox will become

  • unresponsive
  • does not respond to SIGTERM
  • SIGKILL will create a zombie
  • SIGKILL:ing whole tree including firejail, will leave PID:s in system, where is the reaper?
  • New firefox instances will run sluggishly and are prone to crash sooner
  • Computer cannot shutdown, only 3sec force power off button works.

As I am writing this, I find this firejail option which I will try this next time I have crashes, and then edit this post.

      --shutdown=name|PID
          Shutdown the sandbox identified by name or PID.

          Example:
          $ firejail --name=mygame --caps.drop=all warzone2100 &
          $ firejail --shutdown=mygame

          Example:
          $ firejail --list
          3272:netblue:firejail --private firefox
          $ firejail --shutdown=3272

Update: The firefox processes that I kill, will become zombies, but it will leave behind one or more D state threads which can be killed only by unplugging power cord or hard reset. reference: https://stackoverflow.com/questions/223644/what-is-an-uninterruptable-process

firejail with shutdown command did not help

I assume my issue is unrelated --- filesystem bug. Even tho I am a bit upset that even firejail sandboxed D state processes cannot be killed.


Update 2: My issue was not related. I just had "never" ran fstrim command on F2FS SSD which was causing the issue.

<!-- gh-comment-id:297681606 --> @SHOTbyGUN commented on GitHub (Apr 27, 2017): ~~I am unable to cleanly kill firefox after it has crashed under firejail~~ <details> <summary>My issue was not relevant, click here to see the original post</summary> firefox will eventually crash if - running whole day - multiple tabs using flash Then firefox will become - unresponsive - does not respond to SIGTERM - SIGKILL will create a zombie - SIGKILL:ing whole tree including firejail, will leave PID:s in system, where is the reaper? - New firefox instances will run sluggishly and are prone to crash sooner - Computer cannot shutdown, only 3sec force power off button works. As I am writing this, I find this firejail option which I will try this next time I have crashes, and then edit this post. --shutdown=name|PID Shutdown the sandbox identified by name or PID. Example: $ firejail --name=mygame --caps.drop=all warzone2100 & $ firejail --shutdown=mygame Example: $ firejail --list 3272:netblue:firejail --private firefox $ firejail --shutdown=3272 **Update:** The firefox processes that I kill, will become zombies, but it will leave behind one or more D state threads which can be killed only by unplugging power cord or hard reset. reference: https://stackoverflow.com/questions/223644/what-is-an-uninterruptable-process firejail with shutdown command did not help I assume my issue is unrelated --- filesystem bug. Even tho I am a bit upset that even firejail sandboxed D state processes cannot be killed. </details> <br> **Update 2:** My issue was not related. I just had *"never"* ran fstrim command on F2FS SSD which was causing the 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#776
No description provided.