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 232926 - AssertionError: Resource temporarily unavailable
Summary: AssertionError: Resource temporarily unavailable
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Egor Ushakov
URL:
Keywords:
: 237258 237411 237765 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-17 19:33 UTC by ksrini
Modified: 2013-12-18 16:17 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 202245


Attachments
stacktrace (6.50 KB, text/plain)
2013-07-17 19:33 UTC, ksrini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ksrini 2013-07-17 19:33:56 UTC
Build: NetBeans IDE Dev (Build jdk8lambda-1778-on-20130716)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: SunOS

User Comments:
ksrini: scanning




Stacktrace: 
java.lang.AssertionError: Resource temporarily unavailable
   at sun.nio.fs.AbstractPoller.cancel(AbstractPoller.java:139)
   at sun.nio.fs.SolarisWatchService$SolarisWatchKey.cancel(SolarisWatchService.java:189)
   at org.netbeans.modules.masterfs.watcher.solaris.NioNotifier.removeWatch(NioNotifier.java:84)
   at org.netbeans.modules.masterfs.watcher.solaris.NioNotifier.removeWatch(NioNotifier.java:63)
   at org.netbeans.modules.masterfs.providers.Notifier$1.removeWatch(Notifier.java:115)
   at org.netbeans.modules.masterfs.watcher.NotifierKeyRef.removeWatch(NotifierKeyRef.java:96)
Comment 1 ksrini 2013-07-17 19:33:57 UTC
Created attachment 137335 [details]
stacktrace
Comment 2 Jaroslav Havlin 2013-07-18 06:52:36 UTC
The exception originates in NioNotifier.
Egor, can you please check it? Thank you.
Comment 3 Egor Ushakov 2013-07-18 08:37:36 UTC
Please try to set higher opened file limit in the system:
ulimit -n 10000
or even higher number.
Probably filewatcher needs to handle too many files and system is not ready to that.
Comment 4 Jaroslav Havlin 2013-07-24 09:04:32 UTC
If a file watcher cannot be created, an IOException should be thrown, so that polling is used as a fallback.

See org.netbeans.modules.masterfs.watcher.Watcher, line 244.

Egor, can you please fix it in masterfs.solaris? Thank you.
Comment 5 Egor Ushakov 2013-07-24 09:13:17 UTC
I'm not sure I can: watcher was created fine, but due to lack of system resources after some time java gives assertion. And I'm sure I should not catch assertions.
Comment 6 Jaroslav Havlin 2013-07-24 09:43:00 UTC
(In reply to comment #5)
> I'm not sure I can: watcher was created fine, but due to lack of system
> resources after some time java gives assertion. 
Thanks, I understand now. So the exception should be caught at Watcher:234.

> And I'm sure I should not catch assertions.
I agree. Probably IOException should be thrown instead of AssertionError.
So is it a JDK bug?

What are possible solutions? Break principles and wrap AssertionErrors with text "Resource temporarily unavailable" to IOExceptions, close as WONTFIX or mark the issue as JDK bug? Any ideas? Thank you.
Comment 7 Egor Ushakov 2013-07-24 09:50:03 UTC
I would prefer marking as JDK bug, when it is fixed we can wrap the exception with a user understandable message. I tried to file jdk bug but failed, sorry, do not know how to do that now ((
Comment 8 ksrini 2013-07-24 14:49:46 UTC
I have moved the existing java incident to bug, it will appear soon on bugs.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8021281
Comment 9 Egor Ushakov 2013-07-24 15:29:00 UTC
(In reply to comment #8)
> I have moved the existing java incident to bug, it will appear soon on bugs.
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8021281

Thanks!
Actually I did that as well, but my bug have not appeared as well (9005347)
Comment 10 Jaroslav Havlin 2013-07-25 14:58:13 UTC
(In reply to comment #8)
> I have moved the existing java incident to bug, it will appear soon on bugs.
(In reply to comment #9)
> Actually I did that as well, but my bug have not appeared as well (9005347)

Thank you very much.

I'm marking the issue as JDK bug and closing it for now.
Comment 11 ksrini 2013-07-25 15:28:41 UTC
This is really a Solaris 11 issue, the trouble is port_send(3C) is failing
with EAGAIN because of:
     EAGAIN    The maximum number of events per port is exceeded.
               The maximum allowable number of events per port is
               the minimum value of  the  process.max-port-events
               resource  control  at the time port_create(3C) was
               used to create the port.

The max-port-events must be increased in /etc/system or using prctl(1)
I think this requires documentation in NetBeans docs.
Comment 12 Jaroslav Havlin 2013-10-21 11:52:54 UTC
*** Bug 237411 has been marked as a duplicate of this bug. ***
Comment 13 Jaroslav Havlin 2013-10-31 12:34:55 UTC
*** Bug 237765 has been marked as a duplicate of this bug. ***
Comment 14 Jaroslav Havlin 2013-12-03 13:47:38 UTC
*** Bug 237258 has been marked as a duplicate of this bug. ***
Comment 15 Jaroslav Havlin 2013-12-18 16:17:29 UTC
*** Bug 239617 has been marked as a duplicate of this bug. ***