Skip to content

Creating Channel stucks on the unstable network #853

@KimTaehee

Description

@KimTaehee

Version: 0.14.2
Severity: Critical
Symptom: ApnsChannelPool cannot acquire Channel forever
Properties: concurrentConnections=1, eventLoopGroup=NioEventLoopGroup(1 thread)
Region: China(once every 2 days), Europe(once every 7 days)

Hi, Jon. I'm considering applying Pushy in the global environment. And I really appreciate your efforts.
Sadly I often faced a problem above with this so I'm trying to find the cause.

I believe these are the correct steps to reproduce in debug mode:

  1. Break at the last line of io.netty.channel.nio.AbstractNioChannel#connect()
  2. Down the network (ifconfig down or whatever)
  3. Resume application
  4. After few(<30?) seconds later, Netty calls ApnsClientHandler#channelInactive()
  5. Resume the network
  6. Then ApnsChannelPool#pendingCreateChannelFutures have 1 createChannelFuture that has not been done
  7. ApnsChannelPool#acquireWithinEventExecutor() can no longer create the proper Channel

Of course, we can reproduce this symptom in normal mode.

I think we must finish the createChannelFuture so I suggest inserting lines on ApnsClientHandler#channelInactive() to resolve pending createChannelFuture.

I look forward to hearing from you. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions