Skip to content

Netty Connector hangs instead of timing out on flush #5778

Open
@scottoaks17

Description

@scottoaks17

This is a follow on to #5753

Even with the fix for that applied, our app sometimes ends up hanging after a particular nioEventLoopGroup thread goes into an infinite loop. In this case, the call from io.netty.handler.stream.ChunkedWriteHandler.doFlush goes into org.glassfish.jersey.netty.connector.internal.JerseyChunkedInput.readChunk() (instead of write()) but the effect is the same: there is a timeout on the queue.poll() call, control returns to the doFlush() method, but because the stream is still writable, the doFlush() method continues to call readChunk().

We have not been able to get a simple reproducer for this test case as we were for the other, but it's clear that the code is not honoring the READ_TIMEOUT here if it returns Unpooled.EMPTY_BUFFER when the queue.poll() call times out. I would assume that we should again throw an IOException() here for the timeout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions