Coder Social home page Coder Social logo

caoccao / javet Goto Github PK

View Code? Open in Web Editor NEW
581.0 13.0 57.0 16.3 MB

Javet is Java + V8 (JAVa + V + EighT). It is an awesome way of embedding Node.js and V8 in Java.

Home Page: https://www.caoccao.com/Javet/

License: Apache License 2.0

CMake 0.60% Batchfile 0.04% Shell 0.16% C++ 14.11% C 0.07% JavaScript 0.55% Python 0.96% Java 82.09% TypeScript 0.01% Dockerfile 1.42%
java javascript windows nodejs linux java-v8 v8 v8-javascript-engine macos engine

javet's Introduction

Javet

Maven Central Discord Donate

Linux x86_64 Build MacOS x86_64 Build MacOS arm64 Build Android Node Build Android V8 Build

Javet is Java + V8 (JAVa + V + EighT). It is an awesome way of embedding Node.js and V8 in Java.

If you like my work, please Star this project. And, you may follow me @sjtucaocao, or visit https://blog.caoccao.com/ or https://caoccao.blogspot.com/. And the official support channel is at discord.

💖 If you like my work, please donate to support me. If you have a retired Mac OS (x86_64) device and are fine with mailing it to me, that will be great because I don't have such device to support the community. Thank you for supporting Javet.

Major Features

CPU Arch Android Linux MacOS Windows
x86 ✔️

x86_64 ✔️

✔️

✔️

✔️

arm ✔️

arm64 ✔️

✔️

✔️

  • Node.js v20.12.2 + V8 v12.4.254.9
  • Dynamic switch between Node.js and V8 mode (Which mode do you prefer?)
  • Polyfill V8 mode with Javenode
  • V8 API exposure in JVM
  • JavaScript and Java interop
  • Native BigInt and Date
  • Javet engine pool
  • Easy spring integration
  • Live debug with Chrome DevTools
  • AST analysis with JavetSanitizer
  • TS, JSX, TSX transpilation with swc4j
  • Live interaction with JavetShell

Quick Start

Dependency

Maven

<!-- Linux and Windows (x86_64) -->
<dependency>
    <groupId>com.caoccao.javet</groupId>
    <artifactId>javet</artifactId>
    <version>3.1.1</version>
</dependency>

<!-- Linux (arm64) -->
<dependency>
    <groupId>com.caoccao.javet</groupId>
    <artifactId>javet-linux-arm64</artifactId>
    <version>3.1.1</version>
</dependency>

<!-- Mac OS (x86_64 and arm64) -->
<dependency>
    <groupId>com.caoccao.javet</groupId>
    <artifactId>javet-macos</artifactId>
    <version>3.1.1</version>
</dependency>

Gradle Kotlin DSL

implementation("com.caoccao.javet:javet:3.1.1") // Linux and Windows (x86_64)
implementation("com.caoccao.javet:javet-linux-arm64:3.1.1") // Linux (arm64)
implementation("com.caoccao.javet:javet-macos:3.1.1") // Mac OS (x86_64 and arm64)
implementation("com.caoccao.javet:javet-android-node:3.1.1") // Android Node (arm, arm64, x86 and x86_64)
implementation("com.caoccao.javet:javet-android-v8:3.1.1") // Android V8 (arm, arm64, x86 and x86_64)

Gradle Groovy DSL

implementation 'com.caoccao.javet:javet:3.1.1' // Linux and Windows (x86_64)
implementation 'com.caoccao.javet:javet-linux-arm64:3.1.1' // Linux (arm64)
implementation 'com.caoccao.javet:javet-macos:3.1.1' // Mac OS (x86_64 and arm64)
implementation 'com.caoccao.javet:javet-android-node:3.1.1' // Android Node (arm, arm64, x86 and x86_64)
implementation 'com.caoccao.javet:javet-android-v8:3.1.1' // Android V8 (arm, arm64, x86 and x86_64)

Hello Javet

// Node.js Mode
try (V8Runtime v8Runtime = V8Host.getNodeInstance().createV8Runtime()) {
    System.out.println(v8Runtime.getExecutor("'Hello Javet'").executeString());
}

// V8 Mode
try (V8Runtime v8Runtime = V8Host.getV8Instance().createV8Runtime()) {
    System.out.println(v8Runtime.getExecutor("'Hello Javet'").executeString());
}

Sponsors

HiveMQ

License

APACHE LICENSE, VERSION 2.0

Blog

Documents

javet's People

Contributors

bakjos avatar caoccao avatar cormanz avatar flyriver avatar maddie avatar mowmowkittycat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javet's Issues

0.9.7 Test Build Issue

this.runtime.getGlobalObject().set("Class",  Class.class);
const Bukkit = Class.forName("org.bukkit.Bukkit")
const Materials = Class.forName("org.bukkit.Material")

let test = Materials.ACACIA_BUTTON

console.log(test)

On the Js Console.log(test) responds with "com.caoccao.javet.values.reference.V8ValueProxy" which im pretty sure is not supposed to happend but if I do .ToString() it responds with the actual name of the enum. This happens with any other value if you try to console.log it

does the NodeModuleModule.setRequireRootDirectory method support to set a path that in jar file resource folder?

my nodejs scripts are in the resource folder, and the app run as a jar file.

the code just like:
Path nodeModulesRoot = new PathMatchingResourcePatternResolver().getResource("classpath:/node/node_modules").getFile().toPath(); nodeRuntime.getNodeModule(NodeModuleModule.class).setRequireRootDirectory(nodeModulesRoot);

an then we get the error:
java.io.FileNotFoundException: class path resource [node/node_modules] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/app.jar!/BOOT-INF/classes!/node/node_modules

V8 flag support for --max-old-space-size

We attempted to migrate off of J2V8 and all seemed well. We just use the V8 support on Ubuntu 20.04.2 LTS - not the Node support. The coding was relatively simple to migrate and testing passed QA.

However in our production systems with 32GB of memory we run some big jobs that repeatably hit V8 very hard. As soon as we started running Javet on these jobs that crashed our Wildfly 20 server that runs the Javet code and the rest of our code in a webapp.

I suspect the lack of --max-old-space-size, that we used with J2V8. Namely --max-old-space-size=2048 via V8.setFlags("--max-old-space-size=2048");

Looking at the source of the V8Host class method setFlags() , max-old-space-size is not supported. So we skipped it, but that didn't seem to pan out in our big production jobs.

Dynamic Import Callback Handling

Hey, I'd like some sort of way to handle Dynamic Import Callback Handling in Javet

What do I mean by this
I mean a way to compile imports at runtime. import x from 'y'; should let me handle y dynamically through some sort of combat

API suggestions

// This should possibly be able to use some sort of future for delayed imports
v8Runtime.setImportHandler((currentModule, target) -> {
  // Return compiled module?
});

Quarkus compatibility

Have you investigated Quarkus compatibility? Do you think it's realistic to support native builds using GraalVM? If could do some tests if this topic is of interest.

Add support for building Apple M1 native library

Tracking ticket for adding native Apple M1 build support.

I have this working locally for both Node and V8 runtimes. All tests are passing.

I will open a PR shortly once I'm happy the integration with my other project is working correctly.

NodeJs support

Can Javet be used in java program to Run nodejs modules ? Which version of nodejs is supported?

How long you are planning to maintain this project?

Error loading lodash

have exception when i use runtime.executeScript load lodash.js . i want add lodash library in javet runtime

Limit Access

Is it possible to limit JS Built in modules. Like Node VM does?
similar to vm2.

Script for Custom Packaging

Background

Currently Javet ships the jar files with both Node.js mode and V8 mode, and with Linux and Windows libraries bundled. That is not flexible and efficient in some cases and the bundle file size usually is large. Some Javet users want to customize the jar files.

Goal

To create a script that allows Javet users to customize mode and OS based on the official releases. The rough workflow is as following.

  1. It takes CLI arguments --mode node|v8 --os macos|linux|windows --release x.x.x --output file_path.
  2. It downloads the jar files from maven central.
  3. It extracts the libraries from the jar files.
  4. It packages the new jar file with the selected libraries.

Contribution

If you have done that repeatedly and are interested in this issue, you are welcome contributing to it. Or, it takes low priority at my side, so it would take a long time for me to look into it.

A fatal error has been detected by the Java Runtime Environment

Hello, please see the following error created on a Ubuntu 20.04.2 LTS test server running Wildfly 20 with JDK 11. The OS has 32GB of memory with 50% assigned to Java.

The Javet code version is the latest artifact from GitHub actions for the project, as of today.

I do not have a simple test case; For now I can offer a concise example of the code and the error generated. The method below matches the link of the logs below from the Java error though it is obviously not a full test case.

The logs of my code show "Javet can't setMaxHeapSize, flags are sealed" . I didn't notice that in my last comment in the other issue. The monitoring we use for the server doesn't indicate low memory and the Linux OOM killer is not a factor though the server is getting hit hard so free memory is reduced. This code is executed many times across three servers via web services that are load balanced.

Thank you for your time and promising project. Please set me straight if this is a matter of a simple coding error. The following code is migrated from J2V8.

                   private V8Runtime runtime;

public String runMyCalculations(Long deptID, ATUserBO requestUserBO, Date historicalDate, ATUserViewStateDTO viewStateDTO, List requestedGroupStatsFieldList, Map criteria, Map inputData, List<Map<String,Object>> overrides, Boolean saveToFAR, Boolean anonymize, Boolean verboseLogging, String uuid, RAPIDiagnostics rapiDiagnostics) throws Exception {
try {
V8Host v8Host = V8Host.getV8Instance();
V8Flags flags = v8Host.getFlags();
if (!flags.isSealed()) {
flags.setMaxHeapSize(2048);
} else {
logger.error(logPrefix + "Javet can't setMaxHeapSize, flags are sealed");
}

                            runtime = v8Host.getV8Instance().createV8Runtime();
                            String calculationOutput = runtime.getExecutor(script).executeString();
                        } finally {
                           if (runtime != null) {
                               logger.debug(logPrefix + "starting release ... ");
                               runtime.close();
                               runtime=null;
                               logger.debug(logPrefix + "done release ... ");
                        }
                    }

Link of file hs_err_pid2779254.log

https://drive.google.com/file/d/1iSc4ZVVJ2HjjMGqGG4xkPrZ5_wSSwQ0q/view?usp=sharing

Unloading library - V8

Description:
We are using the library in an "extension" application which could possibly be reloaded when the user wants.

But this seems to cause issues since the native library remains loaded on the old classloader.

Is there possibly any concise way provided to properly stop or unload the library?
I have tried to remove all references to the classloader that loads javet and classes loaded by that classloader, but it seems calling gc and runFinalization still doesnt unload the library/classloader.

strange TypeError when using JavetProxyConverter

I think it is a strange behavior. Is it expected?

POC:

public class POC {
    public static void main(String[] args) throws Exception {
        try (V8Runtime runtime = V8Host.getV8Instance().createV8Runtime()) {
            runtime.setConverter(new JavetProxyConverter());
            JavetStandardConsoleInterceptor console = new JavetStandardConsoleInterceptor(runtime);
            V8ValueGlobalObject global = runtime.getGlobalObject();
            console.register(global);
            global.set("javaObject", new Object());
            runtime.getExecutor("console.log(javaObject);").executeVoid();
            global.delete("javaObject");
            console.unregister(global);
            runtime.lowMemoryNotification();
        }
    }
}

Output:

Exception in thread "main" com.caoccao.javet.exceptions.JavetExecutionException: TypeError: Cannot convert object to primitive value

JavetScriptingError.toString():

TypeError: Cannot convert object to primitive value
Resource: null
Source Code: null
Line Number: 0
Column: 0, 0
Position: 0, 0

Mac OS X

Hi,

Any plan to support Mac OS?

Thanks

Passing a Function into a Java Class

When you pass a Function into a normal Java Class you don't get the V8ValueFunction you get the Function Entity but that can't be turned into a V8ValueFunction.
This is quite an Annoying Issue because I have to turn all my Java Classes into V8ValueObjects with import statements and make work-arounds for the V8ValueFunction.

Cant use SQLite3 module from javet

main.js

var sqlite3 = require('sqlite3').verbose();
const Database = require('sqlite-async')

Database.open('myDB.db')
    .then(db => {
        console.log("good")
    })
    .catch(err => {
        console.log(err)
    })

java code:

  V8Host v8Host = V8Host.getNodeInstance();
  V8Runtime v8 = v8Host.createV8Runtime();
  v8.getExecutor(new File("main.js")).execute();
        
  Scanner in = new Scanner(System.in);
  System.out.println("running...");
  in.nextLine();

I get an error:

Error: A dynamic link library (DLL) initialization routine failed
node_modules\sqlite3\lib\binding\napi-v3-win32-x64\node_sqlite3.node
   at com.caoccao.javet.interop.V8Native.execute(Native Method)
   at com.caoccao.javet.interop.NodeNative.execute(NodeNative.java:24)
   at com.caoccao.javet.interop.V8Runtime.execute(V8Runtime.java:285)
   at com.caoccao.javet.interop.executors.V8StringExecutor.execute(V8StringExecutor.java:56)
   at com.caoccao.javet.interop.IV8Executable.execute(IV8Executable.java:34)

The code above works fine on Node.js

Promise is not collected if in a JS function

I have a sample code that executes a JS function that internally collects a promise. PROMISE is never collected when executed in a function. Promise is collected if it is not in a function.

function run()
{
	new Promise((resolve, reject)=>{ resolve("SUCCESS"); }).then(x => console.log(x))
}
package javet;

import java.io.File;
import java.util.concurrent.atomic.AtomicBoolean;

import com.caoccao.javet.exceptions.JavetException;
import com.caoccao.javet.interop.NodeRuntime;
import com.caoccao.javet.interop.V8Host;

public class Test {

	public static void main(String[] args) throws InterruptedException {

		// Make sure node_modules and test folders stay together.
		final File codeFile = new File("C:\\Users\\userdir\\promise.js");
		final AtomicBoolean serverUp = new AtomicBoolean(false);
		try {
			NodeRuntime nodeRuntime = V8Host.getNodeInstance().createV8Runtime();
			nodeRuntime.getExecutor(codeFile).executeVoid();
			nodeRuntime.getGlobalObject().invoke("run");
			Thread.sleep(5000);
		} catch (JavetException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}

}

Static methods with JavetProxyConverter

Hi! So I was doing some testing with JavetProxyConverter, and encountered the following problem:

If I have an instance of a class, say Class<my.pkg.StaticClass>, I can't access its static methods. There are a lot of libraries in Java which use classes with static methods.

Could JavetProxyConverter proxy static methods of Class instances?

@V8Function( name="get" ) doesn't seem to work properly

Hi,

The following is a failed attempt to a workaround for this issue

Lets assume that some class Registry:

public class Registry {
  @V8Function( name="get" )
  public function Entry fetch( String key ) {
    System.out.println( "call to Register.fetch( '"+key+"')" );
    // magic implementation
  } 

  // ...etc...
}

Then somewhere else in the code we bind the registry to a runtime:

  // Create the registry and bind it to the runtime...
  Register registry = new Registry();
  try (V8ValueObject object = runtime.createV8ValueObject()) {
    result = runtime.getGlobalObject().set( "registry", registry );
    object.bind(registry);
  }

Then when executing the following runtime.getExecutor("registry.get( 'some-key' );").executeString(); results in the following error: TypeError: registry.get is not a function'.

Exposing node flags

Would be nice if we could pass nodejs flags like --inspect from javet when creating the NodeRuntime

JavetProxyConverter: "new" on proxied static classes

Hello! So let's take a class like for example, java.lang.Thread (just as an example)

const Thread = Class.forName('java.lang.Thread');

If I want to initialize an instance of this class via JS, I should be able to do something like new Thread(() => console.log('Hi!')), but you can't because this isn't supported.

The desired output would be a proxied instance of Thread that we can interact with. The example of passing in a JS function as an argument is based on the expected behaviour that these functions will be converted to whatever the functional interface needed is

Thanks!

@V8Function can't handle 'get( id )' methods

Hello again,

Lets assume that some class Registry:

public class Registry {
  @V8Function
  public function Entry get( String key ) {
    System.out.println( "call to Register.get( '"+key+"')" );
    // magic implementation
  } 

  // ...etc...
}

Then somewhere else in the code this happens:

  // Create the registry and bind it to the runtime...
  Register registry = new Registry();
  try (V8ValueObject object = runtime.createV8ValueObject()) {
    result = runtime.getGlobalObject().set( "registry", registry );
    object.bind(registry);
  }

Executing the following runtime.getExecutor("registry.get( 'some-key' );").executeString(); yields the following (unexpected) output:

call to Register.get( 'get' );
call to Register.get( 'some-key' );

I think that the problem is that the method name (Registry.get) somehow conflicts with the internal pattern matching logic of Javet.

add V8Property annotation

你好,很开心试用您的 javet 项目,我的英文很糟糕,但我觉得您应该能看懂中文。
我在学习使用时发现只有 V8Function 。例如:

package kd.bos.olapServer

import com.caoccao.javet.annotations.V8Function
import com.caoccao.javet.interop.V8Runtime

class ScriptDimension(
    private val v8Runtime : V8Runtime,
    private val realObj : DimensionNode
) {
    @get:V8Function
    val name : String get() = realObj.name
}

当我注入这个实例后,我的 js 脚本只能这样使用(accounts就是我注入的ScriptDimension实例):

accounts.getName()

这些书写对用户不友好,我希望是:

accounts.name

我查看了代码的实现,我发现只有 V8Function 注解,我希望能够增加: V8Property 这样的注解。

package kd.bos.olapServer

import com.caoccao.javet.annotations.V8Function
import com.caoccao.javet.interop.V8Runtime

class ScriptDimension(
    private val v8Runtime : V8Runtime,
    private val realObj : DimensionNode
) {
    @V8Property
    val name : String get() = realObj.name
}

您觉得这个主意如何?


Hello, I am very happy to try your javet project. My English is very bad, but I think you should be able to read Chinese.
When I was learning to use it, I found that there was only V8Function. E.g:

package kd.bos.olapServer

import com.caoccao.javet.annotations.V8Function
import com.caoccao.javet.interop.V8Runtime

class ScriptDimension(
    private val v8Runtime: V8Runtime,
    private val realObj: DimensionNode
) {
    @get:V8Function
    val name: String get() = realObj.name
}

When I inject this instance, my js script can only be used like this (accounts is the ScriptDimension instance I injected):

accounts.getName()

These writings are not user-friendly, I hope they are:

accounts.name

I checked the implementation of the code, and I found that there are only V8Function annotations, and I hope to add: V8Property annotations.

package kd.bos.olapServer

import com.caoccao.javet.annotations.V8Function
import com.caoccao.javet.interop.V8Runtime

class ScriptDimension(
    private val v8Runtime: V8Runtime,
    private val realObj: DimensionNode
) {
    @V8Property
    val name: String get() = realObj.name
}

What do you think of this idea?

hwo to register a class

function _test()
{
var _pt = new JavaPoint;
_pt.x = 20;
_pt.y = 30;
var pt2 = new JavaPoint(78,69);
}

what shoud I do to define JavaPoint in Java?
is like @V8Function named @V8Class?

@DaTa
@AllArgsConstructor
@NoArgsConstructor
@V8Class?
public class JavaPoint {
private int x;
private int y;
}

thanks

Demo for debugging in Inspector

I want to debug JS code, create breakpoints, watch variables and call stack. First load scripts first and call it from Console manually or throught backend program periodically. When hits the breakpoint, execution should suspend and make it possble for user to debug.

V8Inspector meets my demands, but when I try the CDTShell demo in the tutorial. JS scripts submit in Java didn't show up in Source panel. Could you please create a more complex demo for CDT and remote debug.

How to use FS module?

As I understand it, it can be used if its object is obtained through (v8 Runtime.get Node Module("fs", NodeModuleAny.class )maybe (naturally I use V8Host.getNodeInstance().createv8runtime()), but via require('fs') in the script it doesn't work

Injecting a full Java instance into the V8 Context

So I am trying to expose Java functionality to the V8 context and for this and I would need to be able to inject instances of objects (not necessarily POJOS) into the V8 context. And while this is already possible, the process itself is a bit painful and hard to mantain ( unless I'm doing something wrong). I created a very small basic sample of what I mean.

Let's imagine this is the class of the instance I want to inject:

public class FileUtils {

    private String prefix;

    public FileUtils(String prefix) {
        this.prefix = prefix;
    }

    public void doA() {
        System.out.println(prefix+ "A");
    }

    public void doB() {
        System.out.println(prefix+"B");
    }

    public void add(Integer v1, Integer v2) {
        System.out.println(v1 + v2);
    }

}

Let's imagine this class belongs to an external library and has many many more methods with all sorts of diferent signatures. When I create a new instance of FileUtils, I would like to be able to inject that instance directly into the V8 context along with all those methods inside it, which, when called from javascript would trigger the java code inside them as shown above. So this is how I'm doing this at the moment:

I created a JavetObject converter and created a callback for every method inside the FileUtils class:

@SuppressWarnings("unchecked")
public class EntityConverter extends JavetObjectConverter {

    @Override
    public V8Value toV8Value(V8Runtime v8, Object object) throws JavetException {
        V8Value v8Value = null;
        V8ValueObject v8ValueObject = null;

        v8Value = super.toV8Value(v8, object);
        if (v8Value != null && !(v8Value.isUndefined())) {
            return v8Value;
        }
        Class objectClass = object.getClass();
        v8ValueObject = v8.createV8ValueObject();
        for (Method method : objectClass.getMethods()) {
            String methodName = method.getName();

            try {
                FileUtilsCallbacks call = new FileUtilsCallbacks(v8, (FileUtils) object);
                JavetCallbackContext callback = new JavetCallbackContext(call, call.getMethod(methodName, method.getParameterTypes()));

                v8ValueObject.setFunction(methodName, callback);
            } catch (NoSuchMethodException ex) {
                Logger.getLogger(EntityConverter.class.getName()).log(Level.SEVERE, null, ex);
            }

        }

        v8Value = v8ValueObject;
        return v8.decorateV8Value(v8Value);

    }
}

And I created a JavetCallbackReceiver:

public class FileUtilsCallbacks extends JavetCallbackReceiver implements IJavetCallbackReceiver {

    private FileUtils myInstance;

    public FileUtilsCallbacks(V8Runtime v8Runtime, FileUtils myInstance) {
        super(v8Runtime);
        this.myInstance = myInstance;
    }

    //delegate the calls to the original instance 1 by 1
    public void doA() {
        this.myInstance.doA();
    }

    public void doB() {
        this.myInstance.doB();
    }

    public void add(Integer v1, Integer v2) {
        this.myInstance.add(v1, v2);
    }

}

And finally putting it all together:

 public static void main(String[] args) throws JavetException {
        V8Runtime v8 = V8Host.getNodeInstance().createV8Runtime();

        FileUtils fileUtils = new FileUtils("Hello ");

       //create converter
        EntityConverter converter = new EntityConverter(); 
     

      //convert the fileUtils instance to a V8ValueObject
        V8ValueObject val = (V8ValueObject) converter.toV8Value(v8, fileUtils); 
        v8.getGlobalObject().set("fileUtils", val); //inject it into the V8 context
        
        //call the methods inside the fileUtils instance from javascript
        v8.getExecutor("fileUtils.doA(); fileUtils.doB(); fileUtils.add(1,1);").execute();

    }

All of the above is working perfectly without any issues. So what is the problem? Well, my issue here is with the JavetCallbackReceiver (FileUtilsCallbacks ), I had to duplicate every function inside the FileUtils class to put it inside the JavetCallbackReceiver (FileUtilsCallbacks ). For classes with many many methods, it's painful to have to duplicate each and every method. Is there a better way to achieve this without duplicating code and making sure it applies to all methods inside the classes?

Java Interop without Interception

Description: Javet seems to not be able to directly interact with Java classes without "intercaption" which seems to not be an option since the classes provided do not entirely belong to the project itself.

Question: Could you guide us to any way we could potentially work around this to have it use reflection?

Thank you.

Suggestion: Github actions to make dev Builds

Its a simple as the title, Probs not as simple to make but it might work. Making github actions to build the dev branch each commit would be nice so if we wanted a feature that you have made but not released it. this way we can obtain a jar easily and use it in our projects

Upgrade Node.js to v16 When it is LTS

Node.js v16 will be LTS on Oct 26, 2021. Javet is going to catch up with it. There might be backward compatibility issues with applications that are using Node.js v14.

The plan is to have Javet v1.x.x use Node.js v16, and v0.x.x use Node.js v14. New features, bug fixes, etc. will go to v1.x.x first. v0.x.x will get low priority in terms of cherry-picking changes from v1.x.x, supporting legacy releases.

In order to balance the development and support resource, you are encouraged to leave your choice here. Thank you.



Release Status Codename Initial Release Active LTS Start Maintenance LTS Start End-of-life
v12 Maintenance LTS Erbium 2019-04-23 2019-10-21 2020-11-30 2022-04-30
v14 Active LTS Fermium 2020-04-21 2020-10-27 2021-10-19 2023-04-30
v16 Current   2021-04-20 2021-10-26 2022-10-18 2024-04-30
v17 Pending   2021-10-19   2022-04-01 2022-06-01
v18 Pending   2022-04-19 2022-10-25 2023-10-18 2025-04-30

SIGSEGV in JRE on calling Java function

Hi,

I've been experimenting with Javet (great job, BTW!) and I'm facing this strange behavior:

I need to run a blessed application. I registered a dummy function that just returns a string:

try (final var v8Runtime = V8Host.getNodeInstance().createV8Runtime()) {
    final var javetCallbackContexts = v8Runtime.getGlobalObject().setFunctions(callbacks);
    v8Runtime.getExecutor(new File("test.js")).execute();
}

It works perfectly fine when being called from the top level of my script:

console.trace('Here works fine');
myFunction();

Trace: Here works fine
    at /home/void/connector/test.js:84:9

However, if I call myFunction from a blessed's event handler, it fails:

tree.on('select', function(node) {
    console.trace('Here it fails!');
    myFunction();
});

Trace: Here it fails!
    at Tree.<anonymous> (/home/ivan/connector/test.js:85:17)
    at Tree.EventEmitter._emit (/home/ivan/connector/node_modules/blessed/lib/events.js:94:20)
    at Tree.EventEmitter.emit (/home/ivan/connector/node_modules/blessed/lib/events.js:117:12)
    at List.<anonymous> (/home/ivan/connector/node_modules/blessed-contrib/lib/widget/tree.js:55:10)
    at List.EventEmitter._emit (/home/ivan/connector/node_modules/blessed/lib/events.js:94:20)
    at List.EventEmitter.emit (/home/ivan/connector/node_modules/blessed/lib/events.js:117:12)
    at Program.<anonymous> (/home/ivan/connector/node_modules/blessed/lib/widgets/screen.js:603:15)
    at Program.emit (events.js:315:20)
    at /home/ivan/connector/node_modules/blessed/lib/program.js:410:15
    at Array.forEach (<anonymous>)

The whole JVM fails with:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f3759e9e764, pid=6451, tid=6452
#
# JRE version: OpenJDK Runtime Environment Zulu11.43+21-CA (11.0.9+11) (build 11.0.9+11-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu11.43+21-CA (11.0.9+11-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x85e764]  Javet::Callback::JavetCallbackContextReference::Invoke(v8::FunctionCallbackInfo<v8::Value> const&)+0xe2
#
# Core dump will be written. Default location: core.6451 (may not exist)
#
# If you would like to submit a bug report, please visit:
#   http://www.azulsystems.com/support/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  S U M M A R Y ------------

Command Line: build/libs/connector-all.jar 29623

Host: Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz, 6 cores, 31G, Ubuntu 20.04.1 LTS
Time: Thu Apr 15 21:50:33 2021 EEST elapsed time: 2.551480 seconds (0d 0h 0m 2s)

---------------  T H R E A D  ---------------

Current thread (0x00007f37e4016800):  JavaThread "main" [_thread_in_native, id=6452, stack(0x00007f37eb1d0000,0x00007f37eb2d1000)]

Stack: [0x00007f37eb1d0000,0x00007f37eb2d1000],  sp=0x00007f37eb2ca530,  free space=1001k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x85e764]  Javet::Callback::JavetCallbackContextReference::Invoke(v8::FunctionCallbackInfo<v8::Value> const&)+0xe2
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x85e2ce]  Javet::Callback::JavetFunctionCallback(v8::FunctionCallbackInfo<v8::Value> const&)+0x92
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0xcaabc7]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0xcacae7]  v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*)+0x147
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c9f199]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1cb0f5e]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1cb0f5e]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c32379]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c38442]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c3615a]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1c35f38]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0xd93a22]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0xd948c1]  v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*)+0x71
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0xc57e23]  v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)+0x153
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1d781d8]  node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context)+0x2c8
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1d87106]  node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*)+0x76
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1ee2a1e]  node::StreamBase::CallJSOnreadMethod(long, v8::Local<v8::ArrayBuffer>, unsigned long, node::StreamBase::StreamBaseJSChecks)+0xae
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1ee5cc4]  node::EmitToJSStreamListener::OnStreamRead(long, uv_buf_t const&)+0x2e4
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1eeef1e]  node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*)+0x8e
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1f55a83]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1f56018]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1f5cbc4]
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x1f49f73]  uv_run+0x133
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x868a0e]  Javet::V8Runtime::CloseV8Context()+0x12e
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x86979e]  Javet::V8Runtime::~V8Runtime()+0x2a
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x86982e]  Javet::V8Runtime::~V8Runtime()+0x18
C  [libjavet-node-linux-x86_64.v.0.8.3.so+0x8519e0]  Java_com_caoccao_javet_interop_V8Native_closeV8Runtime+0x66
j  com.caoccao.javet.interop.V8Native.closeV8Runtime(J)V+0
j  com.caoccao.javet.interop.NodeNative.closeV8Runtime(J)V+2
j  com.caoccao.javet.interop.V8Host.closeV8Runtime(Lcom/caoccao/javet/interop/V8Runtime;)V+45
j  com.caoccao.javet.interop.V8Runtime.close(Z)V+22
j  com.caoccao.javet.interop.V8Runtime.close()V+17
j  me.ivanyu.cv.connector.App2.run(Ljavax/management/MBeanServerConnection;)V+61
j  me.ivanyu.cv.connector.App2.main([Ljava/lang/String;)V+205
v  ~StubRoutines::call_stub
V  [libjvm.so+0x8d1732]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x3c2
V  [libjvm.so+0x941737]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) [clone .isra.81]+0x227
V  [libjvm.so+0x944efb]  jni_CallStaticVoidMethod+0x16b
C  [libjli.so+0x526f]  JavaMain+0xa8f

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.caoccao.javet.interop.V8Native.closeV8Runtime(J)V+0
j  com.caoccao.javet.interop.NodeNative.closeV8Runtime(J)V+2
j  com.caoccao.javet.interop.V8Host.closeV8Runtime(Lcom/caoccao/javet/interop/V8Runtime;)V+45
j  com.caoccao.javet.interop.V8Runtime.close(Z)V+22
j  com.caoccao.javet.interop.V8Runtime.close()V+17
j  me.ivanyu.cv.connector.App2.run(Ljavax/management/MBeanServerConnection;)V+61
j  me.ivanyu.cv.connector.App2.main([Ljava/lang/String;)V+205
v  ~StubRoutines::call_stub

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000018

Register to memory mapping:

RAX=0x0 is NULL
RBX=0x00007f37eb2ca7b0 is pointing into the stack for thread: 0x00007f37e4016800
RCX=0x0 is NULL
RDX=0x0 is NULL
RSP=0x00007f37eb2ca530 is pointing into the stack for thread: 0x00007f37e4016800
RBP=0x00007f37eb2ca650 is pointing into the stack for thread: 0x00007f37e4016800
RSI=0x0 is NULL
RDI=0x00003f08df945d51 points into unknown readable memory: 0f 0c 6a a7 19 00 00
R8 =0x0000000000000001 is an unknown value
R9 =0x000019a76a0c0471 points into unknown readable memory: 04 0c 6a a7 19 00 00
R10=0x0 is NULL
R11=0x000012f990d8fab1 points into unknown readable memory: 0f 0c 6a a7 19 00 00
R12=0x00007f37e4696350 points into unknown readable memory: 00 00 00 00 00 00 00 00
R13=0x0 is NULL
R14=0x00007f3759e9e23c: _ZN5Javet8Callback21JavetFunctionCallbackERKN2v820FunctionCallbackInfoINS1_5ValueEEE+0x0000000000000000 in /tmp/libjavet-node-linux-x86_64.v.0.8.3.so at 0x00007f3759640000
R15=0x00007f37e4696350 points into unknown readable memory: 00 00 00 00 00 00 00 00


Registers:
RAX=0x0000000000000000, RBX=0x00007f37eb2ca7b0, RCX=0x0000000000000000, RDX=0x0000000000000000
RSP=0x00007f37eb2ca530, RBP=0x00007f37eb2ca650, RSI=0x0000000000000000, RDI=0x00003f08df945d51
R8 =0x0000000000000001, R9 =0x000019a76a0c0471, R10=0x0000000000000000, R11=0x000012f990d8fab1
R12=0x00007f37e4696350, R13=0x0000000000000000, R14=0x00007f3759e9e23c, R15=0x00007f37e4696350
RIP=0x00007f3759e9e764, EFLAGS=0x0000000000010246, CSGSFS=0x00000053002b0033, ERR=0x0000000000000000
  TRAPNO=0x0000000000000000

Top of Stack: (sp=0x00007f37eb2ca530)
0x00007f37eb2ca530:   00007f37eb2ca720 00007f37e47c3380
0x00007f37eb2ca540:   000029c7b625f4b9 0000000500000000
0x00007f37eb2ca550:   00007f37e4016b40 00007f37e4696350
0x00007f37eb2ca560:   00007f37e46b2b78 0000000500000000 

Instructions: (pc=0x00007f3759e9e764)
0x00007f3759e9e664:   50 08 48 8b 45 f8 48 c7 40 10 00 00 00 00 48 8b
0x00007f3759e9e674:   45 f8 48 89 c7 e8 72 37 fc ff 90 c9 c3 90 55 48
0x00007f3759e9e684:   89 e5 53 48 81 ec 18 01 00 00 48 89 bd e8 fe ff
0x00007f3759e9e694:   ff 48 89 b5 e0 fe ff ff 64 48 8b 04 25 28 00 00
0x00007f3759e9e6a4:   00 48 89 45 e8 31 c0 48 8b 05 96 c2 0d 02 48 8b
0x00007f3759e9e6b4:   00 48 8d 8d 00 ff ff ff ba 08 00 01 00 48 89 ce
0x00007f3759e9e6c4:   48 89 c7 e8 04 6f fc ff 48 8b 05 75 c2 0d 02 48
0x00007f3759e9e6d4:   8b 00 48 8d 8d 00 ff ff ff ba 00 00 00 00 48 89
0x00007f3759e9e6e4:   ce 48 89 c7 e8 63 5a fb ff 48 8b 85 e0 fe ff ff
0x00007f3759e9e6f4:   48 89 85 70 ff ff ff 48 8b 85 70 ff ff ff 48 8b
0x00007f3759e9e704:   00 48 8b 40 08 48 89 85 48 ff ff ff 48 8b 95 48
0x00007f3759e9e714:   ff ff ff 48 8d 85 08 ff ff ff 48 89 d6 48 89 c7
0x00007f3759e9e724:   e8 47 af fb ff 48 8b 95 48 ff ff ff 48 8d 45 d0
0x00007f3759e9e734:   48 89 d6 48 89 c7 e8 91 d4 fb ff 48 8b 85 48 ff
0x00007f3759e9e744:   ff ff 48 89 c7 e8 82 d3 f7 ff 48 89 85 10 ff ff
0x00007f3759e9e754:   ff 48 8d 85 10 ff ff ff 48 89 c7 e8 1c 23 f6 ff
0x00007f3759e9e764:   48 8b 40 18 48 89 85 50 ff ff ff 48 8b 85 e8 fe
0x00007f3759e9e774:   ff ff 48 89 c7 e8 d2 7d fc ff 88 85 fa fe ff ff
0x00007f3759e9e784:   48 8b 85 e8 fe ff ff 48 89 c7 e8 5d 2f fb ff 88
0x00007f3759e9e794:   85 fb fe ff ff 48 8b 85 00 ff ff ff 48 8b 8d e0
0x00007f3759e9e7a4:   fe ff ff 48 8d 95 10 ff ff ff 48 8b b5 50 ff ff
0x00007f3759e9e7b4:   ff 48 89 c7 e8 33 46 fc ff 48 89 85 58 ff ff ff
0x00007f3759e9e7c4:   80 bd fb fe ff ff 00 74 6e 48 8b 85 e0 fe ff ff
0x00007f3759e9e7d4:   48 89 85 78 ff ff ff 48 8b 85 78 ff ff ff 48 8b
0x00007f3759e9e7e4:   40 08 48 83 c0 08 48 89 45 80 48 8b 45 80 48 89
0x00007f3759e9e7f4:   85 40 ff ff ff 48 8b 85 40 ff ff ff 48 89 85 38
0x00007f3759e9e804:   ff ff ff 48 8b 85 38 ff ff ff 48 89 85 40 ff ff
0x00007f3759e9e814:   ff 48 8b 85 00 ff ff ff 48 8b 8d 40 ff ff ff 48
0x00007f3759e9e824:   8d 95 10 ff ff ff 48 8b b5 50 ff ff ff 48 89 c7
0x00007f3759e9e834:   e8 57 4e fb ff eb 05 b8 00 00 00 00 48 89 85 60
0x00007f3759e9e844:   ff ff ff 48 8b 85 00 ff ff ff 48 8b 95 e8 fe ff
0x00007f3759e9e854:   ff 48 8b 7a 08 48 8b 15 08 4f 13 02 48 8b 35 f9 


Stack slot to memory mapping:
stack at sp + 0 slots: 0x00007f37eb2ca720 is pointing into the stack for thread: 0x00007f37e4016800
stack at sp + 1 slots: 0x00007f37e47c3380 points into unknown readable memory: 28 49 f3 5b 37 7f 00 00
stack at sp + 2 slots: 0x000029c7b625f4b9 points into unknown readable memory: 30 28 5a ad 09 00 00
stack at sp + 3 slots: 0x0000000500000000 is an unknown value
stack at sp + 4 slots: 0x00007f37e4016b40 points into unknown readable memory: 80 fc 94 ec 37 7f 00 00
stack at sp + 5 slots: 0x00007f37e4696350 points into unknown readable memory: 00 00 00 00 00 00 00 00
stack at sp + 6 slots: 0x00007f37e46b2b78 points into unknown readable memory: d9 21 20 48 64 32 00 00
stack at sp + 7 slots: 0x0000000500000000 is an unknown value


---------------  P R O C E S S  ---------------

Threads class SMR info:
_java_thread_list=0x00007f37781364f0, length=14, elements={
0x00007f37e4016800, 0x00007f37e42c3800, 0x00007f37e42c8000, 0x00007f37e42dc800,
0x00007f37e42df000, 0x00007f37e42e1000, 0x00007f37e42e3000, 0x00007f37e437b800,
0x00007f37e4385000, 0x00007f37e457f000, 0x00007f37e4581000, 0x00007f37e4593800,
0x00007f37e459f800, 0x00007f37e4600800
}

Java Threads: ( => current thread )
=>0x00007f37e4016800 JavaThread "main" [_thread_in_native, id=6452, stack(0x00007f37eb1d0000,0x00007f37eb2d1000)]
  0x00007f37e42c3800 JavaThread "Reference Handler" daemon [_thread_blocked, id=6459, stack(0x00007f37e80a0000,0x00007f37e81a1000)]
  0x00007f37e42c8000 JavaThread "Finalizer" daemon [_thread_blocked, id=6460, stack(0x00007f37cc4f0000,0x00007f37cc5f1000)]
  0x00007f37e42dc800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6461, stack(0x00007f37cc100000,0x00007f37cc201000)]
  0x00007f37e42df000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=6462, stack(0x00007f37a76f0000,0x00007f37a77f1000)]
  0x00007f37e42e1000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=6463, stack(0x00007f37a75e0000,0x00007f37a76e1000)]
  0x00007f37e42e3000 JavaThread "Sweeper thread" daemon [_thread_blocked, id=6464, stack(0x00007f37a74d0000,0x00007f37a75d1000)]
  0x00007f37e437b800 JavaThread "Service Thread" daemon [_thread_blocked, id=6465, stack(0x00007f37a73c0000,0x00007f37a74c1000)]
  0x00007f37e4385000 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=6467, stack(0x00007f37a71a0000,0x00007f37a72a1000)]
  0x00007f37e457f000 JavaThread "RMI RenewClean-[127.0.1.1:50356]" daemon [_thread_blocked, id=6469, stack(0x00007f37a6730000,0x00007f37a6831000)]
  0x00007f37e4581000 JavaThread "RMI GC Daemon" daemon [_thread_blocked, id=6470, stack(0x00007f37a6410000,0x00007f37a6511000)]
  0x00007f37e4593800 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=6471, stack(0x00007f37a5ed0000,0x00007f37a5fd1000)]
  0x00007f37e459f800 JavaThread "JMX client heartbeat 2" daemon [_thread_blocked, id=6473, stack(0x00007f37a60f0000,0x00007f37a61f1000)]
  0x00007f37e4600800 JavaThread "process reaper" daemon [_thread_blocked, id=6475, stack(0x00007f37e8070000,0x00007f37e8092000)]

