signalapp / Signal-Desktop

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

Failure of mkdir is not propagated to error message #7079

Open mihaelacr opened 1 week ago

mihaelacr commented 1 week ago

Using a supported version?

Overall summary

Opening signal-desktop on Linux when /tmp is full produces an inexact error message, as evidenced by strace:

 mkdir("/tmp/scoped_dir7D1Smz", 0700) = -1 ENOSPC (No space left on device)
 write(2</dev/pts/0>, "[442359:1111/202337.208115:ERROR"..., 102[442359:1111/202337.208115:ERROR:process_singleton_posix.cc(1138)] Failed to create socket directory.
) = 102

The errno of mkdir should be propagated to the user, currently signal does not tell the user that there is no space left.

Steps to reproduce

  1. Fill up /.
  2. Open signal-desktop.

Expected result

Signal prints to the terminal "No space left on device".

Actual result

Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /opt/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME ela-laptop
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/USER/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
[446390:1111/203755.957259:ERROR:process_singleton_posix.cc(1138)] Failed to create socket directory.
quitting; we are the second instance

Screenshots

No response

Signal version

7.31.0

Operating system

Ubuntu 22.04.5 LTS

Version of Signal on your phone

No response

Link to debug log

No response