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 230208 - NetBeans is starting too many ""Remoting 'endpoint'" threads
Summary: NetBeans is starting too many ""Remoting 'endpoint'" threads
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: JBoss (show other bugs)
Version: 7.4
Hardware: PC Linux
: P1 normal with 1 vote (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-23 22:01 UTC by janario
Modified: 2013-06-05 09:35 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (298.01 KB, text/plain)
2013-05-23 22:03 UTC, janario
Details
Threaddump (323.24 KB, application/octet-stream)
2013-05-23 22:03 UTC, janario
Details
Profile (209.61 KB, application/x-netbeans-profiler-npss)
2013-05-23 22:03 UTC, janario
Details

Note You need to log in before you can comment on or make changes to this bug.
Description janario 2013-05-23 22:01:15 UTC
Product Version = NetBeans IDE Dev (Build 20130523-074db2835988)
Operating System = Linux version 3.8.0-21-generic running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01

After using around two or three hours NetBeans starts to be slow and impossible to work.
When I saw in jvisualvm it was running around 400 threads as you can see in threaddump attached
Live threads: 416
Daemon threads: 405

I often use maven projects, JBoss 7 and JRebel. 

I also few a big difference in performance between gtk and metal laf
With gtk laf it stills a lot slow and freezing while using the editor in a java file. Also when I try to scroll text(JBoss log) in output window

Attached threaddump and a few time of profile.
Comment 1 janario 2013-05-23 22:03:16 UTC
Created attachment 134838 [details]
IDE log
Comment 2 janario 2013-05-23 22:03:21 UTC
Created attachment 134839 [details]
Threaddump
Comment 3 janario 2013-05-23 22:03:26 UTC
Created attachment 134840 [details]
Profile
Comment 4 Tomas Hurka 2013-05-24 08:56:07 UTC
There is a lot of "Remoting 'endpoint'" threads. Quick google search revealed this question JBoss mailing list: <https://community.jboss.org/message/797418>. To it looks like this is a problem in JBoss integration. Reassigning to serverplugins/JBoss for further evaluation.
Comment 5 Petr Hejl 2013-05-24 11:05:17 UTC
Reporter, please answer the following question.

Which server version do you use (exact number)?
Does this happen without JRebel plugin?

Some background:
I must say I feel a bit depressed about the JBoss code itself. All the time I'm workarounding issues in their code. This is one of them and happened before and I think I have fixed it (though with every minor JBoss release they usually change something significantly). I had to fix it via reflection and DeploymentManager caching because of the workflow is imo broken when calling JBoss JSR-88 code and threads would remain there.

So that's why I'm asking about exact version and JRebel - perhaps JRebel faces the same issue I had to fix via reflection and caching.
Comment 6 janario 2013-05-24 12:25:33 UTC
I use jboss 7.1.1.Final. I'm going to try without jrebel and see what happens 

Thanks.
Comment 7 janario 2013-05-28 17:16:29 UTC
As I've tested JRebel is not the problem
Using only jboss(7.1.1.Final) and a maven web project it starts a lot of threads
Comment 8 Petr Hejl 2013-06-04 08:16:02 UTC
I'm able to reproduce this. Not related to deployment. Each server restart spawns 6 more threads. I'm going to debug and hopefully workaround JBoss code.
Comment 9 Petr Hejl 2013-06-04 09:36:02 UTC
It looks like that when the RemotingConnector fails to connect to JBoss it just throws RuntimeException. However at that moment its remoting endpoint threads are already allocated and running. As we do not receive any object (just exception) to call a close method on such threads are leaking.
Comment 10 Petr Hejl 2013-06-04 12:19:55 UTC
It looks like JBoss 7.1.x only is affected. At least 7.2.0 seems to be ok.
Comment 11 Petr Hejl 2013-06-04 12:25:02 UTC
Pretty ugly workaround in web-main 2c5f6798f2cb. Please verify.
Comment 12 Quality Engineering 2013-06-05 09:35:54 UTC
Integrated into 'main-golden', will be available in build *201306050626* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2c5f6798f2cb
User: Petr Hejl <phejl@netbeans.org>
Log: #230208 - NetBeans is starting too many ""Remoting 'endpoint'" threads