MPS 2017.x not starting on Linux

Hi, someone tested MPS 2017.2 on Linux?

It's not starting on my laptop (linux Mint) with Java 8u144 and throws an OutofMemory

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
log4j:WARN No appenders could be found for logger (jetbrains.mps.util.ClassPathReader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.lang.OutOfMemoryError: Java heap space
Dumping heap to /home/marco/java_error_in_IDEA.hprof ...
Heap dump file created [2118910228 bytes in 20,460 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

    at java.util.Arrays.copyOfRange(Arrays.java:3664)

I've opened the head dump with jhat and there are 2gb of char I think:
Class                         Instance Count         Total Size
class [C                      2278432             2003684180
class java.lang.String        2278481                27341772
class [Ljava.lang.Object;     982                  24399472
version MPS-2017.1.1 has the same problem. Version 3.3.5 works fine.
Some hints to at least highlight the problem better?
0
10 comments

Hej,

I am successfully running 2017.1 and 2017.2 under Arch Linux.

 

Some more meta:

$ uname -a

Linux naysayer 4.12.6-1-ARCH #1 SMP PREEMPT Sat Aug 12 09:16:22 CEST 2017 x86_64 GNU/Linux

 

$ java -version

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

 

startup log:

2017-08-16 12:53:58,588 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2017-08-16 12:53:58,599 [ 11] INFO - #com.intellij.idea.Main - IDE: JetBrains MPS (build #MPS-172.1127, 03 Aug 2017 02:58)
2017-08-16 12:53:58,599 [ 11] INFO - #com.intellij.idea.Main - OS: Linux (4.12.6-1-arch, amd64)
2017-08-16 12:53:58,599 [ 11] INFO - #com.intellij.idea.Main - JRE: 1.8.0_144-b01 (Oracle Corporation)
2017-08-16 12:53:58,599 [ 11] INFO - #com.intellij.idea.Main - JVM: 25.144-b01 (Java HotSpot(TM) 64-Bit Server VM)
2017-08-16 12:53:58,600 [ 12] INFO - #com.intellij.idea.Main - JVM Args: -Xbootclasspath/a:../lib/boot.jar -XX:MaxJavaStackTraceDepth=-1 -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true -Dsun.io.useCanonCaches=false -XX:SoftRefLRUPolicyMSPerMB=50 -XX:+UseConcMarkSweepGC -Dintellij.config.imported.in.current.session=true -Dide.mac.message.dialogs.as.sheets=false -Dapple.awt.graphics.UseQuartz=true -Dfile.encoding=UTF-8 -Xss1024k -ea -Xmx2048m -XX:MaxPermSize=350m -XX:NewSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xverify:none -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -XX:ErrorFile=/home/nkoester/java_error_in_MPS_%p.log -XX:HeapDumpPath=/home/nkoester/java_error_in_IDEA.hprof -Didea.paths.selector=MPS2017.2 -Djb.vmOptionsFile=./mps64.vmoptions -Dswing.aatext=TRUE -Dawt.useSystemAAFontSettings=on -Xms2048m -Xmx4048m -XX:PermSize=512m -XX:MaxPermSize=2048m -Didea.jre.check=true
2017-08-16 12:53:58,600 [ 12] INFO - #com.intellij.idea.Main - ext: /usr/lib/jvm/java-8-jdk/jre/lib/ext: [nashorn.jar, dnsns.jar, sunjce_provider.jar, cldrdata.jar, jfxrt.jar, meta-index, sunpkcs11.jar, localedata.jar, jaccess.jar, sunec.jar, zipfs.jar]
2017-08-16 12:53:58,600 [ 12] INFO - #com.intellij.idea.Main - JNU charset: UTF-8
2017-08-16 12:53:58,610 [ 22] INFO - #com.intellij.idea.Main - JNA library (64-bit) loaded in 10 ms
2017-08-16 12:53:58,623 [ 35] INFO - #com.intellij.util.ui.JBUI - User scale factor: 1.0
2017-08-16 12:53:58,623 [ 35] INFO - #com.intellij.util.ui.JBUI - System scale factor: 1.25 (IDE-managed HiDPI)
2017-08-16 12:53:58,711 [ 123] INFO - #com.intellij.idea.IdeaApplication - WM detected: i3

[...]

0

I'll add meta for my Linux Mint for completeness:

marco@lizard ~ $ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

marco@lizard ~ $ uname -a
Linux lizard 4.2.0-34-generic #39~14.04.1-Ubuntu SMP Fri Mar 11 11:38:02 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The log I get at start up is just the one I posted.

0

Stracktrace I've got after some changes to the the vmoptions file

Heap dump file created [2118917417 bytes in 18,687 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:3236)
    at java.lang.StringCoding.safeTrim(StringCoding.java:79)
    at java.lang.StringCoding.access$300(StringCoding.java:50)
    at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:305)
    at java.lang.StringCoding.encode(StringCoding.java:344)
    at java.lang.String.getBytes(String.java:918)
    at java.io.UnixFileSystem.list(Native Method)
    at java.io.File.list(File.java:1122)
    at java.io.File.listFiles(File.java:1207)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:44)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)
    at com.intellij.util.lang.FileLoader.buildPackageCache(FileLoader.java:61)

0

OK, don't know why but, as suggested on MPS official Slack, it started with java 8u112.

Thx to Victor

0

Stop working again with every Java version

 

0

Don't seem to me related with the JDK because version 3.3.5 is working fine

0

Also with last jdk published by JetBrains onBintray
marco@lizard ~ $ java -version
openjdk version "1.8.0_152-release"
OpenJDK Runtime Environment (build 1.8.0_152-release-970-b1)
OpenJDK 64-Bit Server VM (build 25.152-b1, mixed mode)
marco@lizard ~ $ /opt/MPS/MPS-2017.2/bin/mps.sh

0

Ok, so I open Idea, open MPS, and remote debug it.
The problem is that I was running mps.sh from my home folder that probably contains too much stuff.
So FileLoader, actually a class related with the idea platform, started trying loading every class I have in my HOME, from here the OutOfMemory.
If I move out from HOME, for instance with cd /opt/MPS/bin before to call mps.sh I do not have any problem.

0

Someone is going to report this bug to the MPS issue tracker?

0

Here: https://youtrack.jetbrains.com/issue/MPS-26542
Tracker for MPS is public, so feel free to submit issues yourself =)

0

Please sign in to leave a comment.