[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/36269] Bad file exception is thrown in epoll modification
From: |
wzzhu at cs dot hku dot hk |
Subject: |
[Bug classpath/36269] Bad file exception is thrown in epoll modification |
Date: |
21 May 2008 07:01:38 -0000 |
------- Comment #2 from wzzhu at cs dot hku dot hk 2008-05-21 07:01 -------
(In reply to comment #1)
> Don't those errors imply that you can't modify the epoll fd, because either it
> or the file descriptor you're modifying isn't valid?
>
> Is there a case where a set of valid operations fails because of this?
>
The EBADF is returned when the fd (not the epoll fd, epoll fd is valid) is
closed (not necessarily bad file descriptor). I tested on jetty server
(www.mortbay.org/) where a call assigns 0 to the operation set. But the file
handle fd could have been closed somewhere else.
The stack trace is as follows.
java.lang.IllegalArgumentException: java.io.IOException: Bad file descriptor
at
gnu.java.nio.EpollSelectionKeyImpl.interestOps(EpollSelectionKeyImpl.java:102)
// the code is
// we are not interested in further selecting
_key.interestOps(0);
at
org.mortbay.io.nio.SelectChannelEndPoint.dispatch(SelectChannelEndPoint.java:124
)
at
org.mortbay.io.nio.SelectChannelEndPoint.dispatch(SelectChannelEndPoint.java:64)
at
org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:471)
at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:166)
at
org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java:
124) at
org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:515)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
at java.lang.VMThread.run(VMThread.java:123)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36269