Skip to content

jetbrains.jdk*: Update Jetbrains Java Runtime packages #426285

Merged
fabianhjr merged 2 commits intoNixOS:masterfrom
Janrupf:master
Jul 25, 2025
Merged

jetbrains.jdk*: Update Jetbrains Java Runtime packages #426285
fabianhjr merged 2 commits intoNixOS:masterfrom
Janrupf:master

Conversation

@Janrupf
Copy link
Contributor

@Janrupf Janrupf commented Jul 18, 2025

Things done

  • Upgrade jetbrains.jdk-17-* to jb17.0.15-b1381
  • Upgrade jetbrains.jdk to jb21.0.7-b1038.58

This also fixes the build failures introduced by 4f3fd5b, at least on x86_64.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Prior Art

This PR should in theory supersede #425529 and #425814. #419026 also attempts to fix the runtime while upgrading other jetbrains packages.

I believe the approach in this PR is the "most-correct" and minimally invasive one with the added benefit of upgrading the Jetbrains runtime packages to newer versions.


Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 12.first-time contribution This PR is the author's first one; please be gentle! 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Jul 18, 2025
@nix-owners nix-owners bot requested review from aoli-al and edwtjo July 18, 2025 05:27
Copy link
Contributor

@acid-bong acid-bong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the PR and all commits according to conventions (the docs are linked at the end of the checklist)

@jys1670
Copy link
Contributor

jys1670 commented Jul 18, 2025

Thanks!
I can confirm that PyCharm works correctly (x86_64-linux) , including markdown, jupyter cells and the cursor theme.

Edit: A segfault happened while checking a Jupyter file. Previous success was due to caching? At this point I think it's an unrelated issue, but it would be better if other users could confirm or deny this.

Details
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1eff9f1734, pid=10036, tid=10217
#
# JRE version: OpenJDK Runtime Environment JBR-21.0.7+1-1038.58-jcef (21.0.7+1) (build 21.0.7+1-b1038.58)
# Java VM: OpenJDK 64-Bit Server VM JBR-21.0.7+1-1038.58-jcef (21.0.7+1-b1038.58, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjcef.so+0x1f1734]  std::__codecvt_utf8_utf16_base<char32_t>::do_unshift(__mbstate_t&, char*, char*, char*&) const+0x4
JNI global refs:
JNI global refs: 100, weak refs: 187

JNI global refs memory usage: 1491, weak refs: 2753

OOME stack traces (most recent first):
Classloader memory used:
Loader com.intellij.util.lang.PathClassLoader                                          : 115M
Loader bootstrap                                                                       : 35573K
Loader com.intellij.ide.plugins.cl.PluginClassLoader                                   : 30500K
Loader jdk.internal.loader.ClassLoaders$AppClassLoader                                 : 837K
Loader jdk.internal.loader.ClassLoaders$PlatformClassLoader                            : 441K
Loader sun.reflect.misc.MethodUtil                                                     : 3064B

Classes loaded by more than one classloader:
Class com.intellij.ultimate.PluginVerifier                                            : loaded 2 times (x 69B)

# An error report file with more information is saved as:
# /home/user/java_error_in_pycharm_10036.log
#
# If you would like to submit a bug report, please visit:
#   https://youtrack.jetbrains.com/issues/JBR
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
3670 [ERROR] xplat_launcher::java: [JVM] abort_hook

[error occurred during error reporting (), id 0x6, SIGABRT (0x6) at pc=0x00007f2005a9cf3c]

@aoli-al
Copy link
Member

aoli-al commented Jul 18, 2025

Thanks for the PR!

It seems that many changes are similar to #425529. Shall we converge to one PR to reduce the work for the committers?

Maybe we can reduce this PR to an update and address the fix in #425529

@aoli-al aoli-al mentioned this pull request Jul 18, 2025
3 tasks
@theCapypara theCapypara mentioned this pull request Jul 18, 2025
13 tasks
@theCapypara theCapypara self-requested a review July 18, 2025 16:12
@Janrupf
Copy link
Contributor Author

Janrupf commented Jul 18, 2025

Thanks for the PR!

It seems that many changes are similar to #425529. Shall we converge to one PR to reduce the work for the committers?

Maybe we can reduce this PR to an update and address the fix in #425529

The main reason I created a new PR is because I believe the changes in #425529 to be a bit too invasive. I'm not sure why there is a block which skips the configureFlags partially. The adding of the format -Wno-error=... arguments becomes redundant by updating the runtime to a newer version (these compile warnings were fixed). These are also fixed by inheriting oldAttrs.env.

I'm not strictly against combining these PR's, but I think the changes in this PR don't actually require the changes in #425529

@Janrupf Janrupf force-pushed the master branch 2 times, most recently from c7ca5e4 to 7687391 Compare July 18, 2025 18:02
@Janrupf
Copy link
Contributor Author

Janrupf commented Jul 18, 2025

Thanks! I can confirm that PyCharm works correctly (x86_64-linux) , including markdown, jupyter cells and the cursor theme.

