Repository navigation
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version:
- OS Version:
Steps to Reproduce:
- Set up a Java project with the Java Plugins and Maven Plugins
- Run Java 21 code (see evidence below)
- mvn clean install the code
- mvn exec:java
- in the application click on the apply (save) button
- Application crashes with a __libc_pthread_init symbol lookup error indicating that the Java 21 Virutal Machine is incompatible with the now ancient core20 Ubuntu snap that VSCode is confined to.
- Running the code directly from gnome terminal returns no errors on Ubuntu 24.04
- Most likely solution would be to repackage the VScode snaps to use core24 instead of the now outdated core20.
Environment
- VS Code: [1.97.2] (snap installation)
- VS Code Insider: [1.98.0-insider] (snap installation)
- Ubuntu: [24.04.2 LTS]
- Java: [version]
- openjdk version "21.0.6" 2025-01-21
- OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)
- OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)
- Maven: [version]
- Apache Maven 3.8.7
- Maven home: /usr/share/maven
- Java version: 21.0.6, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64
- Default locale: nl_NL, platform encoding: UTF-8
- OS name: "linux", version: "6.8.0-53-generic", arch: "amd64", family: "unix"
Description
When running Maven commands in VS Code's integrated terminal on Ubuntu with snap installation, the terminal appears to inherit core20 snap's environment instead of the system environment, causing Java symbol lookup errors.
/usr/bin/java: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
To Reproduce
- Install VS Code via snap
- Open a Java/Maven project
- Run
mvn exec:javain VS Code's integrated terminal - Observe error with symbol lookup for
__libc_pthread_init
Expected Behavior
Terminal should use system libraries like when running in a regular Ubuntu terminal. Or should be using the newest core24 when running on Ubuntu.
Evidience:
Happens both on code and code-insiders
snap info code
name: code
summary: Code editing. Redefined.
publisher: Visual Studio Code (vscode✓)
store-url: https://snapcraft.io/code
contact: https://twitter.com/code
license: unset
description: |
Visual Studio Code is a new choice of tool that combines the
simplicity of a code editor with what developers need for the core
edit-build-debug cycle.
commands:
- code
- code.url-handler
snap-id: Ht0aUHi7ofh9Fbwh6m7jUN2pAy6kzBiu
tracking: latest/stable
refresh-date: 9 days ago, at 23:08 CET
channels:
latest/stable: e54c774 2025-02-13 (184) 334MB classic
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
installed: e54c774 (184) 334MB classic
snap info code-insiders
name: code-insiders
summary: Code editing. Redefined.
publisher: Visual Studio Code (vscode✓)
store-url: https://snapcraft.io/code-insiders
contact: https://twitter.com/code
license: unset
description: |
Visual Studio Code is a new choice of tool that combines the
simplicity of a code editor with what developers need for the core
edit-build-debug cycle.
commands:
- code-insiders
- code-insiders.url-handler
snap-id: vNVY8DiBL4e2Q8H3Xtsh71c8QSTaxBdp
tracking: latest/stable
refresh-date: today at 17:34 CET
channels:
latest/stable: 233d086 2025-02-21 (1889) 331MB classic
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
installed: 233d086 (1889) 331MB classic
protected void save() {
try {
Enumeration<TreeNode> tree = rootNode.preorderEnumeration();
tree.nextElement(); //skip root
while (tree.hasMoreElements()) {
DefaultMutableTreeNode child = (DefaultMutableTreeNode) tree.nextElement();
TreeCard card = (TreeCard) child.getUserObject();
try {
card.nodePanel.save(); // This calls save() on each preference panel
} catch (Exception e) {
Logger.error("Preferences of '" + card.nodeName + "' could not be saved", e);
JOptionPane.showMessageDialog(this,
"Error saving preferences for " + card.nodeName + ": " + e.getMessage(),
"Save Error",
JOptionPane.ERROR_MESSAGE);
}
}
Settings.save(); // This writes to the settings file
} catch (Exception e) {
Logger.error("Critical error during preferences save", e);
JOptionPane.showMessageDialog(this,
"A critical error occurred while saving preferences: " + e.getMessage(),
"Critical Save Error",
JOptionPane.ERROR_MESSAGE);
}
}
public static void save() {
if (props == null) return;
Logger.info("Saving preferences");
put("version", Controller.version);
OutputStream os = null;
try {
os = new FileOutputStream(file);
props.store(os, "jNetMap Settings");
} catch (IOException e) {
Logger.error("Failed to save preferences", e);
} finally {
try {
os.close();
} catch (Exception e) {
}
}
}

Activity
globeone commentedon Feb 23, 2025
Proof that the same thing happens from Insiders which is also built in (ubuntu) core20 not core24.
globeone commentedon Feb 23, 2025
Tried to work around the issue but VSCode is stubborn when launching from it's terminal even though snap confinement on VSCode snap version is --classic.
launch.json
settings.json
globeone commentedon Feb 23, 2025
same code but directly from gnome-terminal, the preferences get saved and the application continues to work.
globeone commentedon Feb 23, 2025
running the locally installed .deb version does allow me to work with the code without crashing but has lots of library conflicts while being installed
So, also needs some Life-cycle Management as well.
moozoo64 commentedon Mar 29, 2025
Maybe this will help others.
I had this problem
I use
to locate the offending library
And this fixed it for me
So in my debug launch I add
Note that running in a normal terminal didn't have this problem
The linker is correctly linking
and ldd myprogram won't show a problem.
its one of the loading libraries linking to the snap version
In my build task I use bash - l -c "cmake -G Ninja -B build ..."
Regard Michael
qwertychouskie commentedon Nov 5, 2025
Running into the same issue where the build-in terminal cannot launch various applications due to VSCode using the ancient
core20version of thecoresnap. What needs to be done to get VSCode to move to a supportedcoresnap, such ascore24?qwertychouskie commentedon Nov 5, 2025
It looks like the
snapcraft.yamlis here: https://github.com/microsoft/vscode/blob/main/resources/linux/snap/snapcraft.yamlIf someone familiar with the snap process adjusted this and made a PR, perhaps it would get merged, and new releases would actually use a modern core snap?
dmitrivMS commentedon Mar 1, 2026
QwertyChouskie (@qwertychouskie) Is core22 sufficient to fix this issue?
qwertychouskie commentedon Sep 16, 2026
Is there any reason to not use
core24(orcore26at this point)?While I can't easily find a listed EOL policy for snap core runtimes, Ubuntu 20.04 (which the
core20runtime is presumably based on) has been EOL for a while now, and Ubuntu 22.04 is about half a year from EOL.Merging #298237 would certainly be a step in the right direction, but moving all the way to at least
core24would be best.