giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Reisman (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-437) Missing progress calls when stopping Netty server
Date Fri, 30 Nov 2012 19:57:58 GMT


Eli Reisman commented on GIRAPH-437:

You know the problem you're monitoring here, the lockup on awaitUniteruptably() for NettyServer,
might be caused by that call itself. This is how the NettyClient shuts down, perhaps this
is the pattern we need to add to the NettyServer ChannelGroup shutdown? There is more info
about this pattern and why to use it on the site. The snippet is part of the
way to avoid using awaitUninterruptably as in NettyServer. Here's the NettyClient#stop() method
for reference:

public void stop() {
    // Close connections asynchronously, in a Netty-approved
    // way, without cleaning up thread pools until all channels
    // in addressChannelMap are closed (success or failure)
    int channelCount = 0;
    for (ChannelRotater channelRotater : addressChannelMap.values()) {
      channelCount += channelRotater.size();
    final int done = channelCount;
    final AtomicInteger count = new AtomicInteger(0);
    for (ChannelRotater channelRotater : addressChannelMap.values()) {
      channelRotater.closeChannels(new ChannelFutureListener() {
        public void operationComplete(ChannelFuture cf) {
          if (count.incrementAndGet() == done) {
            if (LOG.isInfoEnabled()) {
    "stop: reached wait threshold, " +
                  done + " connections closed, releasing " +
                  "NettyClient.bootstrap resources now.");

I might be way off here, but when I implemented the original version of this pattern I only
did it in one of the two files (Client not Server) so this could maybe be the reason for the
hangup in your logs? ...Or not! Anyway, just a thought. 
> Missing progress calls when stopping Netty server
> -------------------------------------------------
>                 Key: GIRAPH-437
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Maja Kabiljo
>            Assignee: Maja Kabiljo
>         Attachments: GIRAPH-437.patch
> At the end of a long running job I got an exception about not reporting progress. The
last log line was: "stop: Halting netty server", so I suspect it's because awaitUninterruptibly()
call there.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message