signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.62k stars 2.66k forks source link

Segmentation fault when starting v1.33.0-beta.4 on Linux #4084

Closed mmirg closed 4 years ago

mmirg commented 4 years ago

Bug Description

Steps to Reproduce

  1. Start Signal beta with --use-tray-icon

Actual Result:

I see the new smaller "optimizing application" splash animation then the software issues a segmentation fault.

Expected Result:

Software should start properly.

Screenshots

Platform Info

Signal Version:

v1.33.0-beta.4

Operating System:

Linux 5.5.11 (using the Cinnamon desktop environment)

Linked Device Version:

Android 4.57.2

Link to Debug Log

Software does not start to where I can submit a log.

Command line output:

NODE_ENV production
NODE_CONFIG_DIR /opt/Signal Beta/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/user/.config/Signal Beta
config/get: Successfully read user config file
x-attr dependncy did not load successfully
config/get: Successfully read ephemeral config file
making app single instance
{"name":"log","hostname":"l0calhost","pid":30300,"level":30,"msg":"app ready","time":"2020-03-26T00:49:01.747Z","v":0}
{"name":"log","hostname":"l0calhost","pid":30300,"level":30,"msg":"starting version 1.33.0-beta.4","time":"2020-03-26T00:49:01.747Z","v":0}
{"name":"log","hostname":"l0calhost","pid":30300,"level":30,"msg":"updateSchema:\n  Current user_version: 20;\n  Most recent db schema: 20;\n  SQLite version: 3.30.1;\n  SQLCipher version: 4.3.0 community;\n  (deprecated) schema_version: 60;\n","time":"2020-03-26T00:49:01.759Z","v":0}
{"name":"log","hostname":"l0calhost","pid":30300,"level":30,"msg":"sql.initialize is taking more than three seconds; showing loading dialog","time":"2020-03-26T00:49:04.759Z","v":0}
{"name":"log","hostname":"l0calhost","pid":30300,"level":30,"msg":"before-quit event {\"readyForShutdown\":null,\"shouldQuit\":false}","time":"2020-03-26T00:49:19.676Z","v":0}
Segmentation fault
scottnonnenberg-signal commented 4 years ago

What is the last previous version you ran successfully? And how did you install it?

Is it Linux Mint? Can you run lsb_release -a for us?

mmirg commented 4 years ago

I ran v1.32.1-beta.1 successfully from the day of release until yesterday when I installed 1.33.0-beta.3 which ran without the tray icon (but exhibited a number of other bugs related to duplicating contacts and losing sync with my phone client). I am running Gentoo and installed the application using the portage ebuild that uses the binary deb build.

lsb_release -a LSB Version: n/a Distributor ID: Gentoo Description: Funtoo Linux 1.4 Release: n/a Codename: n/a

v1.32.2 continues to run without segmentation fault using the same database and configuration files.

mmirg commented 4 years ago

Screenshot from 2020-03-26 12-48-31 I occasionally see this error when I attempt to launch the program but I cannot actually get it to successfully copy to my clipboard even if I press "Copy error and quit".

The same version connected to the same device does run successfully on another device that is running Debian: lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.12 (stretch) Release: 9.12 Codename: stretch

rubin110 commented 4 years ago

Same issue on Debian Sid.

20200327-104402 rubin110@lines:~$ uname -a
Linux lines 5.4.0-4-amd64 #1 SMP Debian 5.4.19-1 (2020-02-13) x86_64 GNU/Linux
20200327-104406 rubin110@lines:~$ dpkg -l |grep signal-desktop-beta 
ii  signal-desktop-beta                           1.33.0-beta.4                           amd64        
20200327-104408 rubin110@lines:~$ dpkg -l |grep plasma-desktop
ii  plasma-desktop                                4:5.17.5-3                              amd64        Tools and widgets for the desktop
ii  plasma-desktop-data                           4:5.17.5-3                              all          Tools and widgets for the desktop data files
rubin110 commented 4 years ago

@scottnonnenberg I should note...

20200328-133128 rubin110@lines:~/.config/Signal Beta$ du -hd1
3.8M    ./GPUCache
24K     ./shared_proto_db
28K     ./Session Storage
4.0K    ./webrtc_event_logs
24K     ./Local Storage
4.0K    ./temp
13G     ./attachments.noindex
24K     ./VideoDecodeStats
6.1M    ./logs
8.0K    ./blob_storage
50M     ./stickers.noindex
20K     ./Code Cache
444K    ./Dictionaries
320K    ./drafts.noindex
40K     ./IndexedDB
12K     ./databases
380M    ./sql
468K    ./Cache
13G     .
kenpowers-signal commented 4 years ago

@mmirg how did you install / how are you running Signal? Are you running from the source code?

mmirg commented 4 years ago

Gentoo currently uses binary ebuilds in Portage that use Signal's .deb packages for installation. The segfault does not occur when I remove ~/.config/Signal\ Beta so the crash appears to be related to configuration and/or the message database. I get a segmentation fault when I attempt to launch with an older backed up database from several months ago as well.

kenpowers-signal commented 4 years ago

@mmirg if I understand correctly you're saying that you don't get a segfault if you start up without a database and let the app create a fresh database?

mmirg commented 4 years ago

@kenpowers-signal Sorry, I was a little ambiguous when describing what I tested. I am able to start up without a database but I did not attempt to link my phone. I presume that even if the database is initialized at launch that is not populated until a device is linked (something that I have not yet tested.)

To confirm, I do have another instance v1.33.0-beta.4 linked to the same device on a different laptop that I have been using for a number of months that was able to upgrade its database and continues to function without error.

kenpowers-signal commented 4 years ago

@mmirg What OS is that other laptop running?

mmirg commented 4 years ago

Debian:

The same version connected to the same device does run successfully on another device that is running Debian: lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.12 (stretch) Release: 9.12 Codename: stretch

strugee commented 4 years ago

I can confirm this bug on Debian 10 running under Qubes OS. Signal Desktop Beta is installed through the WhisperSystems APT repositories; dpkg logs indicate that I upgraded from 1.32.1-beta.1 to 1.33.0-beta.4. I thought about doing a bisection between these releases but I'm worried that a migration has already been run and I'd end up corrupting my data. Is there a way to check what version the data is at?

I was not able to replicate the crash if I moved my data directory out of the way. I let it initialize, linked my phone (which is also running Signal Beta 4.58.4), and sent a message to a group and to note to self. Everything worked normally.

Based on https://github.com/signalapp/Signal-Desktop/issues/3893#issuecomment-575852756, I tried letting Signal Desktop initialize a fresh data directory, shutting it down, and copying sql/ and config.json from my old data directory, resulting in these logs:

$ signal-desktop-beta
Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop-beta' }
NODE_ENV production
NODE_CONFIG_DIR /opt/Signal Beta/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/user/.config/Signal Beta
config/get: Successfully read user config file
x-attr dependncy did not load successfully
config/get: Successfully read ephemeral config file
making app single instance
{"name":"log","hostname":"signal","pid":2035,"level":30,"msg":"app ready","time":"2020-04-03T04:15:55.518Z","v":0}
{"name":"log","hostname":"signal","pid":2035,"level":30,"msg":"starting version 1.33.0-beta.4","time":"2020-04-03T04:15:55.518Z","v":0}
{"name":"log","hostname":"signal","pid":2035,"level":30,"msg":"updateSchema:\n  Current user_version: 20;\n  Most recent db schema: 20;\n  SQLite version: 3.30.1;\n  SQLCipher version: 4.3.0 community;\n  (deprecated) schema_version: 60;\n","time":"2020-04-03T04:15:55.538Z","v":0}
{"name":"log","hostname":"signal","pid":2035,"level":30,"msg":"sql.initialize is taking more than three seconds; showing loading dialog","time":"2020-04-03T04:15:58.552Z","v":0}
{"name":"log","hostname":"signal","pid":2035,"level":30,"msg":"before-quit event {\"readyForShutdown\":null,\"shouldQuit\":false}","time":"2020-04-03T04:16:04.105Z","v":0}
/opt/Signal Beta/si[2035]: ../../third_party/electron_node/src/node_platform.cc:449:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
Aborted
rubin110 commented 4 years ago

@kenpowers-signal Any other debugging information we can provide to aid in getting this address? It's been a rather rough two weeks to not having Signal on my laptop. Thanks for your help.

kenpowers-signal commented 4 years ago

@rubin110 Can you zip up ~/.config/Signal Beta/logs and send it to ken@signal.org?

rubin110 commented 4 years ago

@kenpowers-signal Sent!

bitmoji

mmirg commented 4 years ago

Appears to be fixed in v1.33.0-beta.5.

kenpowers-signal commented 4 years ago

@rubin110 Can you also try v1.33.0-beta.5 and tell us if the issue was fixed for you?

rubin110 commented 4 years ago

Fixed on v1.33.0-beta.5!

bitmoji