1

I just recently swapped to Elementary OS and I planned to stay, however I am getting a terrible browsing experience.

Every time I use Firefox it will at some point crash and die, with weird graphical issues. I have run it in the terminal to see what exactly was happening. I have been swapping between distro's and this is the first time I have seen this which makes me think it has something to do specifically with how Elementary OS is constructed, apologies if this is not the case.

Here is the output to the terminal:

Sandbox: Unexpected EOF, op 0 flags 02400302 path /dev/shm/org.mozilla.ipc.17256.41
Sandbox: bad read from pid 17256: Message too long
[Child 17256, Main Thread] WARNING: failed to open shm: Input/output error: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 1588, 0, 12, 740
[Child 17256, Main Thread] WARNING: failed to open shm: Broken pipe: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 0, -1, 12, 232
[Child 17256, Main Thread] WARNING: failed to open shm: Broken pipe: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
... (about 60-70 more lines of this before following)
[Parent 17031, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.

(firefox:17031): dconf-CRITICAL **: 16:33:48.340: unable to create file '/run/user/1000/dconf/user': Too many open files.  dconf will not work properly.

(firefox:17031): dconf-CRITICAL **: 16:33:48.340: unable to create file '/run/user/1000/dconf/user': Too many open files.  dconf will not work proper

I decided to take a look at /run/user/1000/dconf/user, and found that this is a tmpfs set up by systemd. The default is for this to run at 10% of ram which gave me 3GB, I have doubled this to 6GB, I didn't think that this would fix it but figured it couldn't hurt. 'df' more or less shows that this is a red herring:

Filesystem              Size  Used Avail Use% Mounted on
udev                     16G     0   16G   0% /dev
tmpfs                   3.2G  1.8M  3.2G   1% /run
/dev/mapper/sdb1_crypt   66G   19G   47G  29% /
tmpfs                    16G   49M   16G   1% /dev/shm
tmpfs                   5.0M  4.0K  5.0M   1% /run/lock
tmpfs                    16G     0   16G   0% /sys/fs/cgroup
/dev/sda1               472M  149M  299M  34% /boot
/dev/mapper/sda2_crypt  698G   70G  629G  10% /home
/dev/mapper/sdb2_crypt   55G  4.8G   50G   9% /home/bit/ssd
tmpfs                   6.3G   68K  6.3G   1% /run/user/1000

My /dev/shm has 16G. I have 32GB of ram so it seems fairly unlikely to me that this is a memory issue.

So I checked inode usage, and there seems to be millions of those as well:

Filesystem             Inodes IUsed IFree IUse% Mounted on
udev                     4.0M   596  4.0M    1% /dev
tmpfs                    4.0M  1.1K  4.0M    1% /run
/dev/mapper/sdb1_crypt    33M  248K   33M    1% /
tmpfs                    4.0M    75  4.0M    1% /dev/shm
tmpfs                    4.0M     6  4.0M    1% /run/lock
tmpfs                    4.0M    18  4.0M    1% /sys/fs/cgroup
/dev/sda1                122K   355  122K    1% /boot
/dev/mapper/sda2_crypt   350M   85K  349M    1% /home
/dev/mapper/sdb2_crypt    28M    91   28M    1% /home/bit/ssd
tmpfs                    4.0M    37  4.0M    1% /run/user/1000

I have googled for shared_memory_posix.cc, line 142 errors, but google comes up with errors on a differnet line 129.

So I am a bit stuck. I was previously on Gentoo, and this didn't happen, and on Kubuntu, and it didn't happen there either. I used chromium for a couple hours, I'm not sure how long I need to use it for but this didn't seem to occur on chromium.

I then thought maybe I'm hitting file open cap as the error seems to indicate but I'm not sure what is happening under hood here as I already seem to be exceeding this limit...

ulimit -n
1024
lsof | wc -l
529778

I'm debating whether or not to increase this...

Firefox crashed while I was writing this here some more terminal output:

[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.
[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.
[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.
...
[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.
[Child 4114, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 349, 240, 729, 1630
[Child 4114, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 349, 240, 729, 1630
[Child 5341, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 0, -1, 12, 610
[Child 5341, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 0, 0, 1588, 888
Sandbox: Sandbox: bad read from pid 4114: Message too longUnexpected EOF, op 2 flags 00 path /etc/localtime
[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.
...
Sandbox: Sandbox: Unexpected EOF, op 1 flags 04 path /usr/share/fonts/truetype/open-sans/OpenSans-Regular.ttfbad read from pid 6797: Message too long
(/usr/lib/firefox/firefox:6797): Pango-WARNING **: 08:23:23.429: failed to create cairo scaled font, expect ugly output. the offending font is 'Open Sans 9'
usr/lib/firefox/firefox:6797): Pango-WARNING **: 08:23:23.429: font_face status is: file not found
(/usr/lib/firefox/firefox:6797): Pango-WARNING **: 08:23:23.429: scaled_font status is: file not found
(/usr/lib/firefox/firefox:6797): Pango-WARNING **: 08:23:23.429: shaping failure, expect ugly output. shape-engine='PangoFcShapeEngine', font='Open Sans 9', text='●'
(/usr/lib/firefox/firefox:6797): Pango-WARNING **: 08:23:23.433: failed to create cairo scaled font, expect ugly output. the offending font is 'Open Sans 9'
(/usr/lib/firefox/firefox:6797): Pango-WARNING **: 08:23:23.433: font_face status is: file not found
(/usr/lib/firefox/firefox:6797): Pango-WARNING **: 08:23:23.433: scaled_font status is: file not found
[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.
[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed to lock new back buffer.
[Parent 4048, Main Thread] WARNING: failed to open shm: Too many open files: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[Parent 4048, Gecko_IOThread] WARNING: Message needs unreceived descriptors channel:7fb58ff99000 message-type:3473517 header()->num_fds:1 num_fds:0 fds_i:0: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 536
[Child 6797, Chrome_ChildThread] WARNING: pipe error (32): Connection reset by peer: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 357
Exiting due to channel error.
###!!! [Parent][MessageChannel] Error: (msgtype=0x1E0087,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
[Parent 4048, Gecko_IOThread] WARNING: pipe error (3360): Connection reset by peer: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 357
[Parent 4048, Gecko_IOThread] WARNING: pipe error (3371): Connection reset by peer: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 357
[Child 4114, Main Thread] WARNING: failed to open shm: Broken pipe: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 1588, 0, 12, 740
[Child 4114, Main Thread] WARNING: failed to open shm: Broken pipe: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 0, -1, 12, 610
...
[Child 4114, Main Thread] WARNING: failed to open shm: Broken pipe: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 0, 0, 30, 30
IPDL protocol Error: Received an invalid file descriptor
...
IPDL protocol Error: Received an invalid file descriptor
Sandbox: Sandbox: Unexpected EOF, op 0 flags 02400302 path /dev/shm/org.mozilla.ipc.5341.414bad read from pid 5341: Message too long
[Child 5341, Main Thread] WARNING: failed to open shm: Input/output error: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 1588, 0, 12, 740
...
[Child 5341, Main Thread] WARNING: failed to open shm: Broken pipe: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/base/shared_memory_posix.cc, line 142
[GFX1-]: Failed buffer for 0, 0, 30, 30
[Parent 4048, Gecko_IOThread] WARNING: pipe error (1963): Connection reset by peer: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 357
[Parent 4048, Gecko_IOThread] WARNING: pipe error (42): Connection reset by peer: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 357
[Parent 4048, Gecko_IOThread] WARNING: pipe error (2572): Connection reset by peer: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 357
[Parent 4048, Gecko_IOThread] WARNING: pipe error (3362): Connection reset by peer: file /build/firefox-6m4fHv/firefox-66.0.3+build1/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 357

Firefox version: Firefox Quantum 66.0.3 (64-bit)

Elementary OS: Elementary OS 5.0 Juno (64-bit) Linux 4.15.0-48-generic

Edit update: I found the following link to a redhat bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=1680318

I'm now debating whether to uninstall firefox and compile it myself to see if I can get it to compile...

I also find some weak links in a very old report that is probably unrelated:

https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/566788

Anyone have any idea?

closed as off-topic by Hasan May 10 at 15:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about elementary OS, within the scope defined in the help center." – Hasan
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Looks like something with firefox to me. – Hasan May 4 at 9:37
  • Its strange that this only happens in Elementary though, if I spin up any other distro, Firefox works fine. – user18009 May 6 at 7:15
  • Let's talk in chat; this conversation has been moved to chat. – Hasan May 6 at 7:17
-1

A recent update to Firefox has fixed this for me, so I guess I just needed to be more patient.

Not the answer you're looking for? Browse other questions tagged or ask your own question.