Skip to content
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

[xxx preload-host-spawn-strategy] Warning: waitpid override ignores groups in the integrated terminal after first start. #370

Closed
jorchube opened this issue Dec 29, 2022 · 93 comments · Fixed by #487

Comments

@jorchube
Copy link

jorchube commented Dec 29, 2022

Hi,

The Integrated Terminal is showing these [xxx preload-host-spawn-strategy] Warning: waitpid override ignores groups warning messages for each and every command executed.

This happens in a fresh (no configuration, sync, extensions installed or defaults modification of any sort) application, except for the first start ever, after which it happens always.

Attached there is a screencast showing a first start of the application in which the issue does not happen. After closing and reopening again, the warning messages start appearing.

Screencast.from.2022-12-29.12-52-28.webm

This happens both in the default sh terminal profiles as well as in the bash ones.
These warning messages start flooding the terminal output as they also appear for any subshell spawned as part of an executed command and if the prompt executes anything, so even just pressing enter can lead to a unbearable flood of warning messages as the prompt gets resolved.

Tracking down previous commits, commit e03d4ed40326424ecd9f55e3e69afa9e6292a149c718d5da2ee35e7c5fafe38c is the first one exhibiting this issue, and downgrading to the previous one a3c1c20103d56d180dd30c5bdf25763520dbe0987e2ebadd96922ed109d66626 mitigates it.

    Commit: e03d4ed40326424ecd9f55e3e69afa9e6292a149c718d5da2ee35e7c5fafe38c
   Subject: Update 2 modules (4de6104a)
      Date: 2022-12-08 09:39:48 +0000

    Commit: a3c1c20103d56d180dd30c5bdf25763520dbe0987e2ebadd96922ed109d66626
   Subject: Update 2 modules (35102f6c)
      Date: 2022-11-09 20:14:02 +0000

On Fedora Silverblue 37, Wayland, GNOME.

I was not able to reproduce this on a non-flatpak installation.

Please let me know if there is any other information that I can provide.

@susantpatel
Copy link

Same thing happening for me after a fresh installation of linux mint. I have installed VS code form software Manager

@susantpatel
Copy link

I installed it form official vs code website and the issue is gone

@IkenoMike
Copy link

IkenoMike commented Jan 10, 2023

Same issue is happening to me. I will hold out for a bit hoping that it will be fixed. If not, I will download from official vs code website.

@safejace
Copy link

+1 happening with the flatpak

@caneserr
Copy link

+1 flatpak

1 similar comment
@Toso42
Copy link

Toso42 commented Feb 14, 2023

+1 flatpak

@fadykuzman
Copy link

fadykuzman commented Apr 22, 2023

+1 IntellJ Idea with flatpak on NixOs 22.11

@an0pheles
Copy link

+1 IntelliJ Community with flatpak on Mint Linux

@pliuchkin
Copy link

+1 Intellij Community with flatpak on OpenSUSE Tumbleweed.

@Cpyte-Engine-Developer
Copy link

+1 flatpak, PyCharm

@iihmsunn
Copy link

iihmsunn commented May 8, 2023

a workaround for vscode that seems to be working for me is to add these to settings.json

"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
    "bash": {
        "path": "/usr/bin/flatpak-spawn",
        "args": [
            "--env=TERM=xterm-256color",
            "bash",
            //next two lines are only required if you use external sdks, edit to use yours
            "-c",
            "export PATH=$PATH:/usr/lib/sdk/dotnet7/bin:/usr/lib/sdk/node18/bin; bash"
        ]
    }
}

@opravil-jan
Copy link

+1 flatpak

@bruno-henr
Copy link

really occurred in vscode flatpak, i just download official version and solved

@bruno-henr
Copy link

Debian and Ubuntu based distributions
The easiest way to install Visual Studio Code for Debian/Ubuntu based distributions is to download and install the .deb package (64-bit), either through the graphical software center if it's available, or through the command line with:

sudo apt install ./.deb

@jcleng
Copy link

jcleng commented May 16, 2023

+1 IntellJ Idea with flatpak on NixOs 22.11

the same

@youpie
Copy link

youpie commented May 25, 2023

+1 flatpak on fedora 38

@DKraeff
Copy link

DKraeff commented May 25, 2023

