-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jackson LockFreePool recycler pool causes memory issues #21356
Comments
should be now addressed with #21361. Can you validate the change @davseitsev if possible since you seem to have a way to reproduce this? |
@hashhar I've applied your fix and testing it right now. I will update later. |
Looks good, I can't reproduce the issue. I will keep testing and update if anything changes. |
Closing then. Release should happen this week. Thanks! |
This issue appears to still be affecting us on Trino 444. We are running into massive memory issues with this. In our case, heap dumps indicate that Some quick debugging shows that the issue is due to the Ideally, all Alternatively, maybe explicitly downgrading the Jackson libraries is an option? |
Update: it was fixed in master so not yet been released (part of Airlift 244 update: airlift/airlift@6d36ba3 and 00d867b) Please test with 445 once it's released. |
That's great to hear, thanks! I wasn't checking other dependencies' upstream when investigating this. Will report back once 445 is out. |
I'm one of the author of the new Jackson pool and I would like to investigate the memory issue it caused, but at the moment I haven't been able to reproduce it on my side. Can anybody please explain how I could reproduce this problem? Thanks. |
Note that we're discussing this issue also here, so in case you have any suggestion on how to reproduce the problem it would be great to report it also there. In particular it would be very interesting if you could give a look at this comment and let me know if this could be relevant for your environment. |
@mariofusco have you seen how we are parsing JSON: https://github.com/trinodb/trino/blob/master/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/util/JsonTypeUtil.java#L46 ? |
I am also hoping to work on figuring out the underlying issue. I created a test: which suggests some abnormal temporary growth in retention, but not quite the smoking gun. So hoping to learn if there is something specific that might trigger or amplify issues. Another thing that would be good to know -- although I realize it may not be easy to try it out -- is whether use of one of alternate new pools, |
@wendigo This situation has improved for us now that we're on 445 with the explicit A heap dump I took indicates Jackson 2.17.1 has been released with a revert to the old pool as default, are there plans to incorporate that into airlift and an upcoming Trino release? |
@marvin-roesch jackson is already updated in master, will be released with 447 |
Follow-up to address |
After upgrade Trino from 409 to 443 we started to have memory issues. Some workers disappear from the cluster due to intensive major GC. In the logs we can see messages like:
On the graphs we can see memory starvation:
Heap dump analisys shows it comes from JsonUtil#OBJECT_MAPPED_UNORDERED. It creates
JsonFactory
with default implementation ofRecyclerPool
which is LockFreePool. This implementation is relatively young, has some concerns and is considered not to be used as default FasterXML/jackson-core#1256We have change the factory below to use JsonRecyclerPools.threadLocalPool()
trino/core/trino-main/src/main/java/io/trino/util/JsonUtil.java
Lines 118 to 121 in f0d5b0f
I'm not sure it's the best implementation for Trino but now we can't reproduce the issue.
The text was updated successfully, but these errors were encountered: