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

JNRPosixAPI#fallocate method on Alpine Linx 3.19+ fails with UnsatisfiedLinkError #31

Open
splunk-chowiel opened this issue Feb 22, 2024 · 4 comments
Assignees

Comments

@splunk-chowiel
Copy link

splunk-chowiel commented Feb 22, 2024

On Alpine 3.19+ running on aarch64 AWS EC2 Graviton instances, the C lib api, fallocate64, is no longer available. The Posix layer should invoke fallocate in this case.

Proposed fix in the JNRPosixAPI class would be to introduce a system property that allows fallocate to always be invoked:

    @Override
    public int fallocate(int fd, int mode, long offset, long length) {
        if (Boolean.parseBoolean(System.getProperty("net.openhft.posix.internal.jnr.JNRPosixAPI.fallocate_no_shim"))) {
            return jnr.fallocate(fd, mode, offset, length);
        }
        return UnsafeMemory.IS32BIT ? jnr.fallocate(fd, mode, offset, length) : jnr.fallocate64(fd, mode, offset, length);
    }
@tgd
Copy link
Contributor

tgd commented Feb 22, 2024

Hi @splunk-chowiel many thanks for flagging this. We do review these issues but cannot assign them the same high priority as our commercial support channels. If this is something you would like to expedite please do get in touch here: https://chronicle.software/contact-us/

cc @rogersimmons

@splunk-chowiel
Copy link
Author

@tgd Thanks. I can do that. I can also submit a PR with the above change if that works.

@tgd
Copy link
Contributor

tgd commented Feb 22, 2024

Hi @splunk-chowiel - thanks for offering to put the PR in place - before you go go ahead with that please take a look at our contributor agreement and return it to us - https://chronicle.software/contributor-agreement/. This way we can ensure the IP rights of any contributions made.

Regarding commercial support the web form https://chronicle.software/contact-us/ or [email protected] are a good point of contact - if there are issues with those approaches please let me know here and I can expedite.

@rogersimmons
Copy link
Contributor

#34

@rogersimmons rogersimmons self-assigned this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants