Signal is an encrypted communications application, a successor of the RedPhone encrypted voice calling application and the TextSecure encrypted texting program. It has versions for Android and iOS, and also a desktop version for Windows, Linux, and MacOS.

From what I can tell, the desktop version of Signal is built upon the Electron framework.

A couple of months ago, I have faced an issue: Signal Desktop client failed to start. When trying to run it from the console, I saw the following error message:

JavaScript error occurred in the main process
Uncaught Exception:
Error: /tmp/.org.chromium.Chromium.j4ITUv: failed to map segment from shared object
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:172:20)
    at Object.Module._extensions..node (module.js:671:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:186:18)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Object. (/opt/Signal/resources/app.asar/node_modules/@journeyapps/sqlcipher/lib/sqlite3.js:4:15)
    at Object. (/opt/Signal/resources/app.asar/node_modules/@journeyapps/sqlcipher/lib/sqlite3.js:190:3)

Googling for “signal failed to map segment from shared object” produced no meaningful results (at least, at that time), but the answer to the question was in fact in the third line of the error message: Error: /tmp/.org.chromium.Chromium.j4ITUv: failed to map segment from shared object. “Failed to map segment from shared object” means that for some reason the shared object was not executable, and /tmp pointed to the location. The actual issue was that my /tmp was mounted as noexec (yes, that was on a desktop).

The solution was to remount /tmp as exec temporarily, run Signal, and then remount /tmp back with noexec:

sudo mount /tmp -oexec,remount
signal-desktop
sleep 30
sudo mount /tmp -onoexec,remount

Another alternative is, of course, not to be paranoid and not mount /tmp as noexec.

Hope this helps someone 🙂

Signal Desktop and Failed to Map Segment from Shared Object Error
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *