FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.5k stars 837 forks source link

[Bug]: FreeTube often crashes on first start (OOM, other Electron apps too) #5578

Closed Neyl-123 closed 1 month ago

Neyl-123 commented 2 months ago

Guidelines

Describe the bug

As the Title states, FreeTube often crashes right away on the first start. The out of memory part (see logs below) also occurs with Discord and Signal (both Flatpaks). Which seems to be caused by the V8 Engine going out of memory during initialization (it happens when there is 4GB of RAM available). The 'Failed to connect to the bus' is exclusive to FreeTube.

Expected Behavior

It should not crash

Issue Labels

causes crash

FreeTube Version

v0.21.3 Beta

Operating System Version

Fedora 40 Workstation

Installation Method

Flathub

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

The different logs from GNOME ABRT (in no particular order):

Crash 1

User Logs:
--Aug 16 19:01:13 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[23113]: [2:0816/190113.402983:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 16 19:01:13 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[23113]: #
Aug 16 19:01:13 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[23113]: # Fatal process out of memory: Failed to reserve virtual memory for CodeRange
Aug 16 19:01:13 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[23113]: #
Aug 16 19:01:13 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[23113]: ----- Native stack trace -----
--

Crash 2

User Logs:
--Aug 12 12:59:19 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3928]: [2:0812/125919.775293:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 12 12:59:19 ideapad-5-fedora freetube[3928]: Failed to load module "canberra-gtk-module"
Aug 12 12:59:19 ideapad-5-fedora freetube[3928]: Failed to load module "pk-gtk-module"
Aug 12 12:59:19 ideapad-5-fedora freetube[3928]: Failed to load module "canberra-gtk-module"
Aug 12 12:59:19 ideapad-5-fedora freetube[3928]: Failed to load module "pk-gtk-module"
Aug 12 12:59:19 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3928]: [2:0812/125919.959874:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 12 12:59:19 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3928]: [2:0812/125919.959914:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 12 12:59:20 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[4044]: [100:0812/125920.221537:ERROR:v8_initializer.cc(808)] V8 process OOM (Failed to reserve virtual memory for CodeRange).
--

Crash 3

User Logs:
--Aug 05 02:58:24 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[38688]: [44:0805/025824.370133:ERROR:vaapi_video_decoder.cc(1212)] failed Initialize()ing the frame pool
Aug 05 03:00:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[43510]: [338:0805/030052.288719:ERROR:v8_initializer.cc(808)] V8 process OOM (Failed to reserve virtual memory for CodeRange).
--

Crash 4

User Logs:
--Aug 01 13:34:40 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: [2:0801/133440.548270:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 01 13:34:40 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3711]: LaunchProcess: failed to execvp:
Aug 01 13:34:40 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3711]: xdg-settings
Aug 01 13:34:40 ideapad-5-fedora freetube[3610]: Failed to load module "canberra-gtk-module"
Aug 01 13:34:40 ideapad-5-fedora freetube[3610]: Failed to load module "pk-gtk-module"
Aug 01 13:34:40 ideapad-5-fedora freetube[3610]: Failed to load module "canberra-gtk-module"
Aug 01 13:34:40 ideapad-5-fedora freetube[3610]: Failed to load module "pk-gtk-module"
Aug 01 13:34:40 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: [2:0801/133440.875339:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 01 13:34:40 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: [2:0801/133440.875407:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: Error: ENOENT: no such file or directory, open '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async open (node:internal/fs/promises:636:25)
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async Object.readFile (node:internal/fs/promises:1246:14)
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async /app/freetube/resources/app.asar/dist/main.js:2:102159
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async WebContents.<anonymous> (node:electron/js2c/browser_init:2:82855) {
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   errno: -2,
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   code: 'ENOENT',
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   syscall: 'open',
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   path: '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:34:52 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: }
Aug 01 13:34:55 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3726]: [45:0801/133455.659369:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
Aug 01 13:35:02 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3726]: [45:0801/133502.996491:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
Aug 01 13:35:05 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3726]: [45:0801/133505.989951:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: Error: ENOENT: no such file or directory, open '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async open (node:internal/fs/promises:636:25)
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async Object.readFile (node:internal/fs/promises:1246:14)
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async /app/freetube/resources/app.asar/dist/main.js:2:102159
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async WebContents.<anonymous> (node:electron/js2c/browser_init:2:82855) {
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   errno: -2,
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   code: 'ENOENT',
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   syscall: 'open',
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   path: '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:35:14 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: }
Aug 01 13:35:25 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: [2:0801/133525.258570:ERROR:atom_cache.cc(229)] Add chromium/from-privileged to kAtomsToCache
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: Error: ENOENT: no such file or directory, open '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async open (node:internal/fs/promises:636:25)
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async Object.readFile (node:internal/fs/promises:1246:14)
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async /app/freetube/resources/app.asar/dist/main.js:2:102159
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async WebContents.<anonymous> (node:electron/js2c/browser_init:2:82855) {
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   errno: -2,
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   code: 'ENOENT',
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   syscall: 'open',
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   path: '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:35:26 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: }
Aug 01 13:36:16 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5063]: [2:0801/133616.954567:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5104]: LaunchProcess: failed to execvp:
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5104]: xdg-settings
Aug 01 13:36:17 ideapad-5-fedora freetube[5063]: Failed to load module "canberra-gtk-module"
Aug 01 13:36:17 ideapad-5-fedora freetube[5063]: Failed to load module "pk-gtk-module"
Aug 01 13:36:17 ideapad-5-fedora freetube[5063]: Failed to load module "canberra-gtk-module"
Aug 01 13:36:17 ideapad-5-fedora freetube[5063]: Failed to load module "pk-gtk-module"
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5063]: [2:0801/133617.129193:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5063]: [2:0801/133617.129236:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: Error: ENOENT: no such file or directory, open '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async open (node:internal/fs/promises:636:25)
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async Object.readFile (node:internal/fs/promises:1246:14)
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async /app/freetube/resources/app.asar/dist/main.js:2:102159
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:     at async WebContents.<anonymous> (node:electron/js2c/browser_init:2:82855) {
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   errno: -2,
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   code: 'ENOENT',
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   syscall: 'open',
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]:   path: '/<path-to-home-folder>/.var/app/io.freetubeapp.FreeTube/config/FreeTube/player_cache/20dfca59'
Aug 01 13:36:17 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[3610]: }
Aug 01 13:37:21 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5435]: [2:0801/133721.482054:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Aug 01 13:37:21 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5435]: #
Aug 01 13:37:21 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5435]: # Fatal process out of memory: Failed to reserve virtual memory for CodeRange
Aug 01 13:37:21 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5435]: #
Aug 01 13:37:21 ideapad-5-fedora io.freetubeapp.FreeTube.desktop[5435]: ----- Native stack trace -----
--

Nightly Build

absidue commented 2 months ago

The 'Failed to connect to the bus' is exclusive to FreeTube.

As the logs around that seem to be things about not being able to access the system theme, it's probably not related to the crash itself.

As for the crash itself that is definitely concerning, however as it seems to be happening with other flatpak apps that also use Electron, it's probably a problem with flatpak or Electron. So unlikely to be something that the FreeTube devs can fix, but I'll do some research, to see if there are any other people with the same problem and whether the flatpak and/or Electron devs are aware of the problem.

Neyl-123 commented 2 months ago

It actually not only happens on the first start, also sometimes when opening a new window

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 month ago

@bbhtt do you maybe have some more insight in this?

bbhtt commented 1 month ago

Probably an issue in Chromium https://issues.chromium.org/issues/350117526 related to SELinux so Fedora is affected. You should ask Electron developers to see if a fixed Electron version exists or backport any patches.

absidue commented 1 month ago

From giving the linked thread and the links inside that thread a quick read through, it seems to be a Fedora issue and they seem to be reverting one of their changes which caused the problem:

It sounds like there is not much we can do from our side other than wait for either Fedora to undo their change and release it or for Chromium or v8 to come up with a workaround.

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 month ago

Closing as mentioned above we cant do anything about this