OpenHFT/Posix

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

Opened this issue · 4 comments

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 commented

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

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

tgd commented

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 sales@chronicle.software are a good point of contact - if there are issues with those approaches please let me know here and I can expedite.