[
https://issues.apache.org/jira/browse/FLUME-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289784#comment-13289784
]
Mubarak Seyed commented on FLUME-1259:
--------------------------------------
CMS shows 18 GB used. Taking a heap dump, will attach it.
{code}
JAVA_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8080
-Dcom.sun.management.jmxremote.authenticate=false -Xmx20G -Xms20G
-XX:MaxDirectMemorySize=20M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70 -Xss128k -XX:+UseMembar -verbose:gc
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/var/log/flume/gc.log"
-bash-3.2$ sudo /usr/java/latest/bin/jmap -heap 12341
Attaching to process ID 12341, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 19.1-b02
using parallel threads in the new generation.
using thread-local object allocation.
Concurrent Mark-Sweep GC
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 21474836480 (20480.0MB)
NewSize = 21757952 (20.75MB)
MaxNewSize = 392560640 (374.375MB)
OldSize = 65404928 (62.375MB)
NewRatio = 7
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 85983232 (82.0MB)
Heap Usage:
New Generation (Eden + 1 Survivor Space):
capacity = 353304576 (336.9375MB)
used = 121896 (0.11624908447265625MB)
free = 353182680 (336.82125091552734MB)
0.03450167597036728% used
Eden Space:
capacity = 314048512 (299.5MB)
used = 0 (0.0MB)
free = 314048512 (299.5MB)
0.0% used
>From Space:
capacity = 39256064 (37.4375MB)
used = 121896 (0.11624908447265625MB)
free = 39134168 (37.321250915527344MB)
0.3105150837333055% used
To Space:
capacity = 39256064 (37.4375MB)
used = 0 (0.0MB)
free = 39256064 (37.4375MB)
0.0% used
concurrent mark-sweep generation:
capacity = 21082275840 (20105.625MB)
used = 19038579320 (18156.604118347168MB)
free = 2043696520 (1949.020881652832MB)
90.3060915457598% used
Perm Generation:
capacity = 28598272 (27.2734375MB)
used = 17152048 (16.357467651367188MB)
free = 11446224 (10.915969848632812MB)
59.97581951804641% used
{code}
> Flume throws OutOfMemory error when sending data from netcat to avro source
> (negative test case)
> ------------------------------------------------------------------------------------------------
>
> Key: FLUME-1259
> URL: https://issues.apache.org/jira/browse/FLUME-1259
> Project: Flume
> Issue Type: Bug
> Components: Sinks+Sources
> Affects Versions: v1.2.0
> Environment: RHEL 6.2 64-bit
> Reporter: Will McQueen
> Priority: Minor
> Fix For: v1.2.0
>
>
> This is a negative test case.
> I mistakenly sent data from netcat to an avro source, and Flume through an
> OutOfMemory error. I sent just 5 one-character events using interactive
> netcat (nc localhost 41414) and the following config file:
> agent.channels = c1
> agent.sources = r1
> agent.sinks = k1
> #
> agent.channels.c1.type = MEMORY
> #
> agent.sources.r1.channels = c1
> agent.sources.r1.type = AVRO
> agent.sources.r1.bind = 0.0.0.0
> agent.sources.r1.port = 41414
> #
> agent.sinks.k1.channel = c1
> agent.sinks.k1.type = LOGGER
> Here's the exception:
> 2012-06-05 13:51:36,622 INFO source.AvroSource: Avro source
> starting:AvroSource: { bindAddress:0.0.0.0 port:41414 }
> 2012-06-05 13:51:36,852 DEBUG source.AvroSource: Avro source started
> 2012-06-05 13:51:37,395 INFO ipc.NettyServer: [id: 0x0b07f45d,
> /0:0:0:0:0:0:0:1:49091 => /0:0:0:0:0:0:0:1:41414] OPEN
> 2012-06-05 13:51:37,399 INFO ipc.NettyServer: [id: 0x0b07f45d,
> /0:0:0:0:0:0:0:1:49091 => /0:0:0:0:0:0:0:1:41414] BOUND:
> /0:0:0:0:0:0:0:1:41414
> 2012-06-05 13:51:37,399 INFO ipc.NettyServer: [id: 0x0b07f45d,
> /0:0:0:0:0:0:0:1:49091 => /0:0:0:0:0:0:0:1:41414] CONNECTED:
> /0:0:0:0:0:0:0:1:49091
> 2012-06-05 13:52:06,622 DEBUG properties.PropertiesFileConfigurationProvider:
> Checking file:/etc/flume-ng/conf/flume.conf for changes
> 2012-06-05 13:52:36,623 DEBUG properties.PropertiesFileConfigurationProvider:
> Checking file:/etc/flume-ng/conf/flume.conf for changes
> 2012-06-05 13:52:56,468 WARN ipc.NettyServer: Unexpected exception from
> downstream.
> java.lang.OutOfMemoryError: Java heap space
> at java.util.ArrayList.<init>(ArrayList.java:112)
> at
> org.apache.avro.ipc.NettyTransportCodec$NettyFrameDecoder.decodePackHeader(NettyTransportCodec.java:154)
> at
> org.apache.avro.ipc.NettyTransportCodec$NettyFrameDecoder.decode(NettyTransportCodec.java:131)
> at
> org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:282)
> at
> org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:214)
> at
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
> at
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351)
> at
> org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282)
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> 2012-06-05 13:52:56,470 INFO ipc.NettyServer: [id: 0x0b07f45d,
> /0:0:0:0:0:0:0:1:49091 :> /0:0:0:0:0:0:0:1:41414] DISCONNECTED
> 2012-06-05 13:52:56,470 INFO ipc.NettyServer: [id: 0x0b07f45d,
> /0:0:0:0:0:0:0:1:49091 :> /0:0:0:0:0:0:0:1:41414] UNBOUND
> 2012-06-05 13:52:56,471 INFO ipc.NettyServer: [id: 0x0b07f45d,
> /0:0:0:0:0:0:0:1:49091 :> /0:0:0:0:0:0:0:1:41414] CLOSED
> I'm wondering if there's some kind of validation of incoming avro format that
> we can do that would prevent this error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira