See more investigation in internal b/78182827.
Frequently Cronet tests fail because Netty server fails to start with crashes like this:
06-06 17:50:37.060 4329 4472 W NioEventLoop: Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@5a535bc.
06-06 17:50:37.061 4329 4472 W NioEventLoop: Failed to re-register a Channel to the new Selector.
06-06 17:50:37.061 4329 4472 W NioEventLoop: java.lang.ClassCastException: io.netty.channel.nio.SelectedSelectionKeySetSelector cannot be cast to java.nio.channels.spi.AbstractSelector
06-06 17:50:37.061 4329 4472 W NioEventLoop: at java.nio.channels.spi.AbstractSelectableChannel.register(AbstractSelectableChannel.java:209)
06-06 17:50:37.061 4329 4472 W NioEventLoop: at io.netty.channel.nio.NioEventLoop.rebuildSelector0(NioEventLoop.java:347)
06-06 17:50:37.061 4329 4472 W NioEventLoop: at io.netty.channel.nio.NioEventLoop.rebuildSelector(NioEventLoop.java:318)
06-06 17:50:37.061 4329 4472 W NioEventLoop: at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:769)
06-06 17:50:37.061 4329 4472 W NioEventLoop: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:388)
06-06 17:50:37.061 4329 4472 W NioEventLoop: at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
06-06 17:50:37.061 4329 4472 W NioEventLoop: at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
06-06 17:50:37.061 4329 4472 W NioEventLoop: at java.lang.Thread.run(Thread.java:761)
06-06 17:50:37.061 4329 4472 I NioEventLoop: Migrated 0 channel(s) to the new Selector.
06-06 17:50:37.062 4329 4472 I LoggingHandler: [id: 0x02b71268] UNREGISTERED
This appears to be a known Netty bug:
https://github.com/netty/netty/issues/2616
I fixed this in r612677 and merged it back in http://crrev.com/f7df2f6.
This was merged back without seeking approval because it only affected Cronet and not Chrome and as per an agreement with amineer@ that it's okay to merge back such fixes without approval.
Comment 1 by mef@chromium.org
, Dec 20