Other Threads:
  0x00007f37e42bb800 VMThread "VM Thread" [stack: 0x00007f37e81b2000,0x00007f37e82b2000] [id=6458]
  0x00007f37e437e000 WatcherThread [stack: 0x00007f37a72b2000,0x00007f37a73b2000] [id=6466]
  0x00007f37e402e800 GCTaskThread "GC Thread#0" [stack: 0x00007f37ea5c2000,0x00007f37ea6c2000] [id=6453]
  0x00007f37e406a000 ConcurrentGCThread "G1 Main Marker" [stack: 0x00007f37e8d42000,0x00007f37e8e42000] [id=6454]
  0x00007f37e406c000 ConcurrentGCThread "G1 Conc#0" [stack: 0x00007f37e8c32000,0x00007f37e8d32000] [id=6455]
  0x00007f37e41ef000 ConcurrentGCThread "G1 Refine#0" [stack: 0x00007f37e84c2000,0x00007f37e85c2000] [id=6456]
  0x00007f37e41f0800 ConcurrentGCThread "G1 Young RemSet Sampling" [stack: 0x00007f37e83b2000,0x00007f37e84b2000] [id=6457]

Threads with active compile tasks:

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap address: 0x0000000600e00000, size: 8178 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
Narrow klass base: 0x0000000800000000, Narrow klass shift: 0
Compressed class space size: 1073741824 Address: 0x0000000800000000

