This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 247207 - Nashorn ExecutionException and 'Redefinition failed(62)' during NB profiler attach
Summary: Nashorn ExecutionException and 'Redefinition failed(62)' during NB profiler a...
Status: RESOLVED DUPLICATE of bug 245522
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-17 11:00 UTC by houtm035
Modified: 2014-09-19 15:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (56.54 KB, text/plain)
2014-09-17 11:00 UTC, houtm035
Details

Note You need to log in before you can comment on or make changes to this bug.
Description houtm035 2014-09-17 11:00:43 UTC
Product Version = NetBeans IDE 8.0.1 (Build 201408251540)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.8.0
Runtime = Java HotSpot(TM) Client VM 25.0-b70

My javase project is running on JDK 1.8 u20
I use one Nashorn engine instance to create a CompiledScript object, and every 500 msec i do mCompiledScript.eval(bindings) in a SwingWorker instance

Trying to attach with netbeans profiler i get an exception inside Nashorn.
I also get a popup from the profiler stating "Redefinition failed with error 62. Check JVMTI documentation for this errorcode"
output windows shows:

(...)
java.awt.WaitDispatchSupport$2
sun.nio.ch.FileChannelImpl$Unmapper
Profiler Agent Error: with message: Redefinition failed with error 62
Check JVMTI documentation for this error code.
Debug: writing class file: javax.swing.RepaintManager$ProcessingRunnable, into file: javax.swing.RepaintManager$ProcessingRunnable.class
(....)
Debug: writing class file: java.awt.WaitDispatchSupport$2, into file: java.awt.WaitDispatchSupport$2.class
Debug: writing class file: sun.nio.ch.FileChannelImpl$Unmapper, into file: sun.nio.ch.FileChannelImpl$Unmapper.class
Sep 17, 2014 12:42:52 PM (....).scriptedfunction.ScriptRunner$Worker done
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
Caused by: java.lang.NullPointerException
	at jdk.nashorn.internal.runtime.linker.NashornGuards.isMap(NashornGuards.java:181)
Comment 1 houtm035 2014-09-17 11:00:49 UTC
Created attachment 149293 [details]
IDE log
Comment 2 Tomas Hurka 2014-09-18 08:36:29 UTC
This looks like duplicate of issue #245522. Can you try to run your java project on JDK 8u5 instead of JDK 8u20?
Comment 3 houtm035 2014-09-19 12:49:49 UTC
Hi Tomas,
Using Jdk 1.8u5, the NB profiler does work.

Note, bugid=245522 states using 'advanced option', but i'm using 'basic settings'. I only selected a package from my project code.

sidenote; There are ~16500 messages on stdout saying;
"Profiler Agent Warning: JVMTI classLoadHook: class name is null."
(executing 200 nashorn compiledScript objects, which seem to result in an increase of ~15000 loaded classes, looking at VM telemetry)
Comment 4 Tomas Hurka 2014-09-19 14:51:10 UTC
(In reply to houtm035 from comment #3)
> Hi Tomas,
> Using Jdk 1.8u5, the NB profiler does work.
ok.
 
> Note, bugid=245522 states using 'advanced option', but i'm using 'basic
> settings'. I only selected a package from my project code.
Issue #245522 is talking about 'Advanced (instrumented)' option in the profiler panel, not 'Advanced settings' of instrumented profiling.

> sidenote; There are ~16500 messages on stdout saying;
> "Profiler Agent Warning: JVMTI classLoadHook: class name is null."
> (executing 200 nashorn compiledScript objects, which seem to result in an
> increase of ~15000 loaded classes, looking at VM telemetry)
This probably comes from Nashorn-genetared classes.

*** This bug has been marked as a duplicate of bug 245522 ***
Comment 5 houtm035 2014-09-19 15:06:35 UTC
the VM option: '-Xverify:none' indeed enables profiling again