Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions