Skip to content

LinuxHelper.sched_getcpu() uses wrong syscall number: 318 (getrandom) instead of 309 (getcpu) on x86_64 #203

@rupeshkoushik07

Description

@rupeshkoushik07

In LinuxHelper.sched_getcpu(), the fallback path calls lib.syscall(318, cpu, node, null) intending to invoke getcpu. However, on x86_64 Linux:

__NR_getcpu = 309
__NR_getrandom = 318
So the code is actually invoking getrandom(2) with incorrect arguments rather than getcpu(2).

Location: net.openhft.affinity.impl.LinuxHelper, method sched_getcpu(), in the UnsatisfiedLinkError catch block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions