Bugzilla – Bug 1223366
nodejs-electron: segfault in electron::ElectronDesktopWindowTreeHostLinux::OnWindowTiledStateChanged(ui::WindowTiledEdges)
Last modified: 2024-06-13 20:40:20 UTC
Signal Desktop is segmentation faulting for me, since version 7.5.1-1.2. Log: Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' } NODE_ENV production NODE_CONFIG_DIR /usr/libexec/signal-desktop/config NODE_CONFIG {} ALLOW_CONFIG_MUTATIONS undefined HOSTNAME hp450g4 NODE_APP_INSTANCE undefined SUPPRESS_NO_CONFIG_WARNING undefined SIGNAL_ENABLE_HTTP undefined userData: /home/john/.config/Signal config/get: Successfully read user config file config/get: Successfully read ephemeral config file getLogger: Logger not yet initialized! crashReporter: enabled making app single instance {"level":30,"time":"2024-04-24T16:17:06.386Z","msg":"crashReporter: enabled"} {"level":30,"time":"2024-04-24T16:17:06.395Z","msg":"got fast localeOverride setting null"} {"level":30,"time":"2024-04-24T16:17:06.395Z","msg":"app.ready: hour cycle preference: UnknownPreference"} {"level":30,"time":"2024-04-24T16:17:06.395Z","msg":"app.ready: preferred system locales: en-GB, en"} {"level":30,"time":"2024-04-24T16:17:06.396Z","msg":"locale: Supported locales: af-ZA, ar, az-AZ, bg-BG, bn-BD, bs-BA, ca, cs, da, de, el, en, es, et-EE, eu, fa-IR, fi, fr, ga-IE, gl-ES, gu-IN, he, hi-IN, hr-HR, hu, id, it, ja, ka-GE, kk-KZ, km-KH, kn-IN, ko, ky-KG, lt-LT, lv-LV, mk-MK, ml-IN, mr-IN, ms, my, nb, nl, pa-IN, pl, pt-BR, pt-PT, ro-RO, ru, sk-SK, sl-SI, sq-AL, sr, sv, sw, ta-IN, te-IN, th, tl-PH, tr, ug, uk-UA, ur, vi, yue, zh-CN, zh-HK, zh-Hant"} {"level":30,"time":"2024-04-24T16:17:06.396Z","msg":"locale: Preferred locales: en-GB, en"} {"level":30,"time":"2024-04-24T16:17:06.400Z","msg":"locale: Locale Override: null"} {"level":30,"time":"2024-04-24T16:17:06.404Z","msg":"locale: Matched locale: en"} {"level":40,"time":"2024-04-24T16:17:06.485Z","msg":"intl.onWarn [@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution"} {"level":30,"time":"2024-04-24T16:17:06.486Z","msg":"locale: Text info direction for en: ltr"} {"level":30,"time":"2024-04-24T16:17:06.486Z","msg":"getSystemTraySetting got value MinimizeToAndStartInSystemTray"} {"level":30,"time":"2024-04-24T16:17:06.486Z","msg":"getSystemTraySetting returning MinimizeToAndStartInSystemTray"} {"level":30,"time":"2024-04-24T16:17:06.488Z","msg":"app ready"} {"level":30,"time":"2024-04-24T16:17:06.488Z","msg":"starting version 7.5.1"} {"level":30,"time":"2024-04-24T16:17:06.488Z","msg":"media access status [object Undefined] [object Undefined]"} {"level":30,"time":"2024-04-24T16:17:06.491Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2024-04-24T16:17:06.493Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2024-04-24T16:17:06.493Z","msg":"got fast spellcheck setting true"} {"level":30,"time":"2024-04-24T16:17:06.494Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":683,\"height\":696,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"enableBlinkFeatures\":\"CSSPseudoDir,CSSLogical\",\"enablePreferredSizeMode\":true,\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.bundle.js\",\"backgroundThrottling\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":3,\"y\":28}"} {"level":30,"time":"2024-04-24T16:17:06.594Z","msg":"spellcheck: user locales: [\"en-GB\",\"en\"]"} {"level":30,"time":"2024-04-24T16:17:06.594Z","msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"} {"level":30,"time":"2024-04-24T16:17:06.594Z","msg":"spellcheck: setting languages to: [\"en-GB\",\"en\"]"} {"level":40,"time":"2024-04-24T16:17:06.595Z","msg":"MainSQL: Database log code=283: recovered 580 frames from WAL file [REDACTED]/sql/db.sqlite-wal"} {"level":30,"time":"2024-04-24T16:17:06.595Z","msg":"MainSQL: updateSchema:\n Current user_version: 1010;\n Most recent db schema: 1010;\n SQLite version: 3.42.0;\n SQLCipher version: 4.5.5 community;\n (deprecated) schema_version: 409;\n"} {"level":30,"time":"2024-04-24T16:17:07.167Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2024-04-24T16:17:08.023Z","msg":"got fast spellcheck setting true"} {"level":30,"time":"2024-04-24T16:17:08.033Z","msg":"System tray service: created"} {"level":30,"time":"2024-04-24T16:17:08.034Z","msg":"System tray service: updating main window. Previously, there was not a window, and now there is"} {"level":30,"time":"2024-04-24T16:17:08.034Z","msg":"System tray service: rendering no tray"} {"level":30,"time":"2024-04-24T16:17:08.034Z","msg":"System tray service: enabling"} {"level":30,"time":"2024-04-24T16:17:08.034Z","msg":"System tray service: rendering the tray"} {"level":30,"time":"2024-04-24T16:17:08.034Z","msg":"System tray service: creating the tray"} {"level":30,"time":"2024-04-24T16:17:08.036Z","msg":"Begin ensuring permissions"} {"level":30,"time":"2024-04-24T16:17:08.038Z","msg":"main window is ready-to-show"} {"level":30,"time":"2024-04-24T16:17:08.039Z","msg":"Ensuring file permissions for 4 files"} {"level":30,"time":"2024-04-24T16:17:08.041Z","msg":"Finish ensuring permissions in 5ms"} {"level":30,"time":"2024-04-24T16:17:08.699Z","msg":"MainSQL: slow query getAllStories duration=561ms"} {"level":30,"time":"2024-04-24T16:17:08.829Z","msg":"Prevent display sleep service: allowing display sleep"} {"level":30,"time":"2024-04-24T16:17:08.829Z","msg":"Background throttling enabled because no call is active"} {"level":30,"time":"2024-04-24T16:17:09.164Z","msg":"updater/start: Updates disabled - not starting new version checks"} {"level":30,"time":"2024-04-24T16:17:09.165Z","msg":"App loaded - time: 2678"} {"level":30,"time":"2024-04-24T16:17:09.165Z","msg":"SQL init - time: 202"} {"level":30,"time":"2024-04-24T16:17:09.165Z","msg":"Preload - time: 822"} {"level":30,"time":"2024-04-24T16:17:09.165Z","msg":"WebSocket connect - time: 588"} {"level":30,"time":"2024-04-24T16:17:09.165Z","msg":"Processed count: 12"} {"level":30,"time":"2024-04-24T16:17:09.165Z","msg":"Messages per second: 9.46372239747634"} {"level":40,"time":"2024-04-24T16:17:09.212Z","msg":"crashReports: 10 pending dumps found"} {"level":30,"time":"2024-04-24T16:17:13.853Z","msg":"System tray service: rendering the tray"} Segmentation fault (core dumped)
Can you provide a stack trace? It may be hard to run electron under gdb due to its multi-process architecture, but you should be able to use `coredumpctl` or GUI tools such as DrKonqi to run gdb on a core dump file.
Here is output from `coredumpctl dump`. This is with 7.5.1-1.4, which is the second update today. I don't know how useful this is: PID: 28071 (electron) UID: 1000 (john) GID: 1000 (john) Signal: 11 (SEGV) Timestamp: Wed 2024-04-24 19:34:23 BST (9min ago) Command Line: $'/usr/lib64/electron/electron /usr/libexec/signal-desktop' Executable: /usr/lib64/electron/electron Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-org.kde.konsole-a8cf6074df084a0fb2be8f2df8254adc.scope Unit: user@1000.service User Unit: app-org.kde.konsole-a8cf6074df084a0fb2be8f2df8254adc.scope Slice: user-1000.slice Owner UID: 1000 (john) Boot ID: cd4f8ac6c8934ce084e9952b9e351601 Machine ID: 430ea3afc6a245088c00159ab33bc4f3 Hostname: hp450g4 Storage: /var/lib/systemd/coredump/core.electron.1000.cd4f8ac6c8934ce084e9952b9e351601.28071.1713983663000000.zst (present) Size on Disk: 21.9M Message: Process 28071 (electron) of user 1000 dumped core. Stack trace of thread 28071: #0 0x000055e09e6ce4f7 n/a (electron + 0xd234f7) #1 0x000055e09ecca0dd n/a (electron + 0x131f0dd) #2 0x000055e09eccc073 n/a (electron + 0x1321073) #3 0x000055e0a16ff420 n/a (electron + 0x3d54420) #4 0x000055e0a16ff93b n/a (electron + 0x3d5493b) #5 0x000055e0a16ffa21 n/a (electron + 0x3d54a21) #6 0x000055e0a1782d1d n/a (electron + 0x3dd7d1d) #7 0x00007fb664337710 n/a (libglib-2.0.so.0 + 0x5d710) #8 0x00007fb664339358 n/a (libglib-2.0.so.0 + 0x5f358) #9 0x00007fb664339a0c g_main_context_iteration (libglib-2.0.so.0 + 0x5fa0c) #10 0x000055e0a0dc9c0a n/a (electron + 0x341ec0a) #11 0x000055e0a0dbc609 n/a (electron + 0x3411609) #12 0x000055e0a0dbc9da n/a (electron + 0x34119da) #13 0x000055e09fe5b8c3 n/a (electron + 0x24b08c3) #14 0x000055e09e7a4c56 n/a (electron + 0xdf9c56) #15 0x000055e09e404bc4 n/a (electron + 0xa59bc4) #16 0x00007fb65e82a1f0 __libc_start_call_main (libc.so.6 + 0x2a1f0) #17 0x00007fb65e82a2b9 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a2b9) #18 0x000055e09e41dd25 _start (electron + 0xa72d25) Stack trace of thread 28079: #0 0x00007fb65e914486 epoll_wait (libc.so.6 + 0x114486) #1 0x000055e0a0dc2519 n/a (electron + 0x3417519) #2 0x000055e0a0dc9986 n/a (electron + 0x341e986) #3 0x000055e0a0dbc609 n/a (electron + 0x3411609) #4 0x000055e0a0dbc9da n/a (electron + 0x34119da) #5 0x000055e0a0dbd542 n/a (electron + 0x3412542) #6 0x000055e0a0d9ec04 n/a (electron + 0x33f3c04) #7 0x000055e0a0d96496 n/a (electron + 0x33eb496) #8 0x00007fb65e892bb2 start_thread (libc.so.6 + 0x92bb2) #9 0x00007fb65e91400c __clone3 (libc.so.6 + 0x11400c) Stack trace of thread 28341: #0 0x00007fb65e911bcd syscall (libc.so.6 + 0x111bcd) #1 0x00007fb664393fac g_cond_wait_until (libglib-2.0.so.0 + 0xb9fac) #2 0x00007fb664302093 n/a (libglib-2.0.so.0 + 0x28093) #3 0x00007fb6643026a1 g_async_queue_timeout_pop (libglib-2.0.so.0 + 0x286a1) #4 0x00007fb664366ca5 n/a (libglib-2.0.so.0 + 0x8cca5) #5 0x00007fb6643662ee n/a (libglib-2.0.so.0 + 0x8c2ee) #6 0x00007fb65e892bb2 start_thread (libc.so.6 + 0x92bb2) #7 0x00007fb65e91400c __clone3 (libc.so.6 + 0x11400c) Stack trace of thread 28088: #0 0x0000000000000000 n/a (n/a + 0x0) ELF object binary architecture: AMD x86-64
I just tried `coredumpctl debug`, which offered to download debuginfo from https://debuginfod.opensuse.org/ but every download failed, and visiting that URL in a browser shows the server is no longer active.
OK so I did things the old-fashioned way and installed a load of debuginfo packages. Core was generated by `/usr/lib64/electron/electron /usr/libexec/signal-desktop'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000055e09e6ce4f7 in non-virtual thunk to electron::ElectronDesktopWindowTreeHostLinux::OnWindowTiledStateChanged(ui::WindowTiledEdges) () at ../../electron/shell/browser/ui/electron_desktop_window_tree_host_linux.h:50 50 void OnWindowTiledStateChanged(ui::WindowTiledEdges new_tiled_edges) override; [Current thread is 1 (Thread 0x7fb6595e1480 (LWP 28071))] (gdb) bt #0 0x000055e09e6ce4f7 in non-virtual thunk to electron::ElectronDesktopWindowTreeHostLinux::OnWindowTiledStateChanged(ui::WindowTiledEdges) () at ../../electron/shell/browser/ui/electron_desktop_window_tree_host_linux.h:50 #1 0x000055e09ecca0dd in ui::X11Window::OnXWindowStateChanged() () at ../../ui/ozone/platform/x11/x11_window.cc:1503 #2 ui::X11Window::UpdateWindowProperties(base::internal::flat_tree<x11::Atom, std::identity, std::less<void>, std::vector<x11::Atom, std::allocator<x11::Atom> > > const&) () at ../../ui/ozone/platform/x11/x11_window.cc:2538 #3 0x000055e09eccc073 in ui::X11Window::UpdateWindowProperties(base::internal::flat_tree<x11::Atom, std::identity, std::less<void>, std::vector<x11::Atom, std::allocator<x11::Atom> > > const&) () at ../../ui/ozone/platform/x11/x11_window.cc:2525 #4 ui::X11Window::OnWMStateUpdated() () at ../../ui/ozone/platform/x11/x11_window.cc:2508 #5 ui::X11Window::HandleEvent(x11::Event const&) () at ../../ui/ozone/platform/x11/x11_window.cc:2377 #6 0x000055e0a16ff420 in x11::Connection::DispatchEvent(x11::Event const&) (this=0x72800249000, event=...) at ../../ui/gfx/x/connection.cc:541 #7 0x000055e0a16ff93b in x11::Connection::ProcessNextEvent() (this=0x72800249000) at ../../ui/gfx/x/connection.cc:640 #8 0x000055e0a16ffa21 in x11::Connection::Dispatch() (this=0x72800249000) at ../../ui/gfx/x/connection.cc:513 #9 0x000055e0a1782d1d in XSourceDispatch(_GSource*, gboolean (*)(void*), void*) (source=0x55e0a77a5ae0 <features::kWaylandWindowDecorations[abi:logically_const]>, unused_func=0x101, data=0x0) at ../../ui/events/platform/x11/x11_event_watcher_glib.cc:57 #10 0x00007fb664337710 in g_main_dispatch (context=0x3ac8002e0e40) at ../glib/gmain.c:3344 #11 g_main_context_dispatch_unlocked (context=context@entry=0x3ac8002e0e40) at ../glib/gmain.c:4152 #12 0x00007fb664339358 in g_main_context_iterate_unlocked (context=context@entry=0x3ac8002e0e40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4217 #13 0x00007fb664339a0c in g_main_context_iteration (context=0x3ac8002e0e40, may_block=1) at ../glib/gmain.c:4282 #14 0x000055e0a0dc9c0a in base::MessagePumpGlib::Run(base::MessagePump::Delegate*) (this=0x3ac8002833c0, delegate=0x55e0a77a5ae0 <features::kWaylandWindowDecorations[abi:logically_const]>) at ../../base/message_loop/message_pump_glib.cc:680 #15 0x000055e0a0dbc609 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) (this=0x3ac8002f2800, application_tasks_allowed=true, timeout=...) at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:646 #16 0x000055e0a0dbc9da in base::RunLoop::Run(base::Location const&) () at ../../base/run_loop.cc:134 #17 base::RunLoop::Run(base::Location const&) () at ../../base/run_loop.cc:106 #18 0x000055e09fe5b8c3 in content::BrowserMainLoop::RunMainMessageLoop() () at ../../content/browser/browser_main_loop.cc:1096 #19 content::BrowserMainLoop::RunMainMessageLoop() () at ../../content/browser/browser_main_loop.cc:1075 #20 content::BrowserMainRunnerImpl::Run() (this=0x72800014300) at ../../content/browser/browser_main_runner_impl.cc:158 --Type <RET> for more, q to quit, c to continue without paging--c #21 0x000055e09e7a4c56 in content::BrowserMain(content::MainFunctionParams) () at ../../content/browser/browser_main.cc:34 #22 content::RunBrowserProcessMain(content::MainFunctionParams, content::ContentMainDelegate*) () at ../../content/app/content_main_runner_impl.cc:712 #23 content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams, bool) () at ../../content/app/content_main_runner_impl.cc:1299 #24 content::ContentMainRunnerImpl::Run() (this=0x72800014300) at ../../content/app/content_main_runner_impl.cc:1144 #25 0x000055e09e404bc4 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) () at ../../content/app/content_main.cc:334 #26 content::ContentMain(content::ContentMainParams) () at ../../content/app/content_main.cc:347 #27 main(int, char**) (argc=3072928, argv=0x7ffeb5e89470) at ../../electron/shell/app/electron_main_linux.cc:45
I recognize that stack trace. Had it happen intermittently, IIRC after changing monitor settings. Signal can be restarted afterwards and is otherwise usable for me. Does it crash every time for you? Also, what desktop environment are you using?
It's crashing every time for me. I'm using KDE Plasma. I'm on a laptop with no external monitor, so I don't think I've changed any monitor settings recently.
X11 or Wayland? I'm using Plasma on X11 myself and as i said, the crash does not happen every time for me.
X11. Here's what KDE System Settings, About this system says: Operating System: openSUSE Tumbleweed 20240423 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0 Kernel Version: 6.8.7-1-default (64-bit) Graphics Platform: X11 Processors: 4 × Intel® Core™ i5-7200U CPU @ 2.50GHz Memory: 15.5 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 620 Manufacturer: HP Product Name: HP ProBook 450 G4 However, I just tried Signal in Wayland and it didn't crash! I tried again in X11 after that (in the hope that maybe something will have fixed it), but unfortunately it's still crashing :( I can't really use Wayland because of other bugs.
I've reported the crash upstream meanwhile: https://github.com/electron/electron/issues/41967
Can you try installing this build of Electron: https://download.opensuse.org/repositories/home:/dziobian:/gulgul-ultron:/19/openSUSE_Tumbleweed/x86_64/nodejs-electron-29.3.1-344.1.x86_64.rpm https://download.opensuse.org/repositories/home:/dziobian:/gulgul-ultron:/19/openSUSE_Tumbleweed/x86_64/nodejs-electron-debuginfo-29.3.1-344.1.x86_64.rpm and tell me whether Signal still crashes immediately (and with what stack trace)
That version does not crash.
I have just upgraded to Signal 7.6.0-1.1 and that is working (non-crashing) with the normal openSUSE 29.3.1-1.1 nodejs-electron package.
Just got that crash again with signal 5.6.0 and factory electron (with custom malloc), so it's not fixed/not a Signal bug.
Huh, yes, it's back to crashing every time I start it today, with factory electron (I'm not sure why it wasn't yesterday - maybe I hadn't rebooted after reverting to the factory version of electron and it was still using your -344 version somehow).
Upstream has identified the root cause of this crash and provided a proper fix: https://github.com/electron/electron/commit/e9eda8f8456c98e3c3a438bfd2ff41d90f59a8ec I have backported this patch and re-enabled custom allocator. Please check this build of Electron whether it crashes (it should not): https://download.opensuse.org/repositories/home:/dziobian:/gulgul-ultron:/19/openSUSE_Tumbleweed/x86_64/nodejs-electron-29.4.2-407.2.x86_64.rpm
(In reply to Bruno Pitrus from comment #15) > Please check this build of Electron whether it crashes (it should not): > https://download.opensuse.org/repositories/home:/dziobian:/gulgul-ultron:/19/ > openSUSE_Tumbleweed/x86_64/nodejs-electron-29.4.2-407.2.x86_64.rpm Thanks Bruno, Signal does not crash for me with that build of Electron.
This is an autogenerated message for OBS integration: This bug (1223366) was mentioned in https://build.opensuse.org/request/show/1180393 Factory / nodejs-electron
submitting now a fixed build to factory https://build.opensuse.org/request/show/1180753