bigdata4u / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Connection shutdown failure leaves transcoder pool active #228

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
spy client v 2.7.3, Ubuntu server 11

I have a VM that will not exit due to two non-daemon threads hanging around.  I 
traced these to the TranscoderService thread pool.  The MemcacheClient shutdown 
can fail to clean this up if connection shutdown fails:

try {
    setName(baseName + " - SHUTTING DOWN (telling client)");
    running=false;
    conn.shutdown();
    setName(baseName + " - SHUTTING DOWN (informed client)");
    tcService.shutdown();
        if (configurationProvider != null) {
              configurationProvider.shutdown();
        }
} catch (IOException e) {
    getLogger().warn("exception while shutting down configuration provider", e);
}

Original issue reported on code.google.com by jonross1...@gmail.com on 4 Jan 2012 at 9:10

GoogleCodeExporter commented 8 years ago

Original comment by ingen...@gmail.com on 5 Feb 2012 at 7:47

GoogleCodeExporter commented 8 years ago
I have hang issue too when i call shutdown method it hangs.
We use 1.7.1 Membased and virtualBucket configuration to create connection.
Here is the thread dump:

   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x0000000700b24368> (a java.util.concurrent.CountDownLatch$Sync)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1011)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1303)
        at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:253)
        at net.spy.memcached.MemcachedClient.waitForQueues(MemcachedClient.java:2120)
        at net.spy.memcached.MemcachedClient.shutdown(MemcachedClient.java:2073)

Original comment by alexkhim...@gmail.com on 22 Feb 2012 at 4:17

GoogleCodeExporter commented 8 years ago
Issue 239 has been merged into this issue.

Original comment by ingen...@gmail.com on 16 Mar 2012 at 5:05