electron: [Bug]: FATAL:platform_shared_memory_region_posix.cc(255) fixed by --disable-seccomp-filter-sandbox

Preflight Checklist

Electron Version

13.2.1

What operating system are you using?

Other Linux

Operating System Version

Gentoo

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Slack 4.13.0-4.19.2 (based on Electron 11.2.3-13.2.1) should show it’s main window and won’t print this error on start:

[327241:0827/214511.475208:FATAL:platform_shared_memory_region_posix.cc(255)] This is frequently caused by incorrect permissions on /dev/shm. Try 'sudo chmod 1777 /dev/shm' to fix.

Actual Behavior

Slack 4.13.0-4.19.2 prints mentioned above error message and I see only tray icon, no main window.

Testcase Gist URL

No response

Additional Information

Last version of Slack which works on my system is 4.12.2, because next versions added this call:

external_electron_.app.enableSandbox()

Removing this call makes these versions to work. Also these versions works if started with --disable-seccomp-filter-sandbox.

There are two issues here:

  1. Unhelpful and misleading error message. It talks about “This is frequently caused by incorrect permissions on /dev/shm. Try ‘sudo chmod 1777 /dev/shm’ to fix.” but my /dev/shm already have 1777 perms and 16GB of free space, so this issue isn’t related to /dev/shm at all.
  2. Broken sandbox support. (Installing /opt/slack/chrome-sandbox SUID doesn’t make any changes.) I doubt it’s because of my kernel/OS configuration because Chrome 92.0.4515.159 has full sandbox support:

chrome-sandbox

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

@powerman your response here is the closest one I can find to an issue I am seeing in electron 20.x through electron 22.x on macOS Mojave 10.14.5:

Render frame was disposed before WebFrameMain could be accessed

Anywhere that I am calling browserWindow.webContents.send(), despite first checking !webContents.isDestroyed() && !webContents.isLoading().

Electron 12.x through 19.x work fine.

bump