+1 on Mint

I downloaded it from the Software Manager and it worked just fine but, at one point, it started giving me the same warning.

@abhigit23
Copy link

abhigit23 commented May 25, 2023

Edited: Uncheck this setting solved the issue for me!!!
image

@bantryblues
Copy link

bantryblues commented May 26, 2023

Edited -- reinstalled and it no longer happens
Previously it happened to me too on fedora silverblue 38 with flatpak vscode and using toolbox container

I removed the vscode flatpak and everything else installed for it for using it with toolbox. Then I used the popular script for running vscode in a container -- and it works fine now. So, something wrong when setting it up myself. I couldn't find a good description of how to do it anywhere. Here's where the script is:
https://github.com/owtaylor/toolbox-vscode

@ranisalt
Copy link

Edited: Uncheck this setting solved the issue for me!!! image

This is the answer. The flatpak should see if it's possible to override this setting, as it comes enabled by default. Principle of most astonishment, I guess...

@joelaspe
Copy link

+1 for unchecking the Use Sandbox option. (came default on for me with a flatpak installation)

@AlexanderTonn
Copy link

AlexanderTonn commented Jun 1, 2023

+1 Linux Mint 21.1 Vera, but the issue is gone after the tip with the "deactivating Use Sandbox" Workaround (see above)

@Calastrophe
Copy link

Edited: Uncheck this setting solved the issue for me!!! image

This fixed the issue for me. Pop OS 22.04 LTS.

@dimib-tech
Copy link

Edited: Uncheck this setting solved the issue for me!!! image

Vanilla OS 22.10 - This fixes the issue!

@ttoommxx
Copy link

The option was removed and the problem is back. Any solution?

@fabianmuehlberger
Copy link

+1

@adlermo
Copy link

adlermo commented Jun 15, 2023

In Help -> About

Visual Studio Code

Version: 1.79.0
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:28:44.251Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.10.0-23-amd64

The option Use Sandbox mentioned above is no longer available

@tfrum
Copy link

tfrum commented Jun 15, 2023

The option Use Sandbox mentioned above is no longer available

Confirming this is an issue for me, as well:

Version: 1.79.1
Release: 23164
Commit: 5d4b595142dd2d0a0001531e9c48b36fc795cef2
Date: 2023-06-13T18:23:51.444Z
Electron: 22.3.10
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 6.3.5-200.fc38.x86_64

@Aqua1ung
Copy link

The option Use Sandbox mentioned above is no longer available

Ditto.

Version: 1.79.0
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:28:44.251Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 6.3.8-1321.native

@islamux
Copy link

islamux commented Aug 16, 2023

I think I found a simpler workaround for Flatpak users.
The issue seems to be the LD_PRELOAD environmental variable based on a fix that was recently committed to the affected component. Since VS Code has a setting for changing environmental variables for the integrated terminals, I just needed to add the following entry to my settings.json file to unset that variable and stop the errors.

    "terminal.integrated.env.linux": {
        "LD_PRELOAD": null,
    },

No other environmental variables beyond the one entered in the setting appear to be affected, so things like $PATH or SDK-specific environmental variables should remain unchanged.

This worked for me as well.
Pop_OS 22.04 LTS, Regolith Desktop
I use VSCodium and not VSCode, still worked!

    "terminal.integrated.env.linux": {
        "LD_PRELOAD": null,
    }

Fedora 38 Flatpak

Thanks ^_^ Works for me like a charm !

I reinstaledl it based on recommendation in its site , to avoid the problem in flatpak.

@ja-romar
Copy link

ja-romar commented Sep 1, 2023

I installed it form official vs code website and the issue is gone

I do it and it works.
Thank you so much man

@PythonCoderUnicorn
Copy link

I tried all of the suggestions. I uninstalled, reinstalled from flatpak and Pop! Shop. I tried changing the README settings but did not work. when i tried to paste the snippet i could not save the file.

I just uninstalled it, as no one shared where to locate this file other than the initial app load that shows README. I just wanted a code editor to work.

@binuvijayan893
Copy link

Install from officel

@GregLawson
Copy link

GregLawson commented Sep 15, 2023

