Skip to content
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

Catch Throwable instead of Exception #634

Open
JohannesLichtenberger opened this issue Mar 5, 2024 · 6 comments
Open

Catch Throwable instead of Exception #634

JohannesLichtenberger opened this issue Mar 5, 2024 · 6 comments
Assignees
Labels

Comments

@JohannesLichtenberger
Copy link

JohannesLichtenberger commented Mar 5, 2024

net.openhft.chronicle.core.Jvm.maxDirectMemory0 should catch Throwable instead of Exception, otherwise I can't create a usable native image of my DBS project: oracle/graal#8406 (comment)

@JohannesLichtenberger JohannesLichtenberger changed the title Catch exception instead of throwable Catch Throwable instead of Exception Mar 5, 2024
@tgd
Copy link
Contributor

tgd commented Mar 5, 2024

Hi @JohannesLichtenberger thanks for bringing this to our attention - I've had a quick look through the linked thread but can you please summarize why this change needs to be made / how it blocks use of native image?

We do read issues created here but I can't share a resolution timeline yet, the more info we have the better regarding how this may impact users. We offer commercial support which we prioritize - if you need to expedite that please let me know directly or here - https://chronicle.software/contact-us/

@tgd tgd self-assigned this Mar 5, 2024
@JohannesLichtenberger
Copy link
Author

@tgd The issue is described here: oracle/graal#8406 (comment)

@JohannesLichtenberger
Copy link
Author

@tgd it should be really easy to fix, plus I don't get any money with SirixDB (only spending money so far...) :-)

At some point however I'd be probably interested in spending some money on performance improvements, just because it's interesting to learn for me :)

@tgd
Copy link
Contributor

tgd commented Mar 5, 2024

Hi @JohannesLichtenberger - I've taken a look and yes indeed changing this call site is not much work. However, there are plenty of other callsites where we catch Exception and not Throwable. Will you run into the same issue there?

In general we are not focused on supporting graal at this time - as mentioned in the other thread we are depending on a number of JVM internals which may well cause further issues running on SubstrateVM.

But let's use this issue to detail some of the requirements and we can figure out where this sits in our roadmap.

@tgd tgd added the graalvm label Mar 5, 2024
@JohannesLichtenberger
Copy link
Author

Sounds great. In any case, I'm also thinking about switching to MemorySegments or some lightweight abstraction on top, but I guess for now it would be easier to still use Chronicle Bytes (mostly I'm simply using Bytes.allocateElasticOnHeap(), so probably I won't run into other issues).

Would be wort a try IMHO if you could release a new patch version.

@JerryShea
Copy link
Contributor

hi @JohannesLichtenberger - I've made the change in this branch. As @tgd says, there are other places that the same change may need to be made. Can I suggest you build that branch locally and try it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants