Skip to content

Crash in commandhelper.js #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cwit-vcas opened this issue Feb 17, 2025 · 7 comments
Open

Crash in commandhelper.js #176

cwit-vcas opened this issue Feb 17, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@cwit-vcas
Copy link

Description

The extension often crashes resulting in a complete gnome crash
I have noticed this happens when using matplotlib or virtualbox.

Steps to Reproduce

Just use virtual box with a windows guest, will crash after a short while.

Screenshots

I have this stack trace.

Feb 17 10:03:54 witting gnome-shell[58959]: **
Feb 17 10:03:54 witting gnome-shell[58959]: GLib:ERROR:../../../glib/gspawn.c:1724:do_posix_spawn: assertion failed: (read_null != -1)
Feb 17 10:03:54 witting gnome-shell[58959]: Bail out! GLib:ERROR:../../../glib/gspawn.c:1724:do_posix_spawn: assertion failed: (read_null != -1)
Feb 17 10:03:54 witting gnome-shell[58959]: GNOME Shell crashed with signal 6
Feb 17 10:03:54 witting gnome-shell[58959]: == Stack trace for context 0x5e9691d402a0 ==
Feb 17 10:03:54 witting gnome-shell[58959]: #0   7ffd63da3d90 b   file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:17 (2c9c2b4a60 @ 525)
Feb 17 10:03:54 witting gnome-shell[58959]: #1   7ffd63da44a0 b   file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:5 (2c9c2b4a10 @ 33)
Feb 17 10:03:54 witting gnome-shell[58959]: #2   7ffd63da4580 b   file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/utils.js:1204 (2c9c2b0ec0 @ 152)
Feb 17 10:03:54 witting gnome-shell[58959]: #3   7ffd63da4680 b   file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:335 (2c9c2f3330 @ 70)
Feb 17 10:03:54 witting gnome-shell[58959]: #4   7ffd63da4730 b   file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:331 (2c9c2f32e0 @ 57)
Feb 17 10:03:54 witting gnome-shell[58959]: #5   7ffd63da47d0 b   file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/cancellableTaskManager.js:50 (2c9c2d0920 @ 24)
Feb 17 10:03:54 witting gnome-shell[58959]: #6   5e9691e022d8 i   resource:///org/gnome/shell/ui/init.js:21 (3b082b170bf0 @ 48)

Environment

  • Astra Monitor Version: 30 (EGOv47)
  • GNOME Version: GNOME Shell 46.0
  • Operating System and Version: Ubuntu 24.04
  • Other Relevant System Information:

Logs

Additional Context

@cwit-vcas cwit-vcas added the bug Something isn't working label Feb 17, 2025
@lhall-amphibee
Copy link

Hi,

I'm having a very similar problem since today, but my logs differs slightly. Maybe it can help tackle the problem :

2025-02-17T10:55:58.989547+01:00 REDACTED-2024-01 gnome-shell[40330]: Error: Failed to initialize subprocess: Trop de fichiers ouverts#012runCommand/<@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:24:28#012runCommand@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:5:16#012listDisksAsync@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/utils.js:1204:48#012updateStorageUsageProc@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:335:35#012updateStorageUsageAuto@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:331:21#012makeCancellable/promise</timeoutId<@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/cancellableTaskManager.js:50:17#012@resource:///org/gnome/shell/ui/init.js:21:20#012   Astra Monitor ERROR: Error getting disk list
2025-02-17T10:56:10.991433+01:00 REDACTED-2024-01 gnome-shell[40330]: message repeated 3 times: [ Error: Failed to initialize subprocess: Trop de fichiers ouverts#012runCommand/<@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:24:28#012runCommand@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:5:16#012listDisksAsync@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/utils.js:1204:48#012updateStorageUsageProc@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:335:35#012updateStorageUsageAuto@file:///home/REDACTED/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:331:21#012makeCancellable/promise</timeoutId<@file:///home/REDACTED/]

Trop de fichiers ouverts = Too many open files

@beerendlauwers
Copy link

Encountering same problem as original poster. Same stack trace.

@ljuzig ljuzig closed this as completed in 6f97eb2 Feb 17, 2025
@ljuzig
Copy link
Collaborator

ljuzig commented Feb 17, 2025

I issued a new release fixing this crash. Sadly as mentioned in the previous release GLib freezes the UI while spawning a command. The only way I found to use posix_spawn apparently introduces crashes. I will find another solution. Thank you for submitting your report.

@ljuzig
Copy link
Collaborator

ljuzig commented Feb 21, 2025

@cwit-vcas @lhall-amphibee @beerendlauwers
I issued a new release trying to resolve this issue but this time the new subprocess procedure is an experimental feature that needs manual activation. I tested it extensively and didn't have any crash or bug, can you please try as soon as the new release come out to enable the flag and check if you encounter any crash? Thank you.

Image

@cwit-vcas
Copy link
Author

cwit-vcas commented Mar 6, 2025

I am still getting crashes with "Too many open files errors"

Mar 06 14:20:36 gnome-shell[8412]: Error: Failed to initialize subprocess: Too many open files
                                           runCommand/<@file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:23:28
                                           runCommand@file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/commandHelper.js:5:16
                                           runAsyncCommand@file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/utils.js:1545:30
                                           listDisksAsync@file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/utils.js:1205:40
                                           updateStorageUsageProc@file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:334:35
                                           updateStorageUsageAuto@file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/storage/storageMonitor.js:330:21
                                           makeCancellable/promise</timeoutId<@file:///home/cwit/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/cancellableTaskManager.js:50:17
                                           @resource:///org/gnome/shell/ui/init.js:21:20
                                              Astra Monitor ERROR: Error getting disk list

I get logs like this in journalctl for a long time and then eventually something crash.
I do have the "PosixSpawn" flag enabled, but also saw the same behavior before it was enabled.

@ljuzig
Copy link
Collaborator

ljuzig commented Mar 11, 2025

I'm actually working on an issue that might be related to this one.

@ljuzig ljuzig reopened this Mar 11, 2025
@icyrockcom
Copy link

Just to chime in here, I still see the issue with version 34 (EGOv51). I'm on NixOS if that matters.

Sampling the lsof output for gnome-shell pid shows that it creates a FIFO pipe every second, eventually breaching the 1024 limit. Disabling the extension immediately drops the file count and it stays constant afterwards. Enabling the extension immediately shows the increasing trend.

Also, not sure if I'm doing something wrong, but the PosixSpawn Subprocess is reset to disabled any time I disable / enable Astra Monitor extension itself.

Let me know if there's something I can do to help with troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants