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 257107 - large number of java.net.SocketException: socket closed from CLIHandler$Server.run()
Summary: large number of java.net.SocketException: socket closed from CLIHandler$Serve...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-11 09:01 UTC by mbraybrook
Modified: 2015-12-26 02:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 203856


Attachments
stacktrace (1010 bytes, text/plain)
2015-12-11 09:01 UTC, mbraybrook
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mbraybrook 2015-12-11 09:01:37 UTC
Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03
OS: Windows 8

User Comments:
GUEST: .

GUEST: ???

GUEST: normal usuage but lots of projects open

GUEST: At startup

GUEST: Attempted to update an SVN repository to it's HEAD after editting a file in MS word, while netbeans was active. The error given was: successful WSAStartup not yet performed. Upon exiting, netbeans gave a notification saying it's update proces wasn't finished yet, even though it did nothing for a few minutes.

continuing the close-process seems to have resulted in this bug; the actual 'report problem' dialog did not appear until netbeans was booted again

GUEST: I don't know

GUEST: sssss

mbraybrook: Opened NetBeans, not sure on the trigger. I've got a couple of dozen projects open, but haven't recently added any new ones.

GUEST: dont know

GUEST: just started the program this morning

GUEST: Did not even notice! Probably during shutdown?

GUEST: Please provide a description of the problem or the steps to reproduce

GUEST: Cant use ssh upload function. got an error no connection. 
Parallely I used an open session to upload destination server, so the connection should have been established

GUEST: I was saving the HTML file under another name




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2367)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
   at java.lang.StringBuilder.append(StringBuilder.java:132)
   at org.netbeans.core.startup.logging.PrintStreamLogger.print(PrintStreamLogger.java:108)
Comment 1 mbraybrook 2015-12-11 09:01:40 UTC
Created attachment 157756 [details]
stacktrace
Comment 2 mbraybrook 2015-12-11 09:10:44 UTC
OS was incorrectly detected for me, I'm on Windows 10.0 (Build 10240).
Comment 3 Tomas Hurka 2015-12-11 12:54:16 UTC
OOME is caused by endless loop in CLIHandler$Server.run(). This loop fills messages.log with the following exception:

java.net.SocketException: socket closed
	at java.net.DualStackPlainSocketImpl.accept0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:121)
	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:183)
	at java.net.ServerSocket.implAccept(ServerSocket.java:522)
	at java.net.ServerSocket.accept(ServerSocket.java:490)
	at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1100)
Comment 4 Tomas Hurka 2015-12-22 09:27:46 UTC
To fix it, CLIHandler$Server will wait longer and longer with consecutive errors.
Comment 5 Tomas Hurka 2015-12-22 13:18:57 UTC
Fixed in profiler-main

changeset:   294052:695c12a18547
user:        Tomas Hurka <thurka@netbeans.org>
date:        Tue Dec 22 14:18:06 2015 +0100
summary:     bugfix #257107, when socket.accept() fails, wait for some time to prevent messages.log and memory overflow
Comment 6 Quality Engineering 2015-12-26 02:42:34 UTC
Integrated into 'main-silver', will be available in build *201512260002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/695c12a18547
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #257107, when socket.accept() fails, wait for some time to prevent messages.log and memory overflow