Heap:
 garbage-first heap   total 524288K, used 12288K [0x0000000600e00000, 0x0000000800000000)
  region size 2048K, 7 young (14336K), 0 survivors (0K)
 Metaspace       used 13032K, capacity 13455K, committed 13696K, reserved 1060864K
  class space    used 1413K, capacity 1574K, committed 1664K, reserved 1048576K
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, A=archive, TAMS=top-at-mark-start (previous, next)
|   0|0x0000000600e00000, 0x0000000600e00000, 0x0000000601000000|  0%| F|  |TAMS 0x0000000600e00000, 0x0000000600e00000| Untracked 
|   1|0x0000000601000000, 0x0000000601000000, 0x0000000601200000|  0%| F|  |TAMS 0x0000000601000000, 0x0000000601000000| Untracked 
|   2|0x0000000601200000, 0x0000000601200000, 0x0000000601400000|  0%| F|  |TAMS 0x0000000601200000, 0x0000000601200000| Untracked 
|   3|0x0000000601400000, 0x0000000601400000, 0x0000000601600000|  0%| F|  |TAMS 0x0000000601400000, 0x0000000601400000| Untracked 
|   4|0x0000000601600000, 0x0000000601600000, 0x0000000601800000|  0%| F|  |TAMS 0x0000000601600000, 0x0000000601600000| Untracked 
|   5|0x0000000601800000, 0x0000000601800000, 0x0000000601a00000|  0%| F|  |TAMS 0x0000000601800000, 0x0000000601800000| Untracked 
|   6|0x0000000601a00000, 0x0000000601a00000, 0x0000000601c00000|  0%| F|  |TAMS 0x0000000601a00000, 0x0000000601a00000| Untracked 
|   7|0x0000000601c00000, 0x0000000601c00000, 0x0000000601e00000|  0%| F|  |TAMS 0x0000000601c00000, 0x0000000601c00000| Untracked 
|   8|0x0000000601e00000, 0x0000000601e00000, 0x0000000602000000|  0%| F|  |TAMS 0x0000000601e00000, 0x0000000601e00000| Untracked 
|   9|0x0000000602000000, 0x0000000602000000, 0x0000000602200000|  0%| F|  |TAMS 0x0000000602000000, 0x0000000602000000| Untracked 
|  10|0x0000000602200000, 0x0000000602200000, 0x0000000602400000|  0%| F|  |TAMS 0x0000000602200000, 0x0000000602200000| Untracked 
|  11|0x0000000602400000, 0x0000000602400000, 0x0000000602600000|  0%| F|  |TAMS 0x0000000602400000, 0x0000000602400000| Untracked 
|  12|0x0000000602600000, 0x0000000602600000, 0x0000000602800000|  0%| F|  |TAMS 0x0000000602600000, 0x0000000602600000| Untracked 
|  13|0x0000000602800000, 0x0000000602800000, 0x0000000602a00000|  0%| F|  |TAMS 0x0000000602800000, 0x0000000602800000| Untracked 
|  14|0x0000000602a00000, 0x0000000602a00000, 0x0000000602c00000|  0%| F|  |TAMS 0x0000000602a00000, 0x0000000602a00000| Untracked 
|  15|0x0000000602c00000, 0x0000000602c00000, 0x0000000602e00000|  0%| F|  |TAMS 0x0000000602c00000, 0x0000000602c00000| Untracked 
|  16|0x0000000602e00000, 0x0000000602e00000, 0x0000000603000000|  0%| F|  |TAMS 0x0000000602e00000, 0x0000000602e00000| Untracked 
|  17|0x0000000603000000, 0x0000000603000000, 0x0000000603200000|  0%| F|  |TAMS 0x0000000603000000, 0x0000000603000000| Untracked 
|  18|0x0000000603200000, 0x0000000603200000, 0x0000000603400000|  0%| F|  |TAMS 0x0000000603200000, 0x0000000603200000| Untracked 
|  19|0x0000000603400000, 0x0000000603400000, 0x0000000603600000|  0%| F|  |TAMS 0x0000000603400000, 0x0000000603400000| Untracked 
|  20|0x0000000603600000, 0x0000000603600000, 0x0000000603800000|  0%| F|  |TAMS 0x0000000603600000, 0x0000000603600000| Untracked 
|  21|0x0000000603800000, 0x0000000603800000, 0x0000000603a00000|  0%| F|  |TAMS 0x0000000603800000, 0x0000000603800000| Untracked 
|  22|0x0000000603a00000, 0x0000000603a00000, 0x0000000603c00000|  0%| F|  |TAMS 0x0000000603a00000, 0x0000000603a00000| Untracked 
|  23|0x0000000603c00000, 0x0000000603c00000, 0x0000000603e00000|  0%| F|  |TAMS 0x0000000603c00000, 0x0000000603c00000| Untracked 
|  24|0x0000000603e00000, 0x0000000603e00000, 0x0000000604000000|  0%| F|  |TAMS 0x0000000603e00000, 0x0000000603e00000| Untracked 
|  25|0x0000000604000000, 0x0000000604000000, 0x0000000604200000|  0%| F|  |TAMS 0x0000000604000000, 0x0000000604000000| Untracked 
|  26|0x0000000604200000, 0x0000000604200000, 0x0000000604400000|  0%| F|  |TAMS 0x0000000604200000, 0x0000000604200000| Untracked 
|  27|0x0000000604400000, 0x0000000604400000, 0x0000000604600000|  0%| F|  |TAMS 0x0000000604400000, 0x0000000604400000| Untracked 
|  28|0x0000000604600000, 0x0000000604600000, 0x0000000604800000|  0%| F|  |TAMS 0x0000000604600000, 0x0000000604600000| Untracked 
|  29|0x0000000604800000, 0x0000000604800000, 0x0000000604a00000|  0%| F|  |TAMS 0x0000000604800000, 0x0000000604800000| Untracked 
|  30|0x0000000604a00000, 0x0000000604a00000, 0x0000000604c00000|  0%| F|  |TAMS 0x0000000604a00000, 0x0000000604a00000| Untracked 
|  31|0x0000000604c00000, 0x0000000604c00000, 0x0000000604e00000|  0%| F|  |TAMS 0x0000000604c00000, 0x0000000604c00000| Untracked 
|  32|0x0000000604e00000, 0x0000000604e00000, 0x0000000605000000|  0%| F|  |TAMS 0x0000000604e00000, 0x0000000604e00000| Untracked 
|  33|0x0000000605000000, 0x0000000605000000, 0x0000000605200000|  0%| F|  |TAMS 0x0000000605000000, 0x0000000605000000| Untracked 
|  34|0x0000000605200000, 0x0000000605200000, 0x0000000605400000|  0%| F|  |TAMS 0x0000000605200000, 0x0000000605200000| Untracked 
|  35|0x0000000605400000, 0x0000000605400000, 0x0000000605600000|  0%| F|  |TAMS 0x0000000605400000, 0x0000000605400000| Untracked 
|  36|0x0000000605600000, 0x0000000605600000, 0x0000000605800000|  0%| F|  |TAMS 0x0000000605600000, 0x0000000605600000| Untracked 
|  37|0x0000000605800000, 0x0000000605800000, 0x0000000605a00000|  0%| F|  |TAMS 0x0000000605800000, 0x0000000605800000| Untracked 
|  38|0x0000000605a00000, 0x0000000605a00000, 0x0000000605c00000|  0%| F|  |TAMS 0x0000000605a00000, 0x0000000605a00000| Untracked 
|  39|0x0000000605c00000, 0x0000000605c00000, 0x0000000605e00000|  0%| F|  |TAMS 0x0000000605c00000, 0x0000000605c00000| Untracked 
|  40|0x0000000605e00000, 0x0000000605e00000, 0x0000000606000000|  0%| F|  |TAMS 0x0000000605e00000, 0x0000000605e00000| Untracked 
|  41|0x0000000606000000, 0x0000000606000000, 0x0000000606200000|  0%| F|  |TAMS 0x0000000606000000, 0x0000000606000000| Untracked 
|  42|0x0000000606200000, 0x0000000606200000, 0x0000000606400000|  0%| F|  |TAMS 0x0000000606200000, 0x0000000606200000| Untracked 
|  43|0x0000000606400000, 0x0000000606400000, 0x0000000606600000|  0%| F|  |TAMS 0x0000000606400000, 0x0000000606400000| Untracked 
|  44|0x0000000606600000, 0x0000000606600000, 0x0000000606800000|  0%| F|  |TAMS 0x0000000606600000, 0x0000000606600000| Untracked 
|  45|0x0000000606800000, 0x0000000606800000, 0x0000000606a00000|  0%| F|  |TAMS 0x0000000606800000, 0x0000000606800000| Untracked 
|  46|0x0000000606a00000, 0x0000000606a00000, 0x0000000606c00000|  0%| F|  |TAMS 0x0000000606a00000, 0x0000000606a00000| Untracked 
|  47|0x0000000606c00000, 0x0000000606c00000, 0x0000000606e00000|  0%| F|  |TAMS 0x0000000606c00000, 0x0000000606c00000| Untracked 
|  48|0x0000000606e00000, 0x0000000606e00000, 0x0000000607000000|  0%| F|  |TAMS 0x0000000606e00000, 0x0000000606e00000| Untracked 
|  49|0x0000000607000000, 0x0000000607000000, 0x0000000607200000|  0%| F|  |TAMS 0x0000000607000000, 0x0000000607000000| Untracked 
|  50|0x0000000607200000, 0x0000000607200000, 0x0000000607400000|  0%| F|  |TAMS 0x0000000607200000, 0x0000000607200000| Untracked 
|  51|0x0000000607400000, 0x0000000607400000, 0x0000000607600000|  0%| F|  |TAMS 0x0000000607400000, 0x0000000607400000| Untracked 
|  52|0x0000000607600000, 0x0000000607600000, 0x0000000607800000|  0%| F|  |TAMS 0x0000000607600000, 0x0000000607600000| Untracked 
|  53|0x0000000607800000, 0x0000000607800000, 0x0000000607a00000|  0%| F|  |TAMS 0x0000000607800000, 0x0000000607800000| Untracked 
|  54|0x0000000607a00000, 0x0000000607a00000, 0x0000000607c00000|  0%| F|  |TAMS 0x0000000607a00000, 0x0000000607a00000| Untracked 
|  55|0x0000000607c00000, 0x0000000607c00000, 0x0000000607e00000|  0%| F|  |TAMS 0x0000000607c00000, 0x0000000607c00000| Untracked 
|  56|0x0000000607e00000, 0x0000000607e00000, 0x0000000608000000|  0%| F|  |TAMS 0x0000000607e00000, 0x0000000607e00000| Untracked 
|  57|0x0000000608000000, 0x0000000608000000, 0x0000000608200000|  0%| F|  |TAMS 0x0000000608000000, 0x0000000608000000| Untracked 
|  58|0x0000000608200000, 0x0000000608200000, 0x0000000608400000|  0%| F|  |TAMS 0x0000000608200000, 0x0000000608200000| Untracked 
|  59|0x0000000608400000, 0x0000000608400000, 0x0000000608600000|  0%| F|  |TAMS 0x0000000608400000, 0x0000000608400000| Untracked 
|  60|0x0000000608600000, 0x0000000608600000, 0x0000000608800000|  0%| F|  |TAMS 0x0000000608600000, 0x0000000608600000| Untracked 
|  61|0x0000000608800000, 0x0000000608800000, 0x0000000608a00000|  0%| F|  |TAMS 0x0000000608800000, 0x0000000608800000| Untracked 
|  62|0x0000000608a00000, 0x0000000608a00000, 0x0000000608c00000|  0%| F|  |TAMS 0x0000000608a00000, 0x0000000608a00000| Untracked 
|  63|0x0000000608c00000, 0x0000000608c00000, 0x0000000608e00000|  0%| F|  |TAMS 0x0000000608c00000, 0x0000000608c00000| Untracked 
|  64|0x0000000608e00000, 0x0000000608e00000, 0x0000000609000000|  0%| F|  |TAMS 0x0000000608e00000, 0x0000000608e00000| Untracked 
|  65|0x0000000609000000, 0x0000000609000000, 0x0000000609200000|  0%| F|  |TAMS 0x0000000609000000, 0x0000000609000000| Untracked 
|  66|0x0000000609200000, 0x0000000609200000, 0x0000000609400000|  0%| F|  |TAMS 0x0000000609200000, 0x0000000609200000| Untracked 
|  67|0x0000000609400000, 0x0000000609400000, 0x0000000609600000|  0%| F|  |TAMS 0x0000000609400000, 0x0000000609400000| Untracked 
|  68|0x0000000609600000, 0x0000000609600000, 0x0000000609800000|  0%| F|  |TAMS 0x0000000609600000, 0x0000000609600000| Untracked 
|  69|0x0000000609800000, 0x0000000609800000, 0x0000000609a00000|  0%| F|  |TAMS 0x0000000609800000, 0x0000000609800000| Untracked 
|  70|0x0000000609a00000, 0x0000000609a00000, 0x0000000609c00000|  0%| F|  |TAMS 0x0000000609a00000, 0x0000000609a00000| Untracked 
|  71|0x0000000609c00000, 0x0000000609c00000, 0x0000000609e00000|  0%| F|  |TAMS 0x0000000609c00000, 0x0000000609c00000| Untracked 
|  72|0x0000000609e00000, 0x0000000609e00000, 0x000000060a000000|  0%| F|  |TAMS 0x0000000609e00000, 0x0000000609e00000| Untracked 
|  73|0x000000060a000000, 0x000000060a000000, 0x000000060a200000|  0%| F|  |TAMS 0x000000060a000000, 0x000000060a000000| Untracked 
|  74|0x000000060a200000, 0x000000060a200000, 0x000000060a400000|  0%| F|  |TAMS 0x000000060a200000, 0x000000060a200000| Untracked 
|  75|0x000000060a400000, 0x000000060a400000, 0x000000060a600000|  0%| F|  |TAMS 0x000000060a400000, 0x000000060a400000| Untracked 
|  76|0x000000060a600000, 0x000000060a600000, 0x000000060a800000|  0%| F|  |TAMS 0x000000060a600000, 0x000000060a600000| Untracked 
|  77|0x000000060a800000, 0x000000060a800000, 0x000000060aa00000|  0%| F|  |TAMS 0x000000060a800000, 0x000000060a800000| Untracked 
|  78|0x000000060aa00000, 0x000000060aa00000, 0x000000060ac00000|  0%| F|  |TAMS 0x000000060aa00000, 0x000000060aa00000| Untracked 
|  79|0x000000060ac00000, 0x000000060ac00000, 0x000000060ae00000|  0%| F|  |TAMS 0x000000060ac00000, 0x000000060ac00000| Untracked 
|  80|0x000000060ae00000, 0x000000060ae00000, 0x000000060b000000|  0%| F|  |TAMS 0x000000060ae00000, 0x000000060ae00000| Untracked 
|  81|0x000000060b000000, 0x000000060b000000, 0x000000060b200000|  0%| F|  |TAMS 0x000000060b000000, 0x000000060b000000| Untracked 
|  82|0x000000060b200000, 0x000000060b200000, 0x000000060b400000|  0%| F|  |TAMS 0x000000060b200000, 0x000000060b200000| Untracked 
|  83|0x000000060b400000, 0x000000060b400000, 0x000000060b600000|  0%| F|  |TAMS 0x000000060b400000, 0x000000060b400000| Untracked 
|  84|0x000000060b600000, 0x000000060b600000, 0x000000060b800000|  0%| F|  |TAMS 0x000000060b600000, 0x000000060b600000| Untracked 
|  85|0x000000060b800000, 0x000000060b800000, 0x000000060ba00000|  0%| F|  |TAMS 0x000000060b800000, 0x000000060b800000| Untracked 
|  86|0x000000060ba00000, 0x000000060ba00000, 0x000000060bc00000|  0%| F|  |TAMS 0x000000060ba00000, 0x000000060ba00000| Untracked 
|  87|0x000000060bc00000, 0x000000060bc00000, 0x000000060be00000|  0%| F|  |TAMS 0x000000060bc00000, 0x000000060bc00000| Untracked 
|  88|0x000000060be00000, 0x000000060be00000, 0x000000060c000000|  0%| F|  |TAMS 0x000000060be00000, 0x000000060be00000| Untracked 
|  89|0x000000060c000000, 0x000000060c000000, 0x000000060c200000|  0%| F|  |TAMS 0x000000060c000000, 0x000000060c000000| Untracked 
|  90|0x000000060c200000, 0x000000060c200000, 0x000000060c400000|  0%| F|  |TAMS 0x000000060c200000, 0x000000060c200000| Untracked 
|  91|0x000000060c400000, 0x000000060c400000, 0x000000060c600000|  0%| F|  |TAMS 0x000000060c400000, 0x000000060c400000| Untracked 
|  92|0x000000060c600000, 0x000000060c600000, 0x000000060c800000|  0%| F|  |TAMS 0x000000060c600000, 0x000000060c600000| Untracked 
|  93|0x000000060c800000, 0x000000060c800000, 0x000000060ca00000|  0%| F|  |TAMS 0x000000060c800000, 0x000000060c800000| Untracked 
|  94|0x000000060ca00000, 0x000000060ca00000, 0x000000060cc00000|  0%| F|  |TAMS 0x000000060ca00000, 0x000000060ca00000| Untracked 
|  95|0x000000060cc00000, 0x000000060cc00000, 0x000000060ce00000|  0%| F|  |TAMS 0x000000060cc00000, 0x000000060cc00000| Untracked 
|  96|0x000000060ce00000, 0x000000060ce00000, 0x000000060d000000|  0%| F|  |TAMS 0x000000060ce00000, 0x000000060ce00000| Untracked 
|  97|0x000000060d000000, 0x000000060d000000, 0x000000060d200000|  0%| F|  |TAMS 0x000000060d000000, 0x000000060d000000| Untracked 
|  98|0x000000060d200000, 0x000000060d200000, 0x000000060d400000|  0%| F|  |TAMS 0x000000060d200000, 0x000000060d200000| Untracked 
|  99|0x000000060d400000, 0x000000060d400000, 0x000000060d600000|  0%| F|  |TAMS 0x000000060d400000, 0x000000060d400000| Untracked 
| 100|0x000000060d600000, 0x000000060d600000, 0x000000060d800000|  0%| F|  |TAMS 0x000000060d600000, 0x000000060d600000| Untracked 
| 101|0x000000060d800000, 0x000000060d800000, 0x000000060da00000|  0%| F|  |TAMS 0x000000060d800000, 0x000000060d800000| Untracked 
| 102|0x000000060da00000, 0x000000060da00000, 0x000000060dc00000|  0%| F|  |TAMS 0x000000060da00000, 0x000000060da00000| Untracked 
| 103|0x000000060dc00000, 0x000000060dc00000, 0x000000060de00000|  0%| F|  |TAMS 0x000000060dc00000, 0x000000060dc00000| Untracked 
| 104|0x000000060de00000, 0x000000060de00000, 0x000000060e000000|  0%| F|  |TAMS 0x000000060de00000, 0x000000060de00000| Untracked 
| 105|0x000000060e000000, 0x000000060e000000, 0x000000060e200000|  0%| F|  |TAMS 0x000000060e000000, 0x000000060e000000| Untracked 
| 106|0x000000060e200000, 0x000000060e200000, 0x000000060e400000|  0%| F|  |TAMS 0x000000060e200000, 0x000000060e200000| Untracked 
| 107|0x000000060e400000, 0x000000060e400000, 0x000000060e600000|  0%| F|  |TAMS 0x000000060e400000, 0x000000060e400000| Untracked 
| 108|0x000000060e600000, 0x000000060e600000, 0x000000060e800000|  0%| F|  |TAMS 0x000000060e600000, 0x000000060e600000| Untracked 
| 109|0x000000060e800000, 0x000000060e800000, 0x000000060ea00000|  0%| F|  |TAMS 0x000000060e800000, 0x000000060e800000| Untracked 
| 110|0x000000060ea00000, 0x000000060ea00000, 0x000000060ec00000|  0%| F|  |TAMS 0x000000060ea00000, 0x000000060ea00000| Untracked 
| 111|0x000000060ec00000, 0x000000060ec00000, 0x000000060ee00000|  0%| F|  |TAMS 0x000000060ec00000, 0x000000060ec00000| Untracked 
| 112|0x000000060ee00000, 0x000000060ee00000, 0x000000060f000000|  0%| F|  |TAMS 0x000000060ee00000, 0x000000060ee00000| Untracked 
| 113|0x000000060f000000, 0x000000060f000000, 0x000000060f200000|  0%| F|  |TAMS 0x000000060f000000, 0x000000060f000000| Untracked 
| 114|0x000000060f200000, 0x000000060f200000, 0x000000060f400000|  0%| F|  |TAMS 0x000000060f200000, 0x000000060f200000| Untracked 
| 115|0x000000060f400000, 0x000000060f400000, 0x000000060f600000|  0%| F|  |TAMS 0x000000060f400000, 0x000000060f400000| Untracked 
| 116|0x000000060f600000, 0x000000060f600000, 0x000000060f800000|  0%| F|  |TAMS 0x000000060f600000, 0x000000060f600000| Untracked 
| 117|0x000000060f800000, 0x000000060f800000, 0x000000060fa00000|  0%| F|  |TAMS 0x000000060f800000, 0x000000060f800000| Untracked 
| 118|0x000000060fa00000, 0x000000060fa00000, 0x000000060fc00000|  0%| F|  |TAMS 0x000000060fa00000, 0x000000060fa00000| Untracked 
| 119|0x000000060fc00000, 0x000000060fc00000, 0x000000060fe00000|  0%| F|  |TAMS 0x000000060fc00000, 0x000000060fc00000| Untracked 
| 120|0x000000060fe00000, 0x000000060fe00000, 0x0000000610000000|  0%| F|  |TAMS 0x000000060fe00000, 0x000000060fe00000| Untracked 
| 121|0x0000000610000000, 0x0000000610000000, 0x0000000610200000|  0%| F|  |TAMS 0x0000000610000000, 0x0000000610000000| Untracked 
| 122|0x0000000610200000, 0x0000000610200000, 0x0000000610400000|  0%| F|  |TAMS 0x0000000610200000, 0x0000000610200000| Untracked 
| 123|0x0000000610400000, 0x0000000610400000, 0x0000000610600000|  0%| F|  |TAMS 0x0000000610400000, 0x0000000610400000| Untracked 
| 124|0x0000000610600000, 0x0000000610600000, 0x0000000610800000|  0%| F|  |TAMS 0x0000000610600000, 0x0000000610600000| Untracked 
| 125|0x0000000610800000, 0x0000000610800000, 0x0000000610a00000|  0%| F|  |TAMS 0x0000000610800000, 0x0000000610800000| Untracked 
| 126|0x0000000610a00000, 0x0000000610a00000, 0x0000000610c00000|  0%| F|  |TAMS 0x0000000610a00000, 0x0000000610a00000| Untracked 
| 127|0x0000000610c00000, 0x0000000610c00000, 0x0000000610e00000|  0%| F|  |TAMS 0x0000000610c00000, 0x0000000610c00000| Untracked 
| 128|0x0000000610e00000, 0x0000000610e00000, 0x0000000611000000|  0%| F|  |TAMS 0x0000000610e00000, 0x0000000610e00000| Untracked 
| 129|0x0000000611000000, 0x0000000611000000, 0x0000000611200000|  0%| F|  |TAMS 0x0000000611000000, 0x0000000611000000| Untracked 
| 130|0x0000000611200000, 0x0000000611200000, 0x0000000611400000|  0%| F|  |TAMS 0x0000000611200000, 0x0000000611200000| Untracked 
| 131|0x0000000611400000, 0x0000000611400000, 0x0000000611600000|  0%| F|  |TAMS 0x0000000611400000, 0x0000000611400000| Untracked 
| 132|0x0000000611600000, 0x0000000611600000, 0x0000000611800000|  0%| F|  |TAMS 0x0000000611600000, 0x0000000611600000| Untracked 
| 133|0x0000000611800000, 0x0000000611800000, 0x0000000611a00000|  0%| F|  |TAMS 0x0000000611800000, 0x0000000611800000| Untracked 
| 134|0x0000000611a00000, 0x0000000611a00000, 0x0000000611c00000|  0%| F|  |TAMS 0x0000000611a00000, 0x0000000611a00000| Untracked 
| 135|0x0000000611c00000, 0x0000000611c00000, 0x0000000611e00000|  0%| F|  |TAMS 0x0000000611c00000, 0x0000000611c00000| Untracked 
| 136|0x0000000611e00000, 0x0000000611e00000, 0x0000000612000000|  0%| F|  |TAMS 0x0000000611e00000, 0x0000000611e00000| Untracked 
| 137|0x0000000612000000, 0x0000000612000000, 0x0000000612200000|  0%| F|  |TAMS 0x0000000612000000, 0x0000000612000000| Untracked 
| 138|0x0000000612200000, 0x0000000612200000, 0x0000000612400000|  0%| F|  |TAMS 0x0000000612200000, 0x0000000612200000| Untracked 
| 139|0x0000000612400000, 0x0000000612400000, 0x0000000612600000|  0%| F|  |TAMS 0x0000000612400000, 0x0000000612400000| Untracked 
| 140|0x0000000612600000, 0x0000000612600000, 0x0000000612800000|  0%| F|  |TAMS 0x0000000612600000, 0x0000000612600000| Untracked 
| 141|0x0000000612800000, 0x0000000612800000, 0x0000000612a00000|  0%| F|  |TAMS 0x0000000612800000, 0x0000000612800000| Untracked 
| 142|0x0000000612a00000, 0x0000000612a00000, 0x0000000612c00000|  0%| F|  |TAMS 0x0000000612a00000, 0x0000000612a00000| Untracked 
| 143|0x0000000612c00000, 0x0000000612c00000, 0x0000000612e00000|  0%| F|  |TAMS 0x0000000612c00000, 0x0000000612c00000| Untracked 
| 144|0x0000000612e00000, 0x0000000612e00000, 0x0000000613000000|  0%| F|  |TAMS 0x0000000612e00000, 0x0000000612e00000| Untracked 
| 145|0x0000000613000000, 0x0000000613000000, 0x0000000613200000|  0%| F|  |TAMS 0x0000000613000000, 0x0000000613000000| Untracked 
| 146|0x0000000613200000, 0x0000000613200000, 0x0000000613400000|  0%| F|  |TAMS 0x0000000613200000, 0x0000000613200000| Untracked 
| 147|0x0000000613400000, 0x0000000613400000, 0x0000000613600000|  0%| F|  |TAMS 0x0000000613400000, 0x0000000613400000| Untracked 
| 148|0x0000000613600000, 0x0000000613600000, 0x0000000613800000|  0%| F|  |TAMS 0x0000000613600000, 0x0000000613600000| Untracked 
| 149|0x0000000613800000, 0x0000000613800000, 0x0000000613a00000|  0%| F|  |TAMS 0x0000000613800000, 0x0000000613800000| Untracked 
| 150|0x0000000613a00000, 0x0000000613a00000, 0x0000000613c00000|  0%| F|  |TAMS 0x0000000613a00000, 0x0000000613a00000| Untracked 
| 151|0x0000000613c00000, 0x0000000613c00000, 0x0000000613e00000|  0%| F|  |TAMS 0x0000000613c00000, 0x0000000613c00000| Untracked 
| 152|0x0000000613e00000, 0x0000000613e00000, 0x0000000614000000|  0%| F|  |TAMS 0x0000000613e00000, 0x0000000613e00000| Untracked 
| 153|0x0000000614000000, 0x0000000614000000, 0x0000000614200000|  0%| F|  |TAMS 0x0000000614000000, 0x0000000614000000| Untracked 
| 154|0x0000000614200000, 0x0000000614200000, 0x0000000614400000|  0%| F|  |TAMS 0x0000000614200000, 0x0000000614200000| Untracked 
| 155|0x0000000614400000, 0x0000000614400000, 0x0000000614600000|  0%| F|  |TAMS 0x0000000614400000, 0x0000000614400000| Untracked 
| 156|0x0000000614600000, 0x0000000614600000, 0x0000000614800000|  0%| F|  |TAMS 0x0000000614600000, 0x0000000614600000| Untracked 
| 157|0x0000000614800000, 0x0000000614800000, 0x0000000614a00000|  0%| F|  |TAMS 0x0000000614800000, 0x0000000614800000| Untracked 
| 158|0x0000000614a00000, 0x0000000614a00000, 0x0000000614c00000|  0%| F|  |TAMS 0x0000000614a00000, 0x0000000614a00000| Untracked 
| 159|0x0000000614c00000, 0x0000000614c00000, 0x0000000614e00000|  0%| F|  |TAMS 0x0000000614c00000, 0x0000000614c00000| Untracked 
| 160|0x0000000614e00000, 0x0000000614e00000, 0x0000000615000000|  0%| F|  |TAMS 0x0000000614e00000, 0x0000000614e00000| Untracked 
| 161|0x0000000615000000, 0x0000000615000000, 0x0000000615200000|  0%| F|  |TAMS 0x0000000615000000, 0x0000000615000000| Untracked 
| 162|0x0000000615200000, 0x0000000615200000, 0x0000000615400000|  0%| F|  |TAMS 0x0000000615200000, 0x0000000615200000| Untracked 
| 163|0x0000000615400000, 0x0000000615400000, 0x0000000615600000|  0%| F|  |TAMS 0x0000000615400000, 0x0000000615400000| Untracked 
| 164|0x0000000615600000, 0x0000000615600000, 0x0000000615800000|  0%| F|  |TAMS 0x0000000615600000, 0x0000000615600000| Untracked 
| 165|0x0000000615800000, 0x0000000615800000, 0x0000000615a00000|  0%| F|  |TAMS 0x0000000615800000, 0x0000000615800000| Untracked 
| 166|0x0000000615a00000, 0x0000000615a00000, 0x0000000615c00000|  0%| F|  |TAMS 0x0000000615a00000, 0x0000000615a00000| Untracked 
| 167|0x0000000615c00000, 0x0000000615c00000, 0x0000000615e00000|  0%| F|  |TAMS 0x0000000615c00000, 0x0000000615c00000| Untracked 
| 168|0x0000000615e00000, 0x0000000615e00000, 0x0000000616000000|  0%| F|  |TAMS 0x0000000615e00000, 0x0000000615e00000| Untracked 
| 169|0x0000000616000000, 0x0000000616000000, 0x0000000616200000|  0%| F|  |TAMS 0x0000000616000000, 0x0000000616000000| Untracked 
| 170|0x0000000616200000, 0x0000000616200000, 0x0000000616400000|  0%| F|  |TAMS 0x0000000616200000, 0x0000000616200000| Untracked 
| 171|0x0000000616400000, 0x0000000616400000, 0x0000000616600000|  0%| F|  |TAMS 0x0000000616400000, 0x0000000616400000| Untracked 
| 172|0x0000000616600000, 0x0000000616600000, 0x0000000616800000|  0%| F|  |TAMS 0x0000000616600000, 0x0000000616600000| Untracked 
| 173|0x0000000616800000, 0x0000000616800000, 0x0000000616a00000|  0%| F|  |TAMS 0x0000000616800000, 0x0000000616800000| Untracked 
| 174|0x0000000616a00000, 0x0000000616a00000, 0x0000000616c00000|  0%| F|  |TAMS 0x0000000616a00000, 0x0000000616a00000| Untracked 
| 175|0x0000000616c00000, 0x0000000616c00000, 0x0000000616e00000|  0%| F|  |TAMS 0x0000000616c00000, 0x0000000616c00000| Untracked 
| 176|0x0000000616e00000, 0x0000000616e00000, 0x0000000617000000|  0%| F|  |TAMS 0x0000000616e00000, 0x0000000616e00000| Untracked 
| 177|0x0000000617000000, 0x0000000617000000, 0x0000000617200000|  0%| F|  |TAMS 0x0000000617000000, 0x0000000617000000| Untracked 
| 178|0x0000000617200000, 0x0000000617200000, 0x0000000617400000|  0%| F|  |TAMS 0x0000000617200000, 0x0000000617200000| Untracked 
| 179|0x0000000617400000, 0x0000000617400000, 0x0000000617600000|  0%| F|  |TAMS 0x0000000617400000, 0x0000000617400000| Untracked 
| 180|0x0000000617600000, 0x0000000617600000, 0x0000000617800000|  0%| F|  |TAMS 0x0000000617600000, 0x0000000617600000| Untracked 
| 181|0x0000000617800000, 0x0000000617800000, 0x0000000617a00000|  0%| F|  |TAMS 0x0000000617800000, 0x0000000617800000| Untracked 
| 182|0x0000000617a00000, 0x0000000617a00000, 0x0000000617c00000|  0%| F|  |TAMS 0x0000000617a00000, 0x0000000617a00000| Untracked 
| 183|0x0000000617c00000, 0x0000000617c00000, 0x0000000617e00000|  0%| F|  |TAMS 0x0000000617c00000, 0x0000000617c00000| Untracked 
| 184|0x0000000617e00000, 0x0000000617e00000, 0x0000000618000000|  0%| F|  |TAMS 0x0000000617e00000, 0x0000000617e00000| Untracked 
| 185|0x0000000618000000, 0x0000000618000000, 0x0000000618200000|  0%| F|  |TAMS 0x0000000618000000, 0x0000000618000000| Untracked 
| 186|0x0000000618200000, 0x0000000618200000, 0x0000000618400000|  0%| F|  |TAMS 0x0000000618200000, 0x0000000618200000| Untracked 
| 187|0x0000000618400000, 0x0000000618400000, 0x0000000618600000|  0%| F|  |TAMS 0x0000000618400000, 0x0000000618400000| Untracked 
| 188|0x0000000618600000, 0x0000000618600000, 0x0000000618800000|  0%| F|  |TAMS 0x0000000618600000, 0x0000000618600000| Untracked 
| 189|0x0000000618800000, 0x0000000618800000, 0x0000000618a00000|  0%| F|  |TAMS 0x0000000618800000, 0x0000000618800000| Untracked 
| 190|0x0000000618a00000, 0x0000000618a00000, 0x0000000618c00000|  0%| F|  |TAMS 0x0000000618a00000, 0x0000000618a00000| Untracked 
| 191|0x0000000618c00000, 0x0000000618c00000, 0x0000000618e00000|  0%| F|  |TAMS 0x0000000618c00000, 0x0000000618c00000| Untracked 
| 192|0x0000000618e00000, 0x0000000618e00000, 0x0000000619000000|  0%| F|  |TAMS 0x0000000618e00000, 0x0000000618e00000| Untracked 
| 193|0x0000000619000000, 0x0000000619000000, 0x0000000619200000|  0%| F|  |TAMS 0x0000000619000000, 0x0000000619000000| Untracked 
| 194|0x0000000619200000, 0x0000000619200000, 0x0000000619400000|  0%| F|  |TAMS 0x0000000619200000, 0x0000000619200000| Untracked 
| 195|0x0000000619400000, 0x0000000619400000, 0x0000000619600000|  0%| F|  |TAMS 0x0000000619400000, 0x0000000619400000| Untracked 
| 196|0x0000000619600000, 0x0000000619600000, 0x0000000619800000|  0%| F|  |TAMS 0x0000000619600000, 0x0000000619600000| Untracked 
| 197|0x0000000619800000, 0x0000000619800000, 0x0000000619a00000|  0%| F|  |TAMS 0x0000000619800000, 0x0000000619800000| Untracked 
| 198|0x0000000619a00000, 0x0000000619a00000, 0x0000000619c00000|  0%| F|  |TAMS 0x0000000619a00000, 0x0000000619a00000| Untracked 
| 199|0x0000000619c00000, 0x0000000619c00000, 0x0000000619e00000|  0%| F|  |TAMS 0x0000000619c00000, 0x0000000619c00000| Untracked 
| 200|0x0000000619e00000, 0x0000000619e00000, 0x000000061a000000|  0%| F|  |TAMS 0x0000000619e00000, 0x0000000619e00000| Untracked 
| 201|0x000000061a000000, 0x000000061a000000, 0x000000061a200000|  0%| F|  |TAMS 0x000000061a000000, 0x000000061a000000| Untracked 
| 202|0x000000061a200000, 0x000000061a200000, 0x000000061a400000|  0%| F|  |TAMS 0x000000061a200000, 0x000000061a200000| Untracked 
| 203|0x000000061a400000, 0x000000061a400000, 0x000000061a600000|  0%| F|  |TAMS 0x000000061a400000, 0x000000061a400000| Untracked 
| 204|0x000000061a600000, 0x000000061a600000, 0x000000061a800000|  0%| F|  |TAMS 0x000000061a600000, 0x000000061a600000| Untracked 
| 205|0x000000061a800000, 0x000000061a800000, 0x000000061aa00000|  0%| F|  |TAMS 0x000000061a800000, 0x000000061a800000| Untracked 
| 206|0x000000061aa00000, 0x000000061aa00000, 0x000000061ac00000|  0%| F|  |TAMS 0x000000061aa00000, 0x000000061aa00000| Untracked 
| 207|0x000000061ac00000, 0x000000061ac00000, 0x000000061ae00000|  0%| F|  |TAMS 0x000000061ac00000, 0x000000061ac00000| Untracked 
| 208|0x000000061ae00000, 0x000000061ae00000, 0x000000061b000000|  0%| F|  |TAMS 0x000000061ae00000, 0x000000061ae00000| Untracked 
| 209|0x000000061b000000, 0x000000061b000000, 0x000000061b200000|  0%| F|  |TAMS 0x000000061b000000, 0x000000061b000000| Untracked 
| 210|0x000000061b200000, 0x000000061b200000, 0x000000061b400000|  0%| F|  |TAMS 0x000000061b200000, 0x000000061b200000| Untracked 
| 211|0x000000061b400000, 0x000000061b400000, 0x000000061b600000|  0%| F|  |TAMS 0x000000061b400000, 0x000000061b400000| Untracked 
| 212|0x000000061b600000, 0x000000061b600000, 0x000000061b800000|  0%| F|  |TAMS 0x000000061b600000, 0x000000061b600000| Untracked 
| 213|0x000000061b800000, 0x000000061b800000, 0x000000061ba00000|  0%| F|  |TAMS 0x000000061b800000, 0x000000061b800000| Untracked 
| 214|0x000000061ba00000, 0x000000061ba00000, 0x000000061bc00000|  0%| F|  |TAMS 0x000000061ba00000, 0x000000061ba00000| Untracked 
| 215|0x000000061bc00000, 0x000000061bc00000, 0x000000061be00000|  0%| F|  |TAMS 0x000000061bc00000, 0x000000061bc00000| Untracked 
| 216|0x000000061be00000, 0x000000061be00000, 0x000000061c000000|  0%| F|  |TAMS 0x000000061be00000, 0x000000061be00000| Untracked 
| 217|0x000000061c000000, 0x000000061c000000, 0x000000061c200000|  0%| F|  |TAMS 0x000000061c000000, 0x000000061c000000| Untracked 
| 218|0x000000061c200000, 0x000000061c200000, 0x000000061c400000|  0%| F|  |TAMS 0x000000061c200000, 0x000000061c200000| Untracked 
| 219|0x000000061c400000, 0x000000061c400000, 0x000000061c600000|  0%| F|  |TAMS 0x000000061c400000, 0x000000061c400000| Untracked 
| 220|0x000000061c600000, 0x000000061c600000, 0x000000061c800000|  0%| F|  |TAMS 0x000000061c600000, 0x000000061c600000| Untracked 
| 221|0x000000061c800000, 0x000000061c800000, 0x000000061ca00000|  0%| F|  |TAMS 0x000000061c800000, 0x000000061c800000| Untracked 
| 222|0x000000061ca00000, 0x000000061ca00000, 0x000000061cc00000|  0%| F|  |TAMS 0x000000061ca00000, 0x000000061ca00000| Untracked 
| 223|0x000000061cc00000, 0x000000061cc00000, 0x000000061ce00000|  0%| F|  |TAMS 0x000000061cc00000, 0x000000061cc00000| Untracked 
| 224|0x000000061ce00000, 0x000000061ce00000, 0x000000061d000000|  0%| F|  |TAMS 0x000000061ce00000, 0x000000061ce00000| Untracked 
| 225|0x000000061d000000, 0x000000061d000000, 0x000000061d200000|  0%| F|  |TAMS 0x000000061d000000, 0x000000061d000000| Untracked 
| 226|0x000000061d200000, 0x000000061d200000, 0x000000061d400000|  0%| F|  |TAMS 0x000000061d200000, 0x000000061d200000| Untracked 
| 227|0x000000061d400000, 0x000000061d400000, 0x000000061d600000|  0%| F|  |TAMS 0x000000061d400000, 0x000000061d400000| Untracked 
| 228|0x000000061d600000, 0x000000061d600000, 0x000000061d800000|  0%| F|  |TAMS 0x000000061d600000, 0x000000061d600000| Untracked 
| 229|0x000000061d800000, 0x000000061d800000, 0x000000061da00000|  0%| F|  |TAMS 0x000000061d800000, 0x000000061d800000| Untracked 
| 230|0x000000061da00000, 0x000000061da00000, 0x000000061dc00000|  0%| F|  |TAMS 0x000000061da00000, 0x000000061da00000| Untracked 
| 231|0x000000061dc00000, 0x000000061dc00000, 0x000000061de00000|  0%| F|  |TAMS 0x000000061dc00000, 0x000000061dc00000| Untracked 
| 232|0x000000061de00000, 0x000000061de00000, 0x000000061e000000|  0%| F|  |TAMS 0x000000061de00000, 0x000000061de00000| Untracked 
| 233|0x000000061e000000, 0x000000061e000000, 0x000000061e200000|  0%| F|  |TAMS 0x000000061e000000, 0x000000061e000000| Untracked 
| 234|0x000000061e200000, 0x000000061e200000, 0x000000061e400000|  0%| F|  |TAMS 0x000000061e200000, 0x000000061e200000| Untracked 
| 235|0x000000061e400000, 0x000000061e400000, 0x000000061e600000|  0%| F|  |TAMS 0x000000061e400000, 0x000000061e400000| Untracked 
| 236|0x000000061e600000, 0x000000061e600000, 0x000000061e800000|  0%| F|  |TAMS 0x000000061e600000, 0x000000061e600000| Untracked 
| 237|0x000000061e800000, 0x000000061e800000, 0x000000061ea00000|  0%| F|  |TAMS 0x000000061e800000, 0x000000061e800000| Untracked 
| 238|0x000000061ea00000, 0x000000061ea00000, 0x000000061ec00000|  0%| F|  |TAMS 0x000000061ea00000, 0x000000061ea00000| Untracked 
| 239|0x000000061ec00000, 0x000000061ec00000, 0x000000061ee00000|  0%| F|  |TAMS 0x000000061ec00000, 0x000000061ec00000| Untracked 
| 240|0x000000061ee00000, 0x000000061ee00000, 0x000000061f000000|  0%| F|  |TAMS 0x000000061ee00000, 0x000000061ee00000| Untracked 
| 241|0x000000061f000000, 0x000000061f000000, 0x000000061f200000|  0%| F|  |TAMS 0x000000061f000000, 0x000000061f000000| Untracked 
| 242|0x000000061f200000, 0x000000061f200000, 0x000000061f400000|  0%| F|  |TAMS 0x000000061f200000, 0x000000061f200000| Untracked 
| 243|0x000000061f400000, 0x000000061f400000, 0x000000061f600000|  0%| F|  |TAMS 0x000000061f400000, 0x000000061f400000| Untracked 
| 244|0x000000061f600000, 0x000000061f600000, 0x000000061f800000|  0%| F|  |TAMS 0x000000061f600000, 0x000000061f600000| Untracked 
| 245|0x000000061f800000, 0x000000061f800000, 0x000000061fa00000|  0%| F|  |TAMS 0x000000061f800000, 0x000000061f800000| Untracked 
| 246|0x000000061fa00000, 0x000000061fa00000, 0x000000061fc00000|  0%| F|  |TAMS 0x000000061fa00000, 0x000000061fa00000| Untracked 
| 247|0x000000061fc00000, 0x000000061fc00000, 0x000000061fe00000|  0%| F|  |TAMS 0x000000061fc00000, 0x000000061fc00000| Untracked 
| 248|0x000000061fe00000, 0x000000061fe00000, 0x0000000620000000|  0%| F|  |TAMS 0x000000061fe00000, 0x000000061fe00000| Untracked 
| 249|0x0000000620000000, 0x00000006200f6490, 0x0000000620200000| 48%| E|  |TAMS 0x0000000620000000, 0x0000000620000000| Complete 
| 250|0x0000000620200000, 0x0000000620400000, 0x0000000620400000|100%| E|CS|TAMS 0x0000000620200000, 0x0000000620200000| Complete 
| 251|0x0000000620400000, 0x0000000620600000, 0x0000000620600000|100%| E|CS|TAMS 0x0000000620400000, 0x0000000620400000| Complete 
| 252|0x0000000620600000, 0x0000000620800000, 0x0000000620800000|100%| E|CS|TAMS 0x0000000620600000, 0x0000000620600000| Complete 
| 253|0x0000000620800000, 0x0000000620a00000, 0x0000000620a00000|100%| E|CS|TAMS 0x0000000620800000, 0x0000000620800000| Complete 
| 254|0x0000000620a00000, 0x0000000620c00000, 0x0000000620c00000|100%| E|CS|TAMS 0x0000000620a00000, 0x0000000620a00000| Complete 
| 255|0x0000000620c00000, 0x0000000620e00000, 0x0000000620e00000|100%| E|CS|TAMS 0x0000000620c00000, 0x0000000620c00000| Complete 

