… and where’s the advertised Unix?
Seriously though, you haven’t provided anything that allows identify your problem: neither LO version (there’s no “LibreOffice 6” - there may be 6.0, or 6.1, or 6.2; and better yet 6.0.7 or 6.2.4); nor the java code (may be the problem is because of an error in the code, or it may be a bug triggered by some code sequence), nor the data (document(s) that cause it hang - did you try to identify them? does processing the same data cause the hang again, or is it identified to not depend on the specific files, and the next time the same file is processed, no hang happens?).
When you do that preparational work, you shouldn’t post it here, but rather create a bug report for it, with all the information.