Edit: A segfault happened while checking a Jupyter file. Previous success was due to caching? At this point I think it's an unrelated issue, but it would be better if other users could confirm or deny this.

Honestly no idea. I'd blame this on JCEF, but to be fair, I think we're also mixing a combination of JCEF and JBR that is not how upstream combines the versions.

It would be interesting to see the /home/user/java_error_in_pycharm_10036.log file mentioned in the crash report, it should contain more information on whats going on

@Janrupf Janrupf changed the title Fix and update Jetbrains Java Runtime packages jetbrains.jdk*: Fix and update Jetbrains Java Runtime packages Jul 18, 2025
@Janrupf Janrupf requested a review from acid-bong July 18, 2025 18:17
@Janrupf
Copy link
Contributor Author

Janrupf commented Jul 18, 2025

@acid-bong I'm not entirely sure if the commit messages and PR title are now ok, especially the ones which touch multiple packages. Maybe you have a better idea on naming them

@aoli-al
Copy link
Member

aoli-al commented Jul 20, 2025

@Janrupf
Copy link
Contributor Author

Janrupf commented Jul 21, 2025

Does the workaround help? I couldn't yet reproduce this. I would declare this a Jetbrains issue to be open, though chances are this could be solved by updating the used JCEF (and maybe building the CEF binaries from source, they are currently downloaded pre-built and then patched)

@jys1670
Copy link
Contributor

jys1670 commented Jul 21, 2025

Does the workaround help? I couldn't yet reproduce this. I would declare this a Jetbrains issue to be open, though chances are this could be solved by updating the used JCEF (and maybe building the CEF binaries from source, they are currently downloaded pre-built and then patched)

I can't test workaround or help with this PR any further due to being away from my main PC, however here are several important details:

Before attempting to reproduce this issue on any project, make sure you remove the jcef cache (for example ~/.cache/JetBrains/PyCharm2025.1/jcef_cache).

I didn't remove the cache while checking this PR, so it probably segfaults too. And another one is confirmed to segfault.

This is very unlikely to be a JetBrains issue. It happens with both old and new jbr-jcef when:

separateDebugInfo = true;
__structuredAttrs = true;

I guess having both set to true has the side effect of changing some sneaky environment variable (no idea which one) during building process and that causes segfault later.

For now I've overridden both to false:

separateDebugInfo = false;
__structuredAttrs = false;

And everything works as expected.

@Janrupf
Copy link
Contributor Author

Janrupf commented Jul 21, 2025

Oh great... maybe this really is the way then, even if its quick and dirty. I have the feeling figuring out why JCEF randomly segfaults is a not insubstantial amount of work.

@aoli-al
Copy link
Member

aoli-al commented Jul 22, 2025

Does the workaround help?

I didn't try to change the permission of the chrome-sandbox but "enable out-of-process JCEF via registry" does not work for me.

I didn't remove the cache while checking #425529, so it probably segfaults too.

idea-community-bin does not segfault with #425529 even after the jcef_cache is removed.

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 24, 2025
@fabianhjr
Copy link
Member

fabianhjr commented Jul 24, 2025

Rebased after merging #425529

@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 24, 2025
@Janrupf
Copy link
Contributor Author

Janrupf commented Jul 24, 2025

@aoli-al since this was now rebased on top of #425529, can you check again if you can reproduce the segfault? I suppose this really now is just an update PR

@fabianhjr
Copy link
Member

@fabianhjr fabianhjr changed the title jetbrains.jdk*: Fix and update Jetbrains Java Runtime packages jetbrains.jdk*: Update Jetbrains Java Runtime packages Jul 24, 2025
Copy link
Member

@aoli-al aoli-al left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried linux-x86 and everything works for me. Thanks for keeping the ball rolling.

@aoli-al aoli-al added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Jul 24, 2025
@fabianhjr
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 426285
Commit: 50fbd3334953a47b0bae0c9f88b98432c735fcfe


x86_64-linux

✅ 26 packages built:
  • animeko
  • jetbrains.aqua
  • jetbrains.clion
  • jetbrains.datagrip
  • jetbrains.dataspell
  • jetbrains.gateway
  • jetbrains.goland
  • jetbrains.idea-community (jetbrains.idea-community-src)
  • jetbrains.idea-community-bin
  • jetbrains.idea-ultimate
  • jetbrains.jdk
  • jetbrains.jdk-no-jcef
  • jetbrains.jdk-no-jcef-17
  • jetbrains.jdk-no-jcef-17.debug
  • jetbrains.jdk-no-jcef.debug
  • jetbrains.jdk.debug
  • jetbrains.mps
  • jetbrains.phpstorm
  • jetbrains.pycharm-community (jetbrains.pycharm-community-src)
  • jetbrains.pycharm-community-bin
  • jetbrains.pycharm-professional
  • jetbrains.rider
  • jetbrains.ruby-mine
  • jetbrains.rust-rover
  • jetbrains.webstorm
  • jetbrains.writerside

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Jul 24, 2025
@fabianhjr fabianhjr merged commit 1ec347a into NixOS:master Jul 25, 2025
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants