public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "debian-gcc at lists dot debian dot org" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug libgcj/14759] New: ServerSocketChannel causes Selector.select() to return immediatly
Date: Sun, 28 Mar 2004 10:11:00 -0000	[thread overview]
Message-ID: <20040328101128.14759.debian-gcc@lists.debian.org> (raw)

[forwarded from http://bugs.debian.org/240550]

If a ServerSocketChannel has been registered for SelectionKey.OP_ACCEPT 
at a Selector, select() will return immediatly with OP_ACCEPT on that 
Channel, even when there is no connection waiting. 
 
See example attached.


Compile and run it with: 
gcj-3.3 --main=Server Server.java && ./a.out 
 
and it will output: 
Before selector 
Something was selected. 
Before accept. 
 
and hang in the ServerSocket.accept() method until a connection 
happens. 

Using gcj-3.4 (20040314):

Before selector  [waiting]
Something was selected.
Before accept.
java.nio.channels.IllegalBlockingModeException
   at java.net.ServerSocket.implAccept(java.net.Socket)
(/usr/lib/gcc-snapshot/lib/libgcj.so.5.0.0)
   at gnu.java.nio.NIOServerSocket.accept()
(/usr/lib/gcc-snapshot/lib/libgcj.so.5.0.0)
   at Server.main(java.lang.String[]) (Unknown Source)

-- 
           Summary: ServerSocketChannel causes Selector.select() to return
                    immediatly
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                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=14759


             reply	other threads:[~2004-03-28 10:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-28 10:11 debian-gcc at lists dot debian dot org [this message]
2004-03-28 10:12 ` [Bug libgcj/14759] " debian-gcc at lists dot debian dot org
2004-03-30  5:59 ` bofh-reg-gcc at diegeekdie dot com
2004-04-04  6:18 ` pinskia at gcc dot gnu dot org
2004-04-04  6:22 ` pinskia at gcc dot gnu dot org
2005-01-15 22:30 ` konqueror at gmx dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040328101128.14759.debian-gcc@lists.debian.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).