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 270283

Summary: Starvation in NIO2Notifier
Product: platform Reporter: Tomas Zezula <tzezula>
Component: FilesystemsAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: normal CC: issues, mbalin, sunflower
Priority: P2    
Version: Dev   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Thread dump

Description Tomas Zezula 2017-04-03 15:25:53 UTC
The IDE is frozen forever.
See attached thread dump.
Comment 1 Tomas Zezula 2017-04-03 15:26:34 UTC
Created attachment 164011 [details]
Thread dump
Comment 2 Tomas Zezula 2017-04-03 15:42:14 UTC
*** Bug 270044 has been marked as a duplicate of this bug. ***
Comment 3 Tomas Zezula 2017-04-04 14:06:06 UTC
There are 2 problems:

1st) The NIO2Notifier should not be used at all on Windows as there is a WindowsNotifier. Unfortunately the WindowsNotifier is not loaded on Win32 due to
broken jnidispatch-422.dll.

java.lang.UnsatisfiedLinkError: C:\Users\IEUser\AppData\Local\Temp\jna--2138670329\jna1402213887413181948.dll: Invalid
ccess to memory location
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1086)
        at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851)
        at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826)
        at com.sun.jna.Native.<clinit>(Native.java:140)
        at com.sun.jna.Pointer.<clinit>(Pointer.java:41)
        at org.netbeans.modules.masterfs.watcher.windows.WindowsNotifier.<clinit>(WindowsNotifier.java:139)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.openide.util.lookup.implspi.SharedClassObjectBridge.newInstance(SharedClassObjectBridge.java:64)
        at org.openide.util.lookup.MetaInfServicesLookup$Item.getInstance(MetaInfServicesLookup.java:514)
        at org.netbeans.modules.masterfs.watcher.Watcher.getNotifierForPlatform(Watcher.java:479)
        at org.netbeans.modules.masterfs.watcher.Watcher.<init>(Watcher.java:89)

The library was broken by http://hg.netbeans.org/jet-main/rev/4a55fc56992c.
The tool used for stripping doe not correctly handle Windows DLLs.

2nd) Is a problem in NIO2Notifier which hands in cancel or register.
I am not sure yet if it's a Java or the NIO2Notifier problem.
Comment 4 Tomas Hurka 2017-04-04 14:09:15 UTC
Stripped version of jna library reverted to original (non-stripped) one.

changeset:   303050:a61bd9cf1509
user:        Tomas Hurka <thurka@netbeans.org>
date:        Tue Apr 04 16:06:11 2017 +0200
summary:     bugfix #270283, changeset 4a55fc56992c (Stripping libs in libs.jna) reverted
Comment 5 Martin Balin 2017-04-05 08:34:35 UTC
Please revert also in release82.