public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/16473] New: [3.4] ServerSocket leaks file descriptors
@ 2004-07-11 16:12 mckinlay at redhat dot com
2004-07-11 16:13 ` [Bug libgcj/16473] " mckinlay at redhat dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: mckinlay at redhat dot com @ 2004-07-11 16:12 UTC (permalink / raw)
To: gcc-bugs
As reported by Eric Wong:
In version 3.4.0/1, ServerSocket.accept() creates a
new Socket() and then in the process invoke
Socket.getImpl(), which goes something like this:
-----
SocketImpl getImpl() throws SocketException
try
{
if (!implCreated)
{
impl.create(true);
implCreated = true;
}
}
catch (IOException e)
{
throw new SocketException(e.getMessage());
}
return impl;
-----
But create(true) alone will cause
natPlainSocketImplPosix.cc (depending on the platform)
to create a fresh yet never-been-used socket
descriptor. As a result, lsof will show:
>> socktest 31812 root 8u sock 0,0 1364355 can't
identify protocol
So each ServerSocket.accept() call will generate
additional descriptor until we get EMFILE error ("Too
many open files").
--
Summary: [3.4] ServerSocket leaks file descriptors
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mckinlay at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16473
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/16473] [3.4] ServerSocket leaks file descriptors
2004-07-11 16:12 [Bug libgcj/16473] New: [3.4] ServerSocket leaks file descriptors mckinlay at redhat dot com
@ 2004-07-11 16:13 ` mckinlay at redhat dot com
2004-07-11 16:15 ` mckinlay at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: mckinlay at redhat dot com @ 2004-07-11 16:13 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.4.0 3.4.1
Known to work| |3.5.0
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16473
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/16473] [3.4] ServerSocket leaks file descriptors
2004-07-11 16:12 [Bug libgcj/16473] New: [3.4] ServerSocket leaks file descriptors mckinlay at redhat dot com
2004-07-11 16:13 ` [Bug libgcj/16473] " mckinlay at redhat dot com
@ 2004-07-11 16:15 ` mckinlay at redhat dot com
2004-07-11 16:42 ` [Bug libgcj/16473] [3.4] ServerSocket accept() " cvs-commit at gcc dot gnu dot org
2004-07-11 16:42 ` mckinlay at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: mckinlay at redhat dot com @ 2004-07-11 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mckinlay at redhat dot com 2004-07-11 16:15 -------
I can confirm Eric's report.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-07-11 16:15:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16473
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/16473] [3.4] ServerSocket accept() leaks file descriptors
2004-07-11 16:12 [Bug libgcj/16473] New: [3.4] ServerSocket leaks file descriptors mckinlay at redhat dot com
` (2 preceding siblings ...)
2004-07-11 16:42 ` [Bug libgcj/16473] [3.4] ServerSocket accept() " cvs-commit at gcc dot gnu dot org
@ 2004-07-11 16:42 ` mckinlay at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: mckinlay at redhat dot com @ 2004-07-11 16:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mckinlay at redhat dot com 2004-07-11 16:42 -------
Fix checked in.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16473
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libgcj/16473] [3.4] ServerSocket accept() leaks file descriptors
2004-07-11 16:12 [Bug libgcj/16473] New: [3.4] ServerSocket leaks file descriptors mckinlay at redhat dot com
2004-07-11 16:13 ` [Bug libgcj/16473] " mckinlay at redhat dot com
2004-07-11 16:15 ` mckinlay at redhat dot com
@ 2004-07-11 16:42 ` cvs-commit at gcc dot gnu dot org
2004-07-11 16:42 ` mckinlay at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-11 16:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-07-11 16:42 -------
Subject: Bug 16473
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: bryce@gcc.gnu.org 2004-07-11 16:42:29
Modified files:
libjava : ChangeLog
libjava/java/net: ServerSocket.java Socket.java
Log message:
2004-07-11 Michael Koch <konqueror@gmx.de>
PR libgcj/16473
* java/net/ServerSocket.java (accept): Don't create two client
sockets when accepting connections.
* java/net/Socket.java (impl): Made package-private.
(implCreated): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2562.2.18&r2=1.2562.2.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/net/ServerSocket.java.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.34.4.1&r2=1.34.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/net/Socket.java.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.33.4.1&r2=1.33.4.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16473
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-07-11 16:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-11 16:12 [Bug libgcj/16473] New: [3.4] ServerSocket leaks file descriptors mckinlay at redhat dot com
2004-07-11 16:13 ` [Bug libgcj/16473] " mckinlay at redhat dot com
2004-07-11 16:15 ` mckinlay at redhat dot com
2004-07-11 16:42 ` [Bug libgcj/16473] [3.4] ServerSocket accept() " cvs-commit at gcc dot gnu dot org
2004-07-11 16:42 ` mckinlay at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).