Firejail sometimes gets reliably stuck, unable to open application

REPRODUCIBILITY: Variable, happens almost daily, don’t know how to reliably reproduce
HARDWARE: Xperia XA2 - Dual SIM


Sometimes, firejail gets stuck. When I close the child process from the GUI, or if the child process dies because of something else, the parent firejail process hangs around. If I try to restart the application from the GUI, it tries for a while, and then gives up. If I try to run just the application from the CLI, outside firejail, it will start, but its permissions won’t work. If I try to run the application in firejail from the CLI, it says “Error: can’t chdir to privileged” and will get as stuck as the other stuck firejail process: I cannot kill it by ctrl-C, nor by sending SIGKILL or SIGTERM from another terminal. It’s just stuck. The only way to unstuck it is to reboot the whole phone.


I really don’t know. I try to restart a program - e.g. jolla-calendar, jolla-messages, etc - that has stopped before, either by me stopping it or by it crashing. It does not start. But this doesn’t happen always; sometimes, there’s no stuck firejail process, and the program will start.


  1. Stop a program, eg. jolla-messages, jolla-calendar
  2. Try to restart it
  3. Repeat until you get the behaviour described (will sometimes happen on the first time, will sometimes take days)


Firejail process dies when the child dies. A new firejail and child is started.


Firejail process does not die when the child dies and cannot be killed by any means short of restarting the phone. Trying to start the program anew fails.



I think this appeared at some point during Sailfish 4 but not sure when. Earlier, if a program was stuck, I could always kill it from the CLI. But these firejail processes won’t die anymore.

1 Like

My first thought, back up what you can and go for reinstall of the OS.

Second thought, decided to look for sailjail in the repo, by devel-su pkcon search name sailjail and note that it is installed and can likely be uninstalled, if not the CLI should warn you it’s not possible as it will break the system and so uninstall will quit.

Third thought, while in CLI, hit devel-su pkcon refresh, the do devel-su pkcon update. Perhaps this might help fix any broken packages.

All of this is guess work, but if it were me, I’d likely reinstall the OS and start afresh!

I sometimes also have messages app that won’t start again. After several minutes (5, 10, 15?), it starts again.
Perhaps the same cause as yours.
How did you find out that some SJ processes were the culprits?

@Edz I don’t think uninstalling firejail/sailjail is a good idea. Same for re-installing the OS - that way we won’t find out what’s going on.

I think I have seen similar behavior on my phone but not so often.

As ric9k asked: how do you know that specific firejail process is still around?
Have you tried killing it with root privileges?
Assuming that succeeds, can you then normally restart the app in question?

I had a similar problem when i single-instance-adapted SeaPrint.
In that case it was the ExecDBus/prestart pattern that was (is) the culprit. If i restart an app that uses that pattern too fast the name sometimes has not been freed up on dbus, the prestart instance fails silently, and the call that would bring it to front goes somewhere out into the void.

This was very reproducible even with e.g. the Documents app. However, it would self-heal in not too long, so no restart or further action was needed for me.

So i guess i’ll add to the crowd asking: “how do you observe this?”.

Messages not restarting several times a day happens a lot to mes atm.

Journalctl gives this:


Mar 06 16:39:03 XperiaXA2-DualSIM systemd[5536]: jolla-messages.service: Start operation timed out. Terminating.
Mar 06 16:39:03 XperiaXA2-DualSIM /usr/libexec/mapplauncherd/booster-generic[5582]: warning: terminating: booster:965 invoker:1525 socket:12
Mar 06 16:39:03 XperiaXA2-DualSIM /usr/libexec/mapplauncherd/booster-generic[5582]: warning: Daemon: sending exit(1) to invoker(1525)
Mar 06 16:39:03 XperiaXA2-DualSIM /usr/libexec/mapplauncherd/booster-generic[5582]: warning: sending SIGTERM to booster (pid=965)
Mar 06 16:39:03 XperiaXA2-DualSIM systemd[5536]: jolla-messages.service: Failed with result ‘timeout’.
Mar 06 16:39:03 XperiaXA2-DualSIM systemd[5536]: Failed to start Jolla messaging.

I’m suspecting the Messages app being too long to start as I have a lot of messages.
(incl. all N900 SMSes since ~2011 too. I know, I know… :-))

Setting a longer timeout would perhaps help, as it says “Start operation timed out. Terminating.” ?
So the question is: How do one set the timeout for apps startup?