Review request for 6693490 (original) (raw)
Alan Bateman Alan.Bateman at Sun.COM
Mon Mar 23 16:38:13 UTC 2009
- Previous message: hg: jdk7/tl/jdk: 6820606: keytool can generate serialno more randomly
- Next message: Review request for 6693490
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
6693490: (se) select throws "File exists" IOException under load (lnx)
Sherman, we've chatted about this issue so you will probably want to review. It's a race between registration (or re-registration) and close. Registrations are queued so that they come into effect at the next select (as required by the spec) but if the channel is pre-closed just before it is added to epoll then it possible that the socketpair, used in the closing mechanism, gets registered with epoll. Once that happens it creates the conditions to cause a Selector spin, and where the file descriptor is recycled for a new SelectableChannel, then registration will fail with IOException "file exists". The fix is to remove from epoll before the channel is killed and to skip pending updates for closed channels (as these can result in re-registration). To avoid any side effects with cancellation the deregister also purges pending updates for the channel. Thanks to Serge Baranov, Robert Larsen, Peter van Rensburg, Richard Ridgway, Greg Wilkins and others for testing this fix, or preliminary versions of.
The webrev is here: http://cr.openjdk.java.net/~alanb/6693490/webrev.00
Thanks, -Alan.
- Previous message: hg: jdk7/tl/jdk: 6820606: keytool can generate serialno more randomly
- Next message: Review request for 6693490
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]