[ 
https://issues.apache.org/jira/browse/FLUME-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15086062#comment-15086062
 ] 

Rollin Crittendon commented on FLUME-2812:
------------------------------------------

A note, we are also seeing this in some rollback cases on a staging system.
I assume the release number gets greater than the take for a semaphore.
Is there a quantification for how that could be happening?

We are running jdk 1.8, and from source I have seen for jdk 1.7, it looks like 
there is a check we are encountering, 
https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/util/concurrent/Semaphore.java.

====================
06 Jan 2016 01:03:59,476 ERROR [Flume Thrift IPC Thread 81] 
(org.apache.thrift.ProcessFunction.process:41)  - Internal error processing 
appendBatch
java.lang.Error: Maximum permit count exceeded
        at 
java.util.concurrent.Semaphore$Sync.tryReleaseShared(Semaphore.java:192)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1341)
        at java.util.concurrent.Semaphore.release(Semaphore.java:609)
        at 
org.apache.flume.channel.MemoryChannel$MemoryTransaction.doRollback(MemoryChannel.java:176)
        at 
org.apache.flume.channel.BasicTransactionSemantics.rollback(BasicTransactionSemantics.java:168)
        at 
org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:194)
        at 
org.apache.flume.source.ThriftSource$ThriftSourceHandler.appendBatch(ThriftSource.java:457)
        at 
org.apache.flume.thrift.ThriftSourceProtocol$Processor$appendBatch.getResult(ThriftSourceProtocol.java:259)
        at 
org.apache.flume.thrift.ThriftSourceProtocol$Processor$appendBatch.getResult(ThriftSourceProtocol.java:247)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at 
org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.invoke(AbstractNonblockingServer.java:478)
        at org.apache.thrift.server.Invocation.run(Invocation.java:18)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
====================

> Exception in thread "SinkRunner-PollingRunner-DefaultSinkProcessor" 
> java.lang.Error: Maximum permit count exceeded
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLUME-2812
>                 URL: https://issues.apache.org/jira/browse/FLUME-2812
>             Project: Flume
>          Issue Type: Bug
>          Components: Channel, Sinks+Sources
>    Affects Versions: v1.6.0
>         Environment: **OS INFO**
> CentOS release 6.6 (Final)
> Kernel \r on an \m
> **JAVA INFO**
> java version "1.8.0_40"
> Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
> Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
>            Reporter: Rollin Crittendon
>            Priority: Critical
>
> We are finding that around after an hour or so of heavy processing of Flume 
> data in an agent we are getting the following exception.  This is after 
> processing about 5-7 k lines/second during that time.
> The configuration of this agent is using a Kafka source, the one that comes 
> with 1.6.0. 
> It is also using a Memory channel, and a Thrift sink.
> =======
> Exception in thread "SinkRunner-PollingRunner-DefaultSinkProcessor" 
> java.lang.Error: Maximum permit count exceeded
>       at 
> java.util.concurrent.Semaphore$Sync.tryReleaseShared(Semaphore.java:192)
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1341)
>       at java.util.concurrent.Semaphore.release(Semaphore.java:609)
>       at 
> org.apache.flume.channel.MemoryChannel$MemoryTransaction.doCommit(MemoryChannel.java:147)
>       at 
> org.apache.flume.channel.BasicTransactionSemantics.commit(BasicTransactionSemantics.java:151)
>       at 
> org.apache.flume.sink.AbstractRpcSink.process(AbstractRpcSink.java:379)
>       at 
> org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68)
>       at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147)
>       at java.lang.Thread.run(Thread.java:745)
> =======
> The above error is from standard error when running the Flume agent.  The 
> effect is that the "SinkRunner-PollingRunner-DefaultSinkProcessor" thread 
> disappears from the agent, this can be seen on a JMX console.
> For us, this means that the Flume agent needs to get restarted.  It is an 
> error that is terminal in that instance of the Java process due to the thread 
> disappearing as a result.
> It sounds like something in JDK 7+ got stricter?!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to