Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.

Application Crash due to Low File Descriptor Limit (nofile) & Critical NVIDIA/Wayland Synchronization Workaround #442

@switchboy

Description

@switchboy

Bug Report: Application Crash due to Low File Descriptor Limit (nofile) & Critical NVIDIA/Wayland Synchronization Workaround

1. Issue Summary

CRITICALLY, on NVIDIA/Wayland systems, the application failed to launch or crashed immediately unless launched with a specific synchronization environment variable. This is the mandatory stability fix.

after this

wasistlos consistently crashed scrolling chat histories

The primary cause of the crash during use was the WebKitGTK engine rapidly exhausting the Linux file descriptor soft limit (ulimit -n), resulting in the error: GLib-ERROR: Creating pipes for GWakeup: Too many open files.


2. Environment Details

Component Value/Version Notes
Operating System Arch Linux
Windowing System Wayland
GPU NVIDIA (proprietary drivers, e.g., 580.95.05)
Web Engine WebKitGTK

3. Observed Behavior

A. Failure to Launch (NVIDIA/Wayland Specific)

On NVIDIA/Wayland systems, the application fails to launch or crashes immediately without the following synchronization fix:

Mandatory Launch Command: __NV_DISABLE_EXPLICIT_SYNC=1 wasistlos

  • Launch Requirement Confirmed: The __NV_DISABLE_EXPLICIT_SYNC=1 flag is mandatory for the application to initialize and run successfully, resolving a critical conflict between WebKitGTK, the NVIDIA driver, and Wayland's explicit synchronization protocol.

  • VA-API Optional: The LIBVA_DRIVER_NAME="nvidia" flag is not required for launch stability, but is highly recommended for enabling hardware video decoding performance.

B. Crash During Use (File Descriptor Limit)

Even with the mandatory launch flag applied, the application crashed during normal use when the file descriptor soft limit was low. The crash logs confirmed resource starvation:

  • GLib-ERROR **: ... Creating pipes for GWakeup: Too many open files
  • Failed to create shared memory: Too many open files
  • Failed to load plugin '/usr/lib/gstreamer-1.0/libgstlibav.so': ... cannot open shared object file: Too many open files

4. Resolution / Required Workarounds

The application only became stable after applying the following two fixes:

A. File Descriptor Limit Increase

The soft limit had to be increased from the default 1024/8192 to 32,768 to prevent the crash:

  1. Systemd Override: Configuration was set via /etc/systemd/user.conf.d/99-nofile.conf:

    [Manager]
    DefaultLimitNOFILE=32768:65536
    
  2. Conflict Removal: Restrictive soft/hard limit entries in /etc/security/limits.conf (which were capping the limit at 8192) had to be removed, as they overrode the systemd settings.

B. Mandatory Launch Command (Essential for NVIDIA/Wayland)

The application must be launched using this specific command to ensure stability:

Mandatory Launch Command: __NV_DISABLE_EXPLICIT_SYNC=1 wasistlos

Recommended Launch Command (for best video performance): __NV_DISABLE_EXPLICIT_SYNC=1 LIBVA_DRIVER_NAME="nvidia" wasistlos


5. Suggestions for Developers

  1. Default Launch Handling: Implement a detection mechanism in the application's launch script to automatically apply the mandatory __NV_DISABLE_EXPLICIT_SYNC=1 flag (and the optional LIBVA_DRIVER_NAME="nvidia") when an NVIDIA GPU and Wayland are detected. The application is unusable on these systems without this.
  2. Resource Documentation: Document the critical minimum required ulimit -n (likely > 8192) for stable operation on Linux, as the default system limits are insufficient for WebKitGTK's resource demands.
  3. Investigate Synchronization: Analyze why WebKitGTK requires disabling explicit sync to run stably on NVIDIA/Wayland.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions