[
https://issues.apache.org/jira/browse/PLC4X-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477959#comment-17477959
]
Łukasz Dywicki commented on PLC4X-323:
--------------------------------------
This issue was quite specific as it did have visible symptoms in stack traces
and further memory allocation issues. I didn't need to build procedure, as it
was sufficient just to spin transport for a bit with busy line.
We had some points which have indicated resource leaks within netty related to
reconnection. We can have a look on these together. I believe you as a ASF
committer can use JProfiler or other memory analysis tool which simplifies
process a lot through collection of memory snapshots and reference
tracking/counting.
> SocketCAN transport fails with out of memory error
> --------------------------------------------------
>
> Key: PLC4X-323
> URL: https://issues.apache.org/jira/browse/PLC4X-323
> Project: Apache PLC4X
> Issue Type: Bug
> Components: Driver-CANopen
> Affects Versions: 0.8.0, 0.9.0
> Reporter: Łukasz Dywicki
> Assignee: Łukasz Dywicki
> Priority: Major
> Fix For: 0.10.0
>
>
> After a month of continous work CANopen driver starts to fail with following
> error:
> {code}
> Exception in thread "javacan-reader" java.lang.OutOfMemoryError: Java heap
> space
> at
> io.netty.util.internal.PlatformDependent.allocateUninitializedArray(PlatformDependent.java:285)
> at
> io.netty.buffer.UnpooledUnsafeHeapByteBuf.allocateArray(UnpooledUnsafeHeapByteBuf.java:39)
> at
> io.netty.buffer.UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf.allocateArray(UnpooledByteBufAllocator.java:144)
> at
> io.netty.buffer.UnpooledHeapByteBuf.capacity(UnpooledHeapByteBuf.java:133)
> at
> io.netty.buffer.AbstractByteBuf.ensureWritable0(AbstractByteBuf.java:307)
> at
> io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1114)
> at
> org.apache.plc4x.java.transport.socketcan.netty.SocketCANChannel.lambda$doConnect$0(SocketCANChannel.java:119)
> at
> org.apache.plc4x.java.transport.socketcan.netty.SocketCANChannel$$Lambda$1043/0x0000000100d5a440.run(Unknown
> Source)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)