I tried all of the suggestions. I uninstalled, reinstalled from flatpak and Pop! Shop. I tried changing the README settings but did not work. when i tried to paste the snippet i could not save the file.

I just uninstalled it, as no one shared where to locate this file other than the initial app load that shows README. I just wanted a code editor to work.

For those unfamiliar with editing VSCode settings.json files (I, too, was a little fuzzy while reading these comments):

  1. In VsCode or VsCodium pick the File menu > Preferences > Settings (or control-, as a shortcut)
    you should be presented with a Search settings bar,
  2. paste into the search "terminal.integrated.env.linux" without the double quotes,
  3. click on the "Edit in settings.json",
  4. paste ""LD_PRELOAD": null," (again without the quotes) into the bracketed JSON expression,
  5. Review the JSON for cut /paste errors. You should see:

"terminal.integrated.env.linux": {
"LD_PRELOAD": null,
}

  1. Save the settings.json file,
  2. Restart your VsCode terminal for the new settings.json to take effect.

@vaibzzz123
Copy link

vaibzzz123 commented Sep 16, 2023

Did anyone get this working on Fedora 38 w/flatpak install? Still having the issues after doing the LD_PRELOAD override in the settings.json file

@GregLawson
Copy link

GregLawson commented Sep 16, 2023

I got this working on Fedora 38 Kinoite with both the VsCode and VsCodium flatpaks.
my settings.json file is:

{
"terminal.integrated.commandsToSkipShell": [
"language-julia.interrupt"
],
"julia.symbolCacheDownload": true,
"julia.executablePath": "/var/home/greg/.juliaup/bin/julia",
"julia.enableTelemetry": true,
"terminal.integrated.env.linux": {
"LD_PRELOAD": null,
},
"files.autoSave": "onFocusChange"
}

My VsCodium version is:

Version: 1.81.1
Release: 23222
Commit: aef377c42cea6e9aea642829953104f07097abfa
Date: 2023-08-10T18:29:01.714Z
Electron: 22.3.18
ElectronBuildId: undefined
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 6.4.13-200.fc38.x86_64

@bensalo
Copy link

bensalo commented Sep 20, 2023

+1 flatpak vscode on fedora 38 workstation

@eclipseo
Copy link

I don't have the issue, do you guys have

	// Object with environment variables that will be added to the VS Code process to be used by the terminal on Linux. Set to `null` to delete the environment variable.
	"terminal.integrated.env.linux": {},

in your defaultsettings.json?

@Krauzer94
Copy link

Edited: Uncheck this setting solved the issue for me!!! image

This is the answer. The flatpak should see if it's possible to override this setting, as it comes enabled by default. Principle of most astonishment, I guess...

I can't find this setting on my Flatpak VS Code

@rtweaf
Copy link

rtweaf commented Oct 6, 2023

Same issue on PopOS - flatpak.

@ehmad11
Copy link

ehmad11 commented Oct 7, 2023

I tried all of the suggestions. I uninstalled, reinstalled from flatpak and Pop! Shop. I tried changing the README settings but did not work. when i tried to paste the snippet i could not save the file.

I just uninstalled it, as no one shared where to locate this file other than the initial app load that shows README. I just wanted a code editor to work.

For those unfamiliar with editing VSCode settings.json files (I, too, was a little fuzzy while reading these comments):

  1. In VsCode or VsCodium pick the File menu > Preferences > Settings (or control-, as a shortcut)
    you should be presented with a Search settings bar,
  2. paste into the search "terminal.integrated.env.linux" without the double quotes,
  3. click on the "Edit in settings.json",
  4. paste ""LD_PRELOAD": null," (again without the quotes) into the bracketed JSON expression,
  5. Review the JSON for cut /paste errors. You should see:

"terminal.integrated.env.linux": {
"LD_PRELOAD": null,
}

  1. Save the settings.json file,
  2. Restart your VsCode terminal for the new settings.json to take effect.

Thank you @brianpgordon and @GregLawson, it worked for me on Fedora 38.

@SeLub
Copy link

SeLub commented Oct 24, 2023

Same issue on PopOS - flatpak. Solved by adding to the settings.json:

"terminal.integrated.env.linux": {
"LD_PRELOAD": null,
},

@brieucdlf
Copy link

Thanks @iihmsunn for the tips :) Same issue on PopOS.

@vendkura
Copy link

vendkura commented Nov 12, 2023

I installed it form official vs code website and the issue is gone

It works for me too (I am on Debian 12)

@isikhi
Copy link

isikhi commented Nov 16, 2023

Same issue LD_PRELOAD worked for me.

    "terminal.integrated.env.linux": {
        "LD_PRELOAD": null,
    }

@islammohayminul
Copy link

After installing from the official site, it works for me on Fedora.

@shubhxg
Copy link

shubhxg commented Dec 5, 2023

Screenshot from 2023-12-06 00-36-03
Happened with me as well so I uninstalled it using flatpak uninstall com.visualstudio.code

and installed debian package from official website and now it works fine.

@iamWing
Copy link

iamWing commented Dec 16, 2023

Same issue LD_PRELOAD worked for me.

    "terminal.integrated.env.linux": {
        "LD_PRELOAD": null,
    }

This fixed the issue for me on Steam Deck using the flatpak version. Thanks.

@gitsoft
Copy link

gitsoft commented Jan 2, 2024

Solution on POP OS 22.04

vscode_info

  1. Open Pop!_Shop
  2. Find Visual Studio Code
  3. Uninstall
  4. Go to https://code.visualstudio.com/download
  5. Download latest .deb package for your CPU architecture
  6. cd to folder where you keep downloaded files
  7. sudo dpkg -i code_1.85.1-1702462158_amd64.deb

please note: the filename will most likely be different for you.

@kalwhyte
Copy link

kalwhyte commented Jan 7, 2024

I installed it form official vs code website and the issue is gone

This was a simple and direct fix

Thank You

@AndreiSva
Copy link

AndreiSva commented Jan 8, 2024

installing it from the vscode website is not a real fix. Is it possible to fix this in the flatpak by default?

@AndreiSva
Copy link

I think I found a simpler workaround for Flatpak users.

The issue seems to be the LD_PRELOAD environmental variable based on a fix that was recently committed to the affected component. Since VS Code has a setting for changing environmental variables for the integrated terminals, I just needed to add the following entry to my settings.json file to unset that variable and stop the errors.

    "terminal.integrated.env.linux": {
        "LD_PRELOAD": null,
    },

No other environmental variables beyond the one entered in the setting appear to be affected, so things like $PATH or SDK-specific environmental variables should remain unchanged.

would it be possible to build this fix into the flatpak?

@Mateusinbessa
Copy link

I think I found a simpler workaround for Flatpak users.

The issue seems to be the LD_PRELOAD environmental variable based on a fix that was recently committed to the affected component. Since VS Code has a setting for changing environmental variables for the integrated terminals, I just needed to add the following entry to my settings.json file to unset that variable and stop the errors.

    "terminal.integrated.env.linux": {
        "LD_PRELOAD": null,
    },

No other environmental variables beyond the one entered in the setting appear to be affected, so things like $PATH or SDK-specific environmental variables should remain unchanged.

Ubuntu 22.04
Thx! It worked for me!

@christopolise
Copy link

a workaround for vscode that seems to be working for me is to add these to settings.json

"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
    "bash": {
        "path": "/usr/bin/flatpak-spawn",
        "args": [
            "--env=TERM=xterm-256color",
            "bash",
            //next two lines are only required if you use external sdks, edit to use yours
            "-c",
            "export PATH=$PATH:/usr/lib/sdk/dotnet7/bin:/usr/lib/sdk/node18/bin; bash"
        ]
    }
}

I was having an issue just dropping in zsh as a replacement and found out that I needed to add the --host option to the args list to make it work. Hopes this saves someone some time:

"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": {
        "zsh": {
            "path": "/usr/bin/flatpak-spawn",
            "args": [
                "--host",
                "--env=TERM=xterm-256color",
                "zsh",
                //next two lines are only required if you use external sdks, edit to use yours
                // "-c",
                // "export PATH=$PATH:/usr/lib/sdk/dotnet7/bin:/usr/lib/sdk/node18/bin; bash"
            ]
        }
    }

@rakibweb0
Copy link

Same issue on PopOS - flatpak. Solved by adding to the settings.json:

"terminal.integrated.env.linux": { "LD_PRELOAD": null, },

It's working....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.