Card table byte_map: [0x00007f37c7000000,0x00007f37c7ff9000] _byte_map_base: 0x00007f37c3ff9000

Marking Bits (Prev, Next): (CMBitMap*) 0x00007f37e40595a8, (CMBitMap*) 0x00007f37e40595e0
 Prev Bits: [0x00007f37be030000, 0x00007f37c5ff8000)
 Next Bits: [0x00007f37b6060000, 0x00007f37be028000)

Polling page: 0x00007f37ecea0000

Metaspace:

Usage:
  Non-class:     11.60 MB capacity,    11.35 MB ( 98%) used,   228.73 KB (  2%) free+waste,    33.81 KB ( <1%) overhead. 
      Class:      1.54 MB capacity,     1.38 MB ( 90%) used,   142.59 KB (  9%) free+waste,    17.50 KB (  1%) overhead. 
       Both:     13.14 MB capacity,    12.73 MB ( 97%) used,   371.32 KB (  3%) free+waste,    51.31 KB ( <1%) overhead. 

Virtual space:
  Non-class space:       12.00 MB reserved,      11.75 MB ( 98%) committed 
      Class space:        1.00 GB reserved,       1.62 MB ( <1%) committed 
             Both:        1.01 GB reserved,      13.38 MB (  1%) committed 

Chunk freelists:
   Non-Class:  23.00 KB
       Class:  26.00 KB
        Both:  49.00 KB

MaxMetaspaceSize: unlimited
CompressedClassSpaceSize: 1.00 GB

CodeHeap 'non-profiled nmethods': size=120032Kb used=339Kb max_used=339Kb free=119692Kb
 bounds [0x00007f37d40c8000, 0x00007f37d4338000, 0x00007f37db600000]
CodeHeap 'profiled nmethods': size=120032Kb used=1708Kb max_used=1708Kb free=118324Kb
 bounds [0x00007f37ccb90000, 0x00007f37cce00000, 0x00007f37d40c8000]
CodeHeap 'non-nmethods': size=5696Kb used=1106Kb max_used=1139Kb free=4589Kb
 bounds [0x00007f37cc600000, 0x00007f37cc870000, 0x00007f37ccb90000]
 total_blobs=1426 nmethods=987 adapters=352
 compilation: enabled
              stopped_count=0, restarted_count=0
 full_count=0

Compilation events (20 events):
Event: 0.954 Thread 0x00007f37e42e1000 nmethod 978 0x00007f37ccd34c90 code [0x00007f37ccd34e80, 0x00007f37ccd352c0]
Event: 0.954 Thread 0x00007f37e42e1000  976       3       sun.reflect.generics.parser.SignatureParser::advance (53 bytes)
Event: 0.954 Thread 0x00007f37e42e1000 nmethod 976 0x00007f37ccd35490 code [0x00007f37ccd35660, 0x00007f37ccd358b0]
Event: 0.954 Thread 0x00007f37e42e1000  977       3       java.lang.Character::isWhitespace (5 bytes)
Event: 0.954 Thread 0x00007f37e42e1000 nmethod 977 0x00007f37ccd35a10 code [0x00007f37ccd35be0, 0x00007f37ccd35e10]
Event: 0.954 Thread 0x00007f37e42e1000  982       3       java.lang.reflect.ProxyGenerator$ConstantPool::getIndirect (63 bytes)
Event: 0.954 Thread 0x00007f37e42e1000 nmethod 982 0x00007f37ccd35f10 code [0x00007f37ccd36160, 0x00007f37ccd369f0]
Event: 0.954 Thread 0x00007f37e42e1000  984       3       java.io.DataOutputStream::writeUTF (435 bytes)
Event: 0.956 Thread 0x00007f37e42e1000 nmethod 984 0x00007f37ccd36d10 code [0x00007f37ccd37160, 0x00007f37ccd39710]
Event: 0.956 Thread 0x00007f37e42e1000  983       3       java.lang.reflect.ProxyGenerator$ConstantPool$IndirectEntry::equals (49 bytes)
Event: 0.956 Thread 0x00007f37e42e1000 nmethod 983 0x00007f37ccd3a410 code [0x00007f37ccd3a5e0, 0x00007f37ccd3a9f0]
Event: 0.956 Thread 0x00007f37e42e1000  985       3       java.lang.CharacterDataLatin1::isWhitespace (23 bytes)
Event: 0.956 Thread 0x00007f37e42df000 nmethod 980 0x00007f37d411b710 code [0x00007f37d411b8c0, 0x00007f37d411bcd8]
Event: 0.956 Thread 0x00007f37e42e1000 nmethod 985 0x00007f37ccd3ab10 code [0x00007f37ccd3ace0, 0x00007f37ccd3aef0]
Event: 0.956 Thread 0x00007f37e42df000  981       4       java.lang.AbstractStringBuilder::<init> (39 bytes)
Event: 0.956 Thread 0x00007f37e42e1000  979       1       java.lang.invoke.MethodHandleImpl::isCompileConstant (2 bytes)
Event: 0.956 Thread 0x00007f37e42e1000 nmethod 979 0x00007f37d411be90 code [0x00007f37d411c040, 0x00007f37d411c0d0]
Event: 0.957 Thread 0x00007f37e42df000 nmethod 981 0x00007f37d411c110 code [0x00007f37d411c2a0, 0x00007f37d411c498]
Event: 1.223 Thread 0x00007f37e42df000  987       4       jdk.internal.org.objectweb.asm.ByteVector::put12 (64 bytes)
Event: 1.227 Thread 0x00007f37e42df000 nmethod 987 0x00007f37d411c790 code [0x00007f37d411c940, 0x00007f37d411cdb8]

GC Heap History (0 events):
No events

Deoptimization events (20 events):
Event: 0.169 Thread 0x00007f37e4016800 Uncommon trap: trap_request=0xffffff4d fr.pc=0x00007f37d40d1880 relative=0x0000000000000060
Event: 0.169 Thread 0x00007f37e4016800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007f37d40d1880 method=java.nio.Buffer.hasRemaining()Z @ 8 c2
Event: 0.169 Thread 0x00007f37e4016800 DEOPT PACKING pc=0x00007f37d40d1880 sp=0x00007f37eb2cf160
Event: 0.169 Thread 0x00007f37e4016800 DEOPT UNPACKING pc=0x00007f37cc6267a5 sp=0x00007f37eb2cf118 mode 2
Event: 0.210 Thread 0x00007f37e4016800 Uncommon trap: trap_request=0xffffff4d fr.pc=0x00007f37d40e708c relative=0x00000000000002cc
Event: 0.210 Thread 0x00007f37e4016800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007f37d40e708c method=java.io.BufferedReader.read()I @ 19 c2
Event: 0.210 Thread 0x00007f37e4016800 DEOPT PACKING pc=0x00007f37d40e708c sp=0x00007f37eb2cf300
Event: 0.210 Thread 0x00007f37e4016800 DEOPT UNPACKING pc=0x00007f37cc6267a5 sp=0x00007f37eb2cf248 mode 2
Event: 0.539 Thread 0x00007f37e4016800 Uncommon trap: trap_request=0xffffff4d fr.pc=0x00007f37d4115894 relative=0x0000000000000894
Event: 0.539 Thread 0x00007f37e4016800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007f37d4115894 method=java.util.zip.InflaterInputStream.read([BII)I @ 69 c2
Event: 0.539 Thread 0x00007f37e4016800 DEOPT PACKING pc=0x00007f37d4115894 sp=0x00007f37eb2cee80
Event: 0.539 Thread 0x00007f37e4016800 DEOPT UNPACKING pc=0x00007f37cc6267a5 sp=0x00007f37eb2cee40 mode 2
Event: 0.550 Thread 0x00007f37e4600800 Uncommon trap: trap_request=0xffffff4d fr.pc=0x00007f37d4118034 relative=0x0000000000000274
Event: 0.550 Thread 0x00007f37e4600800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007f37d4118034 method=java.util.concurrent.ConcurrentHashMap.get(Ljava/lang/Object;)Ljava/lang/Object; @ 86 c2
Event: 0.550 Thread 0x00007f37e4600800 DEOPT PACKING pc=0x00007f37d4118034 sp=0x00007f37e808fda0
Event: 0.550 Thread 0x00007f37e4600800 DEOPT UNPACKING pc=0x00007f37cc6267a5 sp=0x00007f37e808fd28 mode 2
Event: 0.865 Thread 0x00007f37e4016800 Uncommon trap: trap_request=0xffffff4d fr.pc=0x00007f37d4116d44 relative=0x0000000000000844
Event: 0.865 Thread 0x00007f37e4016800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007f37d4116d44 method=java.util.zip.InflaterInputStream.read([BII)I @ 69 c2
Event: 0.865 Thread 0x00007f37e4016800 DEOPT PACKING pc=0x00007f37d4116d44 sp=0x00007f37eb2ceeb0
Event: 0.865 Thread 0x00007f37e4016800 DEOPT UNPACKING pc=0x00007f37cc6267a5 sp=0x00007f37eb2ceda0 mode 2

Classes redefined (0 events):
No events

Internal exceptions (20 events):
Event: 0.230 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x000000062094e770}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, java.lang.Object, long, java.lang.Object)'> (0x000000062094e770) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.231 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x000000062095a628}: 'java.lang.Object java.lang.invoke.Invokers$Holder.linkToTargetMethod(java.lang.Object, long, java.lang.Object)'> (0x000000062095a628) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.250 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x00000006209ca338}: 'int java.lang.invoke.DirectMethodHandle$Holder.invokeSpecialIFC(java.lang.Object, java.lang.Object, java.lang.Object)'> (0x00000006209ca338) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.307 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x000000062071b3c8}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)'> (0x000000062071b3c8) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.307 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620729210}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)'> (0x0000000620729210) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, l
Event: 0.308 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620737200}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(java.lang.Object, java.lang.Object, int, int, java.lang.Object, int, java.lang.Object, java.lang.Object)'> (0x0000000620737200) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.308 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x000000062073a840}: 'java.lang.Object java.lang.invoke.DelegatingMethodHandle$Holder.reinvoke_L(java.lang.Object, int, int, java.lang.Object, int, java.lang.Object, java.lang.Object)'> (0x000000062073a840) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.311 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620764ad8}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, int)'> (0x0000000620764ad8) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.313 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x000000062077f280}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, int, int)'> (0x000000062077f280) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.314 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x000000062079a7d8}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, int, int, java.lang.Object)'> (0x000000062079a7d8) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.315 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x00000006207b7028}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, int, int, java.lang.Object, java.lang.Object)'> (0x00000006207b7028) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.330 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620414700}: <clinit>> (0x0000000620414700) thrown at [./src/hotspot/share/prims/jni.cpp, line 1362]
Event: 0.334 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620438348}: <clinit>> (0x0000000620438348) thrown at [./src/hotspot/share/prims/jni.cpp, line 1362]
Event: 0.338 Thread 0x00007f37e457f000 Exception <a 'java/lang/InterruptedException'{0x000000062047b630}> (0x000000062047b630) thrown at [./src/hotspot/share/runtime/objectMonitor.cpp, line 1635]
Event: 0.339 Thread 0x00007f37e457f000 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620483468}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, int, java.lang.Object, long)'> (0x0000000620483468) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.350 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620597a68}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(java.lang.Object, java.lang.Object, long)'> (0x0000000620597a68) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.544 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x00000006202f2468}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, java.lang.Object, java.lang.Object, int)'> (0x00000006202f2468) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.544 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x00000006202f60e0}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, int)'> (0x00000006202f60e0) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.544 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x00000006202f97d8}: 'java.lang.Object java.lang.invoke.Invokers$Holder.linkToTargetMethod(java.lang.Object, java.lang.Object, int, java.lang.Object)'> (0x00000006202f97d8) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.944 Thread 0x00007f37e4016800 Exception <a 'java/lang/NoSuchMethodError'{0x0000000620086470}: 'void java.lang.invoke.DirectMethodHandle$Holder.invokeSpecial(java.lang.Object, java.lang.Object, int)'> (0x0000000620086470) thrown at [./src/hotspot/share/interpreter/linkResolver.cpp, line 773]

Events (20 events):
Event: 0.952 loading class java/lang/reflect/UndeclaredThrowableException
Event: 0.952 loading class java/lang/reflect/UndeclaredThrowableException done
Event: 0.953 loading class com/caoccao/javet/annotations/V8RuntimeSetter
Event: 0.953 loading class com/caoccao/javet/annotations/V8RuntimeSetter done
Event: 0.953 loading class jdk/internal/HotSpotIntrinsicCandidate
Event: 0.953 loading class jdk/internal/HotSpotIntrinsicCandidate done
Event: 0.955 loading class com/caoccao/javet/interop/executors/V8PathExecutor
Event: 0.955 loading class com/caoccao/javet/interop/executors/V8PathExecutor done
Event: 0.955 loading class com/caoccao/javet/interop/executors/V8StringExecutor
Event: 0.955 loading class com/caoccao/javet/interop/executors/V8StringExecutor done
Event: 0.955 loading class com/caoccao/javet/interop/executors/BaseV8Executor
Event: 0.955 loading class com/caoccao/javet/interop/executors/BaseV8Executor done
Event: 0.955 loading class com/caoccao/javet/interop/V8ScriptOrigin
Event: 0.955 loading class com/caoccao/javet/interop/V8ScriptOrigin done
Event: 1.222 loading class com/caoccao/javet/interop/V8Runtime
Event: 1.222 loading class com/caoccao/javet/interop/V8Runtime done
Event: 1.222 loading class com/caoccao/javet/utils/JavetCallbackContext
Event: 1.222 loading class com/caoccao/javet/utils/JavetCallbackContext done
Event: 1.222 loading class com/caoccao/javet/interop/V8Runtime
Event: 1.222 loading class com/caoccao/javet/interop/V8Runtime done

It looks from the stack trace the V8Runtime is being closed, but this is somehow unexpected...

Could you please help me?
Is there any more info I can provide?

JavetProxyConverter: Interfaces

Hello! In java, interfaces are represented by java.lang.Class via reflection, and you can check if its an interface via type.isInterface(). I'm suggesting we allow for the conversion of interfaces in Java reflection to V8 via JavetProxyConverter

const interface = Class.forName('my.java.Interface');

There is a few benefits to this.

  • Check if another proxied object is an instance of this java interface.
  • Creating instances of this interfaces via proxies.

There may be others but I haven't thought of them. Thanks!

setRequireRootDirectory and setWorkingDirectory not working

Try to set working dir and root directory for resolve node_modules but it was fail

Java:

        File nodeScript = new File("C:\\Users\\hajek\\scripts\\test\\main.js");
        this.nodeRuntime = V8Host.getNodeInstance().createV8Runtime();
        this.nodeRuntime.getNodeModule(NodeModuleModule.class).setRequireRootDirectory(new File(nodeScript.getParent()).toPath());
        this.nodeRuntime.getNodeModule(NodeModuleProcess.class).setWorkingDirectory(new File(nodeScript.getParent()).toPath());
        this.nodeRuntime.getExecutor(nodeScript).execute();

main.js (node_modules are installed in C:\Users\hajek\scripts\test):

var cpus = require('cpus');
console.log(cpus().length);

exception:

Exception in thread "main" com.caoccao.javet.exceptions.JavetExecutionException: Error: Cannot find module 'cpus'
Require stack:
-  C:\Users\hajek\scripts\test
        at com.caoccao.javet.interop.V8Native.execute(Native Method)
        at com.caoccao.javet.interop.V8Runtime.execute(V8Runtime.java:338)
        at com.caoccao.javet.interop.executors.V8StringExecutor.execute(V8StringExecutor.java:54)
        at com.caoccao.javet.interop.IV8Executable.execute(IV8Executable.java:41)
        at com.hajekj14.platform.win.WinNodeEngine.exec(WinNodeEngine.java:33)
        at com.hajekj14.platform.win.Platform.main(Platform.java:15)

Osgi compatibility for Javet

Javet 0.9.13 when used within an OSGi container fails to function throwing the below error:

java.lang.UnsatisfiedLinkError: com.caoccao.javet.interop.V8Native.createV8Runtime(Ljava/lang/String;)J
    at com.caoccao.javet.interop.V8Native.createV8Runtime(Native Method)

This is because the custom OSgi bundles fail to see the javet native library file dll on Windows.

We would need to support Windows/MacOS/Linux OS as well

Can not run script from root

Not working:

root
├── node_modules
└── main.js

Working:

root
├── node_modules
└──main
   └── main.js

Is possible to make working both?

btw. thx for awesome lib ;-)

use @V8Function to reg function with ... args, in js call fn() with no arg error

I register ...args with @V8Function like this:

@V8Function(name = "testparam")
public void testParam(int... param) {
int[] params;
params = param;
log.info("testParam param:{}", params);
}

in js I call like this:
testparam(); //error,com.caoccao.javet.exceptions.JavetExecutionException: Error: wrong number of arguments
testparam(1); //ok
testparam(1,2); //ok

what should I do?thanks
can I register a object like IJavetConverter to proxy V8FunctionCallback.receiveCallback for custom method invoke?

@V8Function on methods named 'get' are invoked with names of other methods as argument

Hi,

Still a big fan of this project ;-)

I noticed that Javet gets 'confused' when there is a method called get in the object that is being used in the scripting environment. Apparently this get method also gets invoked whit the name of the actual method that is being invoked prior to the invocation of the indented method.

I've reduced the example to the bare essentials. Hope this saves you some time...

The application contains a bean that implements a simple bookstore. This bean has a method inStock( String isbn ) to check if a particular book is in stock or not:

public class Bookstore() {
  @V8Function
  public boolean inStock( String isbn ) {
    System.out.println( "call Bookstore.inStock( '"+isbn+"')" ); // <- for debugging
    // ...finds the book on some shelf and then....
   return true;
  }

  // NOTE: The presence of the following method seems to confuse Javet...
  @V8Function
  public Book get( String isbn ) {
    System.out.println( "call Bookstore.get( '"+isbn+"')" ); // <- for debugging
    // ...well...
  }
}

The application exposes an endpoint at {host:port}/checkStock which expects a json-object that represents a book. The property we're after is accessible under book.isbn.

public boolean checkInStockThroughJavaScript( String isbn ) {
  // Create a Bookstore object that magically connects to the database!
  Bookstore bookstore = new Bookstore(); 

  // Prepare the script...
  String script = "bookstore.inStock( '"+isbn+"' );";

  try (engine = pool.getEngine() ) {
    // Add the bookstore to the runtime...
    runtime.getGlobalObject().set( "bookstore", bookstore);

    // Run the script and return the result...
    return runtime.getExecutor( script )..executeBoolean();

    // ...etc...
  }
  // ...etc, i know i should have cleaned up the bookstore...
}

When i run this i see an odd logging line on the console:

call Bookstore.get( 'inStock' )

Note that the method name is used as the parameter.

I sure hope this isn't 'as designed'...

Can't spawn an http server from node.js inside javet

I have a main.js file with this code:

const express = require("express");
const app = express();

app.listen(3000, "0.0.0.0", () => {
    console.log(`Running server`);
});

And from java I'm doing this:

  V8Host v8Host = V8Host.getNodeInstance();

  V8Runtime v8 = v8Host.createV8Runtime();
  v8.getExecutor(new File("main.js")).execute();
        
  Scanner in = new Scanner(System.in);
  System.out.println("running server, press enter stop");
  in.nextLine();

I dont get any errors but the server never starts either.

JVM crash in libjavet-node-windows-x86_64.v.0.9.9.dll

getting the following crash when running a js file using node instance, error log is attached

--
A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff82a2244c6, pid=23196, tid=0x0000000000005490

JRE version: OpenJDK Runtime Environment (8.0_302-b08) (build 1.8.0_302-b08)
Java VM: OpenJDK 64-Bit Server VM (25.302-b08 mixed mode windows-amd64 compressed oops)
Problematic frame:
C [libjavet-node-windows-x86_64.v.0.9.9.dll+0x844c6]

full details in attachment

hs_err_pid17384.log

trying to use javet in a minecraft server plugin, running into issues

In my pom.xml i have the following:

<dependency>
   <scope>provided</scope>
   <groupId>org.spigotmc</groupId>
   <artifactId>spigot-api</artifactId>
   <version>1.8-R0.1-SNAPSHOT</version>
</dependency>

And in my Main.java i have the following:

@Override
public void onLoad() {
   try {
      V8Runtime v8Runtime = V8Host.getNodeInstance().createV8Runtime();
      System.out.println(v8Runtime.getExecutor("'test'").executeString());
   } catch (Exception error) {
      // discard errors
   }
}

However, when I start the plugin, I get the following error:

[15:42:54 INFO]: [grakkit] Loading grakkit v4.1.4
[15:42:54 ERROR]: [com.caoccao.javet.interop.JavetLibLoader] Failed to clean up /tmp/javet.
[15:42:55 ERROR]: [com.caoccao.javet.interop.JavetLibLoader] java.lang.NullPointerException: Cannot read the array length because "<local1>" is null
	at com.caoccao.javet.interop.JavetLibLoader.purgeLegacyLibraries(JavetLibLoader.java:66)
	at com.caoccao.javet.interop.JavetLibLoader.<clinit>(JavetLibLoader.java:51)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at com.caoccao.javet.interop.JavetClassLoader.load(JavetClassLoader.java:62)
	at com.caoccao.javet.interop.V8Host.loadLibrary(V8Host.java:415)
	at com.caoccao.javet.interop.V8Host.<init>(V8Host.java:76)
	at com.caoccao.javet.interop.V8Host.<init>(V8Host.java:40)
	at com.caoccao.javet.interop.V8Host$NodeInstanceHolder.<clinit>(V8Host.java:480)
	at com.caoccao.javet.interop.V8Host.getNodeInstance(V8Host.java:116)
	at grakkit.Main.onLoad(Main.java:15)
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:399)
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.reload(CraftServer.java:955)
	at org.bukkit.Bukkit.reload(Bukkit.java:769)
	at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54)
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:821)
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchServerCommand(CraftServer.java:784)
	at net.minecraft.server.dedicated.DedicatedServer.handleCommandQueue(DedicatedServer.java:518)
	at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:480)
	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1406)
	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1188)
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316)
	at java.base/java.lang.Thread.run(Thread.java:831)

[15:42:55 ERROR]: [org.bukkit.craftbukkit.v1_17_R1.CraftServer] 'long com.caoccao.javet.interop.V8Native.createV8Runtime(java.lang.String)' initializing grakkit v4.1.4 (Is it up to date?)
java.lang.UnsatisfiedLinkError: 'long com.caoccao.javet.interop.V8Native.createV8Runtime(java.lang.String)'
	at com.caoccao.javet.interop.V8Native.createV8Runtime(Native Method) ~[?:?]
	at com.caoccao.javet.interop.V8Host.createV8Runtime(V8Host.java:264) ~[?:?]
	at com.caoccao.javet.interop.V8Host.createV8Runtime(V8Host.java:241) ~[?:?]
	at com.caoccao.javet.interop.V8Host.createV8Runtime(V8Host.java:228) ~[?:?]
	at grakkit.Main.onLoad(Main.java:15) ~[?:?]
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:399) ~[patched_1.17.1.jar:git-Paper-90]
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.reload(CraftServer.java:955) ~[patched_1.17.1.jar:git-Paper-90]
	at org.bukkit.Bukkit.reload(Bukkit.java:769) ~[patched_1.17.1.jar:git-Paper-90]
	at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:54) ~[patched_1.17.1.jar:git-Paper-90]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.17.1.jar:git-Paper-90]
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:821) ~[patched_1.17.1.jar:git-Paper-90]
	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchServerCommand(CraftServer.java:784) ~[patched_1.17.1.jar:git-Paper-90]
	at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs(DedicatedServer.java:518) ~[patched_1.17.1.jar:git-Paper-90]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:480) ~[patched_1.17.1.jar:git-Paper-90]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1406) ~[patched_1.17.1.jar:git-Paper-90]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1188) ~[patched_1.17.1.jar:git-Paper-90]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[patched_1.17.1.jar:git-Paper-90]
	at java.lang.Thread.run(Thread.java:831) [?:?]

Note that Javet is being shaded via the maven shade plugin:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-shade-plugin</artifactId>
   <version>3.2.4</version>
   <executions>
      <execution>
         <phase>package</phase>
         <goals>
            <goal>shade</goal>
         </goals>
         <configuration>
            <createDependencyReducedPom>false</createDependencyReducedPom>
            <transformers>
               <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
            </transformers>
         </configuration>
      </execution>
   </executions>
</plugin>

Also note that bukkit/spigot/paper servers (the platform I am using this on) do not immediately call the onLoad method. It calls this method when the plugin is first loaded onto the server, which can be at any time. I believe there may be some unique behavior in relation to the ClassLoader as well, but I am not 100% sure.

Empower JavetProxyConverter to Consume Some Annotations

  • Refactor the doc to have dedicated section for individual converter.
  • Add @V8Convert to class to provide proper config for JavetProxyConverter.
  • Let JavetProxyConverter consume @V8Property at field level.
  • Let JavetProxyConverter consume @V8Function, @V8Getter, @V8Setter, @V8Allow, @V8Block at method level.
  • All changes applied to JavetProxyConverter are applied to JavetBridgeConverter.

Does using enginePool cause memory leaks?

I need to run v8runtime 100~1000 per second, use enginepool to initialize the instance, and load the lodash library in each v8runtime. When running at full speed, the console has a lot of warnings.
I have 2 questions:

  1. Will continuous operation cause memory leaks?
  2. How to release these objects in time?

image

image

Cannot create runtime : dll already loaded in another classloader

Hello,

I use Javet to run js build tools (eslint, babel...) in a maven plugin.

But when updating the project in eclipse, the maven plugin is reloaded and fails trying to create again the javet runtime with V8Host.getV8Instance().createV8Runtime(); :

Failed to read ....AppData\Local\Temp\javet\20964\libjavet-v8-windows-x86_64.v.1.0.5.dll - Native Library ...\AppData\Local\Temp\javet\20964\libjavet-v8-windows-x86_64.v.1.0.5.dll already loaded in another classloader

I think this fails because the dll is in the main classloader, where as the plugin has its own classloader.
Is there another way of retrieving a runtime without reloading the dll ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.