question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kryo serialising logger during finality flow

See original GitHub issue

kryo-logger-serialised

We have been getting the following error

"FiberTimedScheduler-Same thread scheduler" java.lang.OutOfMemoryError: GC overhead limit exceeded

During the finality flow while transferring 100 token states. After a lengthy investigation we found the the Kyro serializer was trying to serialize log4j which contains a rather large LMAX disruptor ring buffer.

The screen shot above shows the logger on the stack and about the be serialised. This started to happen when we upgraded from Corda OS 4.0 to 4.4.

Viewing this in visual VM you can see that the garbage collector is trying to kick in and collect, but it appears to be blocked.

cordite-saying-no-to-gc

We had this issue a couple of years ago and I think @rick-r3 fixed it.

Here’s the dependency list

corda_release_group = 'net.corda'
corda_release_version = '4.4'
corda_finance_version = '4.0'
corda_gradle_plugins_version = '5.0.6'
kotlin_version = '1.2.71'
junit_version = '4.12'
quasar_version = '0.7.12_r3'
spring_boot_version = '2.0.2.RELEASE'
spring_boot_gradle_plugin_version = '2.0.2.RELEASE'
slf4j_version = '1.7.25'
log4j_version = '2.9.1'
rxjava_version = '1.3.8'
hamkrest_version = '1.4.2.2'
mockito_kotlin_version = '1.5.0'
braid_version = '4.4.0'
vertx_version = '3.7.0'
jacoco_version = '0.8.1'
license_gradle_plugin_version = '0.14.0'assertj_version = '3.11.1'
jolokia_agent_version = '1.6.0'
postgres_driver_version = '42.2.5'
corda_platform_version = '4'

This issue will greatly affect performance of corda OS, but will only be noticeable if you are moving lots of states around.

Let me know if you need any more info Thanks Mark

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Bartman250commented, Aug 18, 2020

basically make sure you have the same logger dependancies as corda - i.e slf4j etc. If you have different dependancies then it will try and deserialise the wrong logger and blow up. Apologies for lack of write up - been too busy !

1reaction
r3jirabotcommented, May 28, 2020

Automatically created Jira issue: CORDA-3821

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog - R3 Documentation
Here's a summary of what's changed in each Corda release. For guidance on how to upgrade code from the previous release, see Upgrading...
Read more >
Improving Performance with the Kryo Serializer
Using Kryo provides particular performance improvements over plain old Java serialization when you are using these components: Persistent or clustered object ...
Read more >
Serializing an arbitrary Java object with Kryo (getting ...
I think, you want kryo.setInstantiatorStrategy(new StdInstantiatorStrategy()); to avoid constructor invocation. More info here. But, if I may ask, why in ...
Read more >
Introduction To Kryo | Baeldung
Kryo is a Java serialization framework with a focus on speed, efficiency, and a user-friendly API. In this article, we'll explore the key ......
Read more >
Storm Serialization with Avro (using Kryo Serializ... - 245569
In such cases emitting single values for multiple and varying event characteristics soon reveals it's limitations. For message serialization ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found