2

When executed within a minimal (unprivileged) LXC container, firefox segfaults (other graphical applications work fine).

I'am unable to find the exact cause of this segfault (which is most likely due to insufficient permissions or missing resources).

# strace /usr/bin/firefox
...
open("/usr/lib/libfreebl3.so", O_RDONLY|O_CLOEXEC) = 26
read(26,"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0007\0\0\0\0\0\0"..., 832) = 832
fstat(26, {st_mode=S_IFREG|0755, st_size=544424, ...}) = 0
mmap(NULL, 2619144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 26, 0) = 0x7f269bf1e000
mprotect(0x7f269bf97000, 2097152, PROT_NONE) = 0
mmap(0x7f269c197000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 26, 0x79000) = 0x7f269c197000
mmap(0x7f269c19a000, 14088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f269c19a000
close(26)                               = 0
mprotect(0x7f269c197000, 8192, PROT_READ) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x20} ---
unlink("/home/root/.mozilla/firefox/xqa348dr.default/lock") = 0
close(6)                                = 0
rt_sigaction(SIGSEGV, {SIG_DFL, [], SA_RESTORER, 0x7f26bafb5e80}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [SEGV], NULL, 8) = 0 
tgkill(228, 228, SIGSEGV)               = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=228, si_uid=0} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

Background: Firefox is executed in a minimal unprivileged LXC container (no init, not a whole distribution, just firefox and its dependencies) --- therefore I assume that this issue is related to possibly insufficient permissions or nonexistent resources Firefox needs to access. Inside of this container, trivial graphical programs like 'xclock' and even hardware accelerated programs like 'glxgears' work. It could be that the issue of firefox not working is related to dbus (I do not know if it is setup correctly --- all I did is cp /etc/machine-id /container/etc/).

UPDATE: I was able to solve the problem. The container was missing a dependency of firefox (at this point I cannot say which one because I took the half-assed way of mounting all package contents into the containers rootfs).

UPDATE2: I am still interested in how to find out the exact cause of above